I use an open-source rendering library (Ogre3D) which has a dependency on zlib.
In XCode5, I noticed that when building for iOS, zlib will not build if 64-bit (arm64) architecture is indicated by ARCHS setting.
I get errors about "implicit function declaration" relating to LSEEK
macro, read
and write
functions. I looked up LSEEK
in gzlib.c:
#if defined(_WIN32) && !defined(__BORLANDC__)
# define LSEEK _lseeki64
#else
#if defined(_LARGEFILE64_SOURCE) && _LFS64_LARGEFILE-0
# define LSEEK lseek64
#else
# define LSEEK lseek
#endif
#endif
My guess is something here is wrong, but I don't know what. And as for read()
and write()
I have no clue.
CMakeList.txt
file, with many things stripped out. Perhaps compare ours to the one from the official zlib library to check if there are some mandatory things in order for it to compile on arm64 that we need to add. – Bulb_LARGEFILE64_SOURCE
and set_LFS64_LARGEFILE-0
to check whether usedlseek64
would solve the issue? – Bulb