[R-sig-Geo] spgrass6 build error on Mac OS X

Thomas Juntunen tmj at visi.com
Wed Jan 23 10:54:53 CET 2008


On Tue, 22 Jan 2008 23:28:45 -0500, Thomas.Adams at noaa.gov wrote:

> I am attempting to build spgrass6 on MacOS X 10.5.1 (Leopard) on a 2.33. GHz 
> Intel Core Duo MacBook Pro.
[...]
> I have "Install dependencies" checked, so rgdal is downloaded and attempts to 
> build first. (No MacOS X binaries are available).

William Kyngesburye provides many UNIX frameworks as OS X binaries on his web 
site:
http://www.kyngchaos.com/wiki/software:frameworks

As of this writing he still has rgdal for R 2.5. He also has advice for 
compiling under OS X.


> ** libs
> ** arch - i386
> g++ -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk 
> -mmacosx-version-min=10.4 -no-cpp-precomp 
> -I/Library/Frameworks/R.framework/Resources/include 
> -I/Library/Frameworks/R.framework/Resources/include/i386 -I/usr/local/include 
> -msse3    -fPIC  -g -O2 -march=nocona -c OGR_write.cpp -o OGR_write.o

[...]

> g++ -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk 
> -mmacosx-version-min=10.4 -dynamiclib -Wl,-headerpad_max_install_names 
> -Wl,-macosx_version_min -Wl,10.4 -undefined dynamic_lookup -single_module 
> -multiply_defined suppress -L/usr/local/lib -o rgdal.so OGR_write.o 
> gdal-bindings.o ogr_geom.o ogr_proj.o ogrdrivers.o ogrsource.o projectit.o 
> -L/usr/local/lib -lgdal -lproj  -F/Library/Frameworks/R.framework/.. 
> -framework R 
> ** Removing '/Library/Frameworks/R.framework/Resources/library/rgdal'
> /usr/bin/libtool: for architecture ppc7400 object: 
> /usr/lib/gcc/i686-apple-darwin8/4.0.1/libstdc++.dylib malformed object 
> (unknown load command 7)
> /usr/bin/libtool: for architecture: (null) file: -lstdc++ is not an object 
> file (not allowed in a library)
> /usr/bin/libtool: for architecture i386 object: 
> /usr/lib/gcc/i686-apple-darwin8/4.0.1/libstdc++.dylib malformed object 
> (unknown load command 8)
> /usr/bin/libtool: for architecture ppc7400 object: 
> /usr/lib/gcc/i686-apple-darwin8/4.0.1/../../../libSystem.dylib malformed 
> object (unknown load command 7)
> /usr/bin/libtool: for architecture: (null) file: -lSystem is not an object 
> file (not allowed in a library)
> /usr/bin/libtool: for architecture ppc64 object: 
> /usr/lib/gcc/i686-apple-darwin8/4.0.1/../../../libSystem.dylib malformed 
> object (unknown load command 7)
> make: *** [rgdal.so] Error 1
> chmod: /Library/Frameworks/R.framework/Resources/library/rgdal/libs/i386/*: 
> No such file or directory
> ERROR: compilation failed for package 'rgdal'

It appears to be an architecture mismatch. Did you upgrade from 10.4.x to 
10.5.1 but not upgrade XTools? My MacBookPro with 10.5.1 and XTools 3 has 
/Developer/SDKs/MacOSX10.5.sdk as well as the older 10.4u.

HTH,
Thomas Juntunen




More information about the R-sig-Geo mailing list