Le vendredi 15 mars 2013 20:09:57, Jorge Arévalo a écrit :
> Hello,
> 
> I'm getting an error compiling GDAL from trunk (r25758). I successfully
> compiled GDAL from trunk before with this configure script:
> 
> https://dl.dropbox.com/u/6599273/gdal/configure_gdal.sh
> 
> But after last svn update to r25758, I get this error
> 
> https://dl.dropbox.com/u/6599273/errors/gdal_trunk_compile_error.log
> 
> I haven't compiled GDAL on Mac for a while. So, The problem isn't
> necessarily caused by the last update.
> 
> Anyone else with the same problem?

Cool that someone tests on the Mac and reports.

Well, I assumed that "extern char** environ" that contains the environment 
variable was available on all POSIX platforms, but apparently not.

http://www.gnu.org/software/gnulib/manual/html_node/environ.html suggests me 
the following patch. Please test and report if it works.

Index: port/cpl_spawn.cpp
===================================================================
--- port/cpl_spawn.cpp  (revision 25734)
+++ port/cpl_spawn.cpp  (working copy)
@@ -461,8 +461,13 @@
 #include <signal.h>
 #ifdef HAVE_POSIX_SPAWNP
 #include <spawn.h>
+#ifdef MACOSX_FRAMEWORK
+#include <crt_externs.h>
+#define environ (*_NSGetEnviron())
+#else
 extern char** environ;
 #endif
+#endif
 
 #if 0
 /************************************************************************/


> 
> Thanks in advance,
_______________________________________________
gdal-dev mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/gdal-dev

Reply via email to