The GDAL detection has a problem with framework link flags. There is an alternate gdal-config at
/Library/Frameworks/GDAL.framework/unix/bin/gdal-config that returns library link flags that configure likes better. On Jul 22, 2015, at 12:36 PM, Carlos Grohmann <[email protected]> wrote: > Hi > > I'm trying to compile GRASS7 on OSX 10.11 Beta, but I'm stuck with GDAL. I'm > using Kyngesburye's frameworks, and I have gdal-config in my PATH as > > export PATH=/Library/Frameworks/GDAL.framework/Programs:$PATH > > > this minimum example of configure fails: > > export MACOSX_DEPLOYMENT_TARGET=10.10 > > ./configure \ > > --prefix=/Applications \ > > --enable-macosx-app \ > > --with-macosx-archs="x86_64" \ > > --with-macosx-sdk=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/ > > \ > > --with-proj \ > > --with-proj-includes=/Library/Frameworks/PROJ.framework/unix/include \ > > --with-proj-libs=/Library/Frameworks/PROJ.framework/unix/lib \ > > --with-proj-share=/Library/Frameworks/PROJ.framework/Resources/proj \ > > --with-gdal=/Library/Frameworks/GDAL.framework/Programs/gdal-config \ > > > checking host system type... x86_64-apple-darwin15.0.0 > checking for gcc... gcc > checking whether the C compiler (gcc -Os ) works... yes > checking whether the C compiler (gcc -Os ) is a cross-compiler... no > checking whether we are using GNU C... yes > checking whether gcc accepts -g... yes > checking for Cygwin environment... no > checking for mingw32 environment... no > checking for executable suffix... no > checking for full floating-point support... yes > checking for pwd... /bin/pwd > checking for source directory... > /Users/guano/Documents/installs/grass70_release > checking for build directory... > /Users/guano/Documents/installs/grass70_release > checking for svnversion... /usr/bin/svnversion > checking for MacOSX App... yes > checking for MacOSX architectures... -arch x86_64 > checking for MacOSX SDK... checking for > /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk//SDKSettings.plist... > yes > checking how to build libraries... shared > checking for additional include dirs... > checking for additional library dirs... > checking for a BSD compatible install... /usr/bin/install -c > checking for flex... flex > checking for yywrap in -lfl... no > checking for bison... bison -y > checking for ranlib... ranlib > checking for ar... ar > checking for env... env > checking for perl... /usr/bin/perl > checking how to run the C preprocessor... gcc -E > checking for ANSI C header files... yes > checking for limits.h... yes > checking for termio.h... no > checking for termios.h... yes > checking for unistd.h... yes > checking for values.h... no > checking for f2c.h... no > checking for g2c.h... no > checking for sys/ioctl.h... yes > checking for sys/mtio.h... no > checking for sys/resource.h... yes > checking for sys/time.h... yes > checking for sys/timeb.h... yes > checking for sys/types.h... yes > checking for sys/utsname.h... yes > checking for libintl.h... no > checking for iconv.h... yes > checking for langinfo.h... yes > checking whether time.h and sys/time.h may both be included... yes > checking for off_t... yes > checking for uid_t in sys/types.h... yes > checking return type of signal handlers... void > checking for Cygwin environment... no > checking for ftime... yes > checking for gethostname... yes > checking for gettimeofday... yes > checking for lseek... yes > checking for nice... yes > checking for time... yes > checking for uname... yes > checking for seteuid... yes > checking for setpriority... yes > checking for setreuid... yes > checking for setruid... yes > checking for drand48... yes > checking for putenv... yes > checking for setenv... yes > checking for nanosleep... yes > checking whether setpgrp takes no argument... yes > checking for long long int... yes > checking for W11... no > checking for X... no > checking for library containing cuserid... no > checking for asprintf... yes > checking for atan... yes > checking for dlsym... yes > checking for iconv... no > checking for iconv in -liconv... yes > checking for socket... yes > checking for location of zlib includes... > checking for zlib.h... yes > checking for location of zlib library... > checking for deflate in -lz... yes > checking for location of External PROJ.4 includes... > /Library/Frameworks/PROJ.framework/unix/include > checking for proj_api.h... yes > checking External PROJ.4 version... 491 > checking for location of External PROJ.4 library... > /Library/Frameworks/PROJ.framework/unix/lib > checking for pj_get_def in -lproj... yes > checking for location of External PROJ.4 data files... > /Library/Frameworks/PROJ.framework/Resources/proj > checking for /Library/Frameworks/PROJ.framework/Resources/proj/epsg... yes > checking for nad2bin... > /Library/Frameworks/PROJ.framework/Versions/Current/Programs//nad2bin > checking whether to use regex... yes > checking for location of regex includes... > checking for regex.h... yes > checking for location of regex library... > checking for regcomp... yes > checking whether to use Readline... no > checking whether to use GDAL... yes > checking for gdal-config... > /Library/Frameworks/GDAL.framework/Programs/gdal-config > configure: error: *** Unable to locate GDAL library. > > > > > This is the last part of config.log: > > configure:6036: checking whether to use GDAL > configure:6054: checking for gdal-config > configure:6116: gcc -o conftest -Os -arch x86_64 -isysroot > /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/ > -I/Library/Frameworks/GDAL.framework/Versions/1.11/Headers -arch x86_64 > -isysroot > /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/ > conftest.c -framework GDAL 1>&5 > configure:6112:1: warning: ignoring return value of function declared with > warn_unused_result attribute [-Wunused-result] > GDALOpen("foo", GA_ReadOnly); > ^~~~~~~~ ~~~~~~~~~~~~~~~~~~ > 1 warning generated. > ld: framework not found GDAL > clang: error: linker command failed with exit code 1 (use -v to see > invocation) > configure: failed program was: > #line 6109 "configure" > #include "confdefs.h" > #include <gdal.h> > int main() { > GDALOpen("foo", GA_ReadOnly); > ; return 0; } > configure:6132: gcc -o conftest -Os -arch x86_64 -isysroot > /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/ > -I/Library/Frameworks/GDAL.framework/Versions/1.11/Headers -arch x86_64 > -isysroot > /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/ > conftest.c -framework GDAL 1>&5 > configure:6128:1: warning: ignoring return value of function declared with > warn_unused_result attribute [-Wunused-result] > GDALOpen("foo", GA_ReadOnly); > ^~~~~~~~ ~~~~~~~~~~~~~~~~~~ > 1 warning generated. > ld: framework not found GDAL > clang: error: linker command failed with exit code 1 (use -v to see > invocation) > configure: failed program was: > #line 6125 "configure" > #include "confdefs.h" > #include <gdal.h> > int main() { > GDALOpen("foo", GA_ReadOnly); > ; return 0; } > > > > > > looking for gdal-config: > which gdal-config > /Library/Frameworks/GDAL.framework/Programs/gdal-config > > and for gdal.h: > locate gdal.h > /Applications/GRASS-6.4.app/Contents/MacOS/docs/html/r.in.gdal.html > /Applications/GRASS-6.4.app/Contents/MacOS/docs/html/r.out.gdal.html > /Applications/GRASS-7.0.app/Contents/MacOS/docs/html/r.in.gdal.html > /Applications/GRASS-7.0.app/Contents/MacOS/docs/html/r.out.gdal.html > /Applications/QGIS.app/Contents/MacOS/grass/docs/html/r.in.gdal.html > /Applications/QGIS.app/Contents/MacOS/grass/docs/html/r.out.gdal.html > /Library/Frameworks/GDAL.framework/Versions/1.10/Headers/gdal.h > /Library/Frameworks/GDAL.framework/Versions/1.10/Resources/doc/gdal/java/org/gdal/gdal/gdal.html > /Library/Frameworks/GDAL.framework/Versions/1.11/Headers/gdal.h > /Library/Frameworks/GDAL.framework/Versions/1.11/Resources/doc/gdal/java/org/gdal/gdal/gdal.html > > > > So it looks to me that configure is looking at the right place for gdal.h... > > any ideas? > > thanks > > Carlos > > > > -- > Prof. Carlos Henrique Grohmann > Institute of Energy and Environment - Univ. of São Paulo, Brazil > - Digital Terrain Analysis | GIS | Remote Sensing - > > http://carlosgrohmann.com > http://orcid.org/0000-0001-5073-5572 > ________________ > Can’t stop the signal. > _______________________________________________ > grass-dev mailing list > [email protected] > http://lists.osgeo.org/mailman/listinfo/grass-dev ----- William Kyngesburye <kyngchaos*at*kyngchaos*dot*com> http://www.kyngchaos.com/ "We are at war with them. Neither in hatred nor revenge and with no particular pleasure I shall kill every ___ I can until the war is over. That is my duty." "Don't you even hate 'em?" "What good would it do if I did? If all the many millions of people of the allied nations devoted an entire year exclusively to hating the ____ it wouldn't kill one ___ nor shorten the war one day." <Ha, ha> "And it might give 'em all stomach ulcers." - Tarzan, on war _______________________________________________ grass-dev mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/grass-dev
