Time Nick Message 07:15 nore thoughts on #1119? 07:15 ShadowBot https://github.com/minetest/minetest/issues/1119 -- Fix rendering glitches when far from the center of the map by Novatux 12:20 sapier did anyone ever mention android c library beeing a nightmare about temporarys and memory usage? if not now it's done 12:21 sfan5 one more reason to compile in a static libc 12:21 sapier well that's exactly what I do 12:21 sfan5 which libc do you use? 12:21 sapier still memory is messed up to an extent hard to believe it does even run 12:22 sapier the one supplied with ndk 12:23 sapier e.g. if I supply L"Some button text" to a button I see the text in gui, if I pass a pointer to allocated memory containing same text I don't see anything ... not even if I don't ever free that pointer 12:24 sapier and to make it even worse this happens on real device only but not in emulator 12:38 sfan5 sapier: fix please, https://github.com/minetest/minetest/issues/1152 12:43 sapier hmm that's strange sfan according to the testcode 2.0.2 is not denied 12:44 sapier do you have multiple versions of luajit installed sfan5? 12:45 sapier https://github.com/minetest/minetest/blob/master/src/CMakeLists.txt L231 I did only prevent some versions, unknown ones are allowed 12:45 sfan5 not that I know of 12:46 sfan5 I read the code 12:46 sapier I don't see what could be wrong there, maybe you find the bug. You could try compiling that piece of code manually and see it's result 12:47 sfan5 $ dpkg -l | grep luajit | awk '{ print $2 }' 12:47 sfan5 libluajit-5.1-2:amd64 12:47 sfan5 libluajit-5.1-common 12:47 sfan5 libluajit-5.1-dev:amd64 12:47 Jordach sapier, because the emulator uses the native C lib, instead of the Android one 12:48 sfan5 Jordach: how would ARM code use the native libc? 12:48 Jordach sfan5, define emulator 12:48 sfan5 also it runs the whole linux kernel in qemu 12:50 sfan5 sapier: it works with gcc but not with clang 13:01 sapier ok what does clang do? 13:04 sapier well I expect android arm emulator to behave same as real device especially on STATIC linked lib 13:04 sapier obviously I'm wrong about this 13:40 sfan5 sapier: seems like clang isn't the problem 13:41 sfan5 it fails with gcc randomly too 13:42 sapier random errors? 13:44 sapier I'd have expected code that simple to result in deterministic behaviour ;-) 15:47 kahrl sapier: src/CMakeLists.txt:243, are you sure the sizeof does what you think it does? 15:47 kahrl 242* 16:40 sfan5 kahrl: correcting that does not help either, seems like cmake is broken 16:41 kahrl weird 16:43 sfan5 my code: http://ix.io/aGt 16:43 sfan5 works with both clang + gcc when doing manually 16:44 sfan5 but it seems like cmake does not even get to run it 16:44 kahrl sfan5: broken_luajit_versions is not an array 16:44 kahrl it's a pointer 16:45 sfan5 it is used here too: https://github.com/minetest/minetest/blob/master/src/daynightratio.h#L45 16:46 kahrl yes but "values" is an actual array so it works there 16:48 kahrl ARRAYSIZE(broken_luajit_versions) is 1 on my gcc 16:48 kahrl do this: static char* broken_luajit_versions[] = (char *[]) { 16:48 kahrl then ARRAYSIZE(broken_luajit_versions) is 7 16:51 hmmmm you don't need that cast at all btw 16:51 kahrl right 16:51 hmmmm why is it there in the first place 16:51 sfan5 still doesn't work 16:51 sfan5 hm 16:51 hmmmm also how could sapier F something up so horribly 16:52 hmmmm also in ARRAYSIZE you should have (a)[0], not a[0] 16:57 sfan5 I have http://ix.io/aGu now, how come it still says my lua is broken? 16:59 hmmmm now, I don't know much about cmake, but from my understanding that takes the return code of that program and sets VALID_LUAJIT_VERSION to that 17:00 hmmmm and you check if (VALID_LUAJIT_VERSION) right below, as in, if VALID_LUAJIT_VERSION is a non-zero value then do this 17:00 hmmmm but a return code of 1 means it's an invalid version 17:00 hmmmm I don't know if this is the problem or not but it's just something that looks fishy 17:02 kahrl hmmmm: I checked /usr/share/cmake/Modules/CheckCSourceRuns.cmake, it compares the exit code to 0 and if so sets VAR to 1, and otherwise sets VAR to 0 17:02 hmmmm oh. 17:02 hmmmm hmmm. 17:02 kahrl it's more complicated than that because of cross compiling so there might be a bug 17:02 kahrl or something I overlooked 17:03 sfan5 nope 17:03 sfan5 switching the return codes around does not make it work 17:04 kahrl what does if("${VAR}" MATCHES "^${VAR}$") do? 17:04 kahrl it's a test in CHECK_C_SOURCE_RUNS that could prevent the program from being run 17:05 sfan5 it does not try to compile it in the first place when cross-compiling is used 17:13 kahrl sfan5: shouldn't the elseif(CMAKE_CROSSCOMPILING) be else(CMAKE_CROSSCOMPILING)? 17:13 sfan5 yes it should 17:14 sfan5 ahhhhh 17:14 sfan5 works now 17:16 kahrl it doesn't find my luajit.h for some reason 17:16 sfan5 mine is at /usr/include/luajit-2.0/luajit.h and it works just fine 17:17 kahrl I have LUA_INCLUDE_DIR=/usr/include/luajit and luajit.h is in there 17:18 kahrl oh wait, it's -2.0 as on your system 17:18 kahrl but why doesn't it give an error earlier? 17:21 sfan5 https://github.com/minetest/minetest/pull/1156 17:22 kahrl sfan5: looks good 17:25 kahrl it seems my troubles with luajit.h were because of an outdated cmake cache, nevermind 17:28 sfan5 can I merge it? 17:30 kahrl sfan5: yes 17:30 sfan5 done 19:09 nore btw: did someone look at #1119? 19:09 ShadowBot https://github.com/minetest/minetest/issues/1119 -- Fix rendering glitches when far from the center of the map by Novatux