Re: [gdal-dev] Build GDAL 3.5 for iOS error: forward declaration of 'stat64'

2022-07-05 Thread Nik Sands
Thanks Even, After applying the patch and then running the ‘cmake' and 'cmake —build' again, it stops at the same point but produces much fewer errors (and I have found a dodgy work-around those - see below). Only two errors this time, both for the same file: == [ 6%] Building CXX ob

Re: [gdal-dev] Build GDAL 3.5 for iOS error: forward declaration of 'stat64'

2022-07-05 Thread Greg Troxel
Even Rouault writes: > That's what we do already what we do for a few functions (like fopen64 > vs fopen): cf > https://github.com/OSGeo/gdal/blob/1e3cc18e298e81c1f42162b10ef7beb0dd94d3cf/cmake/helpers/configure.cmake#L230 > > But for some reason, in that circumstance, it seems it detects symbol

Re: [gdal-dev] Build GDAL 3.5 for iOS error: forward declaration of 'stat64'

2022-07-05 Thread Even Rouault
have viewed "large file support" as a linux and solaris thing only. This is probably a bigger rototill than anyone has appetite for, but I wonder if there should basically be a configure test to look for foo64 (by the equivalent of AC_TRY_COMPILE) and if so use it,a nd if not just use the norm

Re: [gdal-dev] Build GDAL 3.5 for iOS error: forward declaration of 'stat64'

2022-07-05 Thread Greg Troxel
Even Rouault writes: > Can you try the following patch which basically forces to remap all > "foo64" functions to "foo". I assume that iOS Unix I/O is 64-bit > enabled by default... I would expect it is. The BSD world changed the ttype of size_t, off_t to 64 bits a really long time ago and in

Re: [gdal-dev] Build GDAL 3.5 for iOS error: forward declaration of 'stat64'

2022-07-05 Thread Nik Sands
Hi Even, Thanks again for your advice. The debug message did produce what I believe was the expected output as follows: CMake Warning at cmake/helpers/configure.cmake:175 (message): CMAKE_SYSTEM_NAME=iOS Making the suggested change to the configure.cmake file (line 175 in the version 3.5 d

Re: [gdal-dev] Build GDAL 3.5 for iOS error: forward declaration of 'stat64'

2022-07-05 Thread Even Rouault
(re-adding the list) ok, it's a bit weird CMake detects symbols that are not available at build time, but there might be some subtelties in iOS SDK Can you try the following patch which basically forces to remap all "foo64" functions to "foo". I assume that iOS Unix I/O is 64-bit enabled by

Re: [gdal-dev] Build GDAL 3.5 for iOS error: forward declaration of 'stat64'

2022-07-05 Thread Even Rouault
Nik, in cmake/helpers/configure.cmake, there's a special case of Darwin at line 183 in master   if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin") Can you test if replacing it with   if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin" OR ${CMAKE_SYSTEM_NAME} MATCHES "iOS") works better? (I assume CMAKE_SYS

[gdal-dev] Build GDAL 3.5 for iOS error: forward declaration of 'stat64'

2022-07-04 Thread Nik Sands
Hi GDAL devs, As per my earlier emails, I’m attempting to build GDAL 3.5 for iOS. The complete process (so far) for this is below, at the end of this email. A quick summary of some relevant points is: • Using a 3rd party cmake toolchain file which caters for iOS, macOS (as well as other Apple