axpbox
axpbox copied to clipboard
Use fopen64, fix segfault in fseek on arm #29
There is also this: https://github.com/madler/zlib/blob/master/contrib/minizip/ioapi.h#L24 - which does not have arm support. But I did use it for reference.
It might also help to debug why the fopen call segfaults. The debugging experience on this arm machine is so slow, I didn't do that. One "real" second takes about 10 seconds on the poor machine.
I wonder why HAVE_FOPEN64 is not set on the machine, check_symbol_exists(fopen64 "stdio.h" HAVE_FOPEN64)
should set it. I'll quickly boot up an ARM VM, try to look into this and give an update very soon.
So on my test VM (QEMU TCG aarch64 Alpine Linux) fopen64
is not found by CMake, although it compiles fine with it. I believe this is a build system problem and this is only a workaround (that may cause build failure in cases where fopen64 is not available on an ARM platform for some reason).
So on my test VM (QEMU TCG aarch64 Alpine Linux)
fopen64
is not found by CMake, although it compiles fine with it. I believe this is a build system problem and this is only a workaround (that may cause build failure in cases where fopen64 is not available on an ARM platform for some reason).
Okay that's good to know. I'll see what I can find in the direction of cmake as for a fix or workaround.
I've updated the request, could you please take a new look @lenticularis39 ?
That seems quite complicated for a simple feature test, of course it's better that nothing, but I have the feeling it may be too much code for something that could be done more in a simpler way. I'll try to look into the headers once I'll have some time for it, which should be soon.
Oh sorry, wrong PR :D
That seems quite complicated for a simple feature test, of course it's better that nothing, but I have the feeling it may be too much code for something that could be done more in a simpler way. I'll try to look into the headers once I'll have some time for it, which should be soon.
It's indeed quite a bit of code. The Mac os x build kept failing for me with other (simpler) tests sadly... Please let me know if there's anything I can do or test 🙃