[gdal-dev] Cannot compile 1.10 for iOS due to missing crt_extern

Even Rouault even.rouault at mines-paris.org
Sun Aug 11 23:12:16 PDT 2013


Le lundi 12 août 2013 02:17:33, Nik Sands a écrit :
> Hi list members,
> 
> I was able to build GDAL 1.9 for iOS, and I can build 1.10 for the iOS
> simulator, however I cannot compile GDAL 1.10 for the actual iOS
> (devices).  It appears that this is because crt_extern is not included in
> iOS.
> 
> The code that trips up the build is in 'cpl_spawn.cpp' and appears to be:
> 
> 	#ifdef __APPLE__
> 	#include <crt_externs.h>
> 
> The last few lines of the build output are below.
> 
> Is there some way that I can get GDAL 1.10 built for iOS?  I really need
> one of the changes that was included in this version.
> 
> Thanks in advance for any advice that you may be able to provide.

Nick,

Maybe you can try the patch at 
https://github.com/joyent/libuv/pull/321#issuecomment-4155600 that has very 
similar code that the one in GDAL and report if it works for you so it can get 
integrated ?

Even

> 
> Cheers,
> Nik.
> 
> 
> libtool: compile: 
> /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Dev
> eloper/usr/bin/g++ -arch armv7 -pipe -Os -gdwarf-2 -isysroot
> /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Dev
> eloper/SDKs/iPhoneOS6.1.sdk -mno-thumb -mthumb-interwork -Wall
> -DOGR_ENABLED -I/Users/nsands/Documents/Nik/Development/gdal-1.10.0/port
> -DHAVE_LIBZ -I/usr/include/libxml2 -DHAVE_LIBXML2 -c cpl_spawn.cpp -o
> cpl_spawn.o cpl_spawn.cpp:465:25: error: crt_externs.h: No such file or
> directory cpl_spawn.cpp: In function 'CPLSpawnedProcess* CPLSpawnAsync(int
> (*)(CPL_FILE_HANDLE, CPL_FILE_HANDLE), const char* const*, int, int, int,
> char**)': cpl_spawn.cpp:727: error: '_NSGetEnviron' was not declared in
> this scope make[1]: *** [cpl_spawn.lo] Error 1
> make: *** [port-target] Error 2
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev

-- 
Geospatial professional services
http://even.rouault.free.fr/services.html


More information about the gdal-dev mailing list