[R-SIG-Mac] error compiling rgdal on mac os x

Luca Sguanci luke at lilik.it
Wed Jul 4 08:19:38 CEST 2007


I'm trying to compile the rgdal package on a MacOSX 10.4.10 with Xcode 
Tools 2.4.1. I have already installed the PROJ.4 and GEOS library 
together with GRASS. I installed a newer version of the GDAL library 
(1.4.1) from source. I try compiling rgdal with the following command

sudo R CMD INSTALL --configure-args='--bindir=/opt/local/bin 
--with-gdal-config=/usr/local/bin/gdal-config 
--with-proj-include=/usr/local/grasslib/include 
--with-proj-lib=/usr/local/grasslib/lib' rgdal_0.5-13.tar.gz

but it fails compiling..

* Installing to library '/Library/Frameworks/R.framework/Resources/library'
* Installing *source* package 'rgdal' ...
gdal-config: /usr/local/bin/gdal-config
checking for gcc... gcc-4.0 -arch ppc -isysroot 
/Developer/SDKs/MacOSX10.4u.sdk -std=gnu99
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc-4.0 -arch ppc -isysroot 
/Developer/SDKs/MacOSX10.4u.sdk -std=gnu99 accepts -g... yes
checking for gcc-4.0 -arch ppc -isysroot /Developer/SDKs/MacOSX10.4u.sdk 
-std=gnu99 option to accept ANSI C... none needed
checking how to run the C preprocessor... gcc-4.0 -arch ppc -isysroot 
/Developer/SDKs/MacOSX10.4u.sdk -std=gnu99 -Echecking for egrep... grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking proj_api.h usability... yes
checking proj_api.h presence... yes
checking for proj_api.h... yes
checking for pj_init_plus in -lproj... yes
Package CPP flags: -I/usr/local/grasslib/include -I/usr/local/include
Package LIBS:  -L/usr/local/grasslib/lib -L/usr/local/lib -lgdal
configure: creating ./config.status
config.status: creating src/Makevars
** libs
** arch - ppc
g++-4.0 -arch ppc -isysroot /Developer/SDKs/MacOSX10.4u.sdk 
-no-cpp-precomp -I/Library/Frameworks/R.framework/Resources/include 
-I/Library/Frameworks/R.framework/Resources/include/ppc 
-I/usr/local/grasslib/include -I/usr/local/include -I/usr/local/include 
    -fPIC  -g -O2 -c OGR_write.cpp -o OGR_write.o
g++-4.0 -arch ppc -isysroot /Developer/SDKs/MacOSX10.4u.sdk 
-no-cpp-precomp -I/Library/Frameworks/R.framework/Resources/include 
-I/Library/Frameworks/R.framework/Resources/include/ppc 
-I/usr/local/grasslib/include -I/usr/local/include -I/usr/local/include 
    -fPIC  -g -O2 -c gdal-bindings.cpp -o gdal-bindings.o
g++-4.0 -arch ppc -isysroot /Developer/SDKs/MacOSX10.4u.sdk 
-no-cpp-precomp -I/Library/Frameworks/R.framework/Resources/include 
-I/Library/Frameworks/R.framework/Resources/include/ppc 
-I/usr/local/grasslib/include -I/usr/local/include -I/usr/local/include 
    -fPIC  -g -O2 -c ogr_geom.cpp -o ogr_geom.o
g++-4.0 -arch ppc -isysroot /Developer/SDKs/MacOSX10.4u.sdk 
-no-cpp-precomp -I/Library/Frameworks/R.framework/Resources/include 
-I/Library/Frameworks/R.framework/Resources/include/ppc 
-I/usr/local/grasslib/include -I/usr/local/include -I/usr/local/include 
    -fPIC  -g -O2 -c ogr_proj.cpp -o ogr_proj.o
g++-4.0 -arch ppc -isysroot /Developer/SDKs/MacOSX10.4u.sdk 
-no-cpp-precomp -I/Library/Frameworks/R.framework/Resources/include 
-I/Library/Frameworks/R.framework/Resources/include/ppc 
-I/usr/local/grasslib/include -I/usr/local/include -I/usr/local/include 
    -fPIC  -g -O2 -c ogrdrivers.cpp -o ogrdrivers.o
g++-4.0 -arch ppc -isysroot /Developer/SDKs/MacOSX10.4u.sdk 
-no-cpp-precomp -I/Library/Frameworks/R.framework/Resources/include 
-I/Library/Frameworks/R.framework/Resources/include/ppc 
-I/usr/local/grasslib/include -I/usr/local/include -I/usr/local/include 
    -fPIC  -g -O2 -c ogrsource.cpp -o ogrsource.o
g++-4.0 -arch ppc -isysroot /Developer/SDKs/MacOSX10.4u.sdk 
-no-cpp-precomp -I/Library/Frameworks/R.framework/Resources/include 
-I/Library/Frameworks/R.framework/Resources/include/ppc 
-I/usr/local/grasslib/include -I/usr/local/include -I/usr/local/include 
    -fPIC  -g -O2 -c projectit.cpp -o projectit.o
g++-4.0 -arch ppc -isysroot /Developer/SDKs/MacOSX10.4u.sdk -dynamiclib 
-Wl,-macosx_version_min -Wl,10.3 -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/grasslib/lib -L/usr/local/lib 
-lgdal -lproj  -F/Library/Frameworks/R.framework/.. -framework R
ld: warning can't open dynamic library: 
/Developer/SDKs/MacOSX10.4u.sdk/opt/local/lib/libgeos.2.dylib referenced 
from: /Developer/SDKs/MacOSX10.4u.sdk/usr/local/lib/libgdal.dylib 
(checking for undefined symbols may be affected) (No such file or 
directory, errno = 2)
ld: warning can't open dynamic library: 
/Developer/SDKs/MacOSX10.4u.sdk/opt/local/lib/libgeos_c.1.dylib 
referenced from: 
/Developer/SDKs/MacOSX10.4u.sdk/usr/local/lib/libgdal.dylib (checking 
for undefined symbols may be affected) (No such file or directory, errno 
= 2)
ld: warning can't open dynamic library: 
/Developer/SDKs/MacOSX10.4u.sdk/opt/local/lib/libssl.0.9.8.dylib 
referenced from: 
/Developer/SDKs/MacOSX10.4u.sdk/usr/local/lib/libgdal.dylib (checking 
for undefined symbols may be affected) (No such file or directory, errno 
= 2)
ld: warning can't open dynamic library: 
/Developer/SDKs/MacOSX10.4u.sdk/opt/local/lib/libcrypto.0.9.8.dylib 
referenced from: 
/Developer/SDKs/MacOSX10.4u.sdk/usr/local/lib/libgdal.dylib (checking 
for undefined symbols may be affected) (No such file or directory, errno 
= 2)
ld: warning can't open dynamic library: 
/Developer/SDKs/MacOSX10.4u.sdk/opt/local/lib/libz.1.dylib referenced 
from: /Developer/SDKs/MacOSX10.4u.sdk/usr/local/lib/libgdal.dylib 
(checking for undefined symbols may be affected) (No such file or 
directory, errno = 2)
ld: Undefined symbols:
_crc32 referenced from libgdal expected to be defined in 
/opt/local/lib/libz.1.dylib
_inflateReset referenced from libgdal expected to be defined in 
/opt/local/lib/libz.1.dylib
_inflate referenced from libgdal expected to be defined in 
/opt/local/lib/libz.1.dylib
_inflateEnd referenced from libgdal expected to be defined in 
/opt/local/lib/libz.1.dylib
_inflateInit_ referenced from libgdal expected to be defined in 
/opt/local/lib/libz.1.dylib
_deflate referenced from libgdal expected to be defined in 
/opt/local/lib/libz.1.dylib
_deflateEnd referenced from libgdal expected to be defined in 
/opt/local/lib/libz.1.dylib
_deflateInit2_ referenced from libgdal expected to be defined in 
/opt/local/lib/libz.1.dylib
_deflateReset referenced from libgdal expected to be defined in 
/opt/local/lib/libz.1.dylib
_uncompress referenced from libgdal expected to be defined in 
/opt/local/lib/libz.1.dylib
_deflateInit_ referenced from libgdal expected to be defined in 
/opt/local/lib/libz.1.dylib
_deflateParams referenced from libgdal expected to be defined in 
/opt/local/lib/libz.1.dylib
_inflateSync referenced from libgdal expected to be defined in 
/opt/local/lib/libz.1.dylib
_GEOSGeomToWKB_buf referenced from libgdal expected to be defined in 
/opt/local/lib/libgeos_c.1.dylib
_GEOSGeom_destroy referenced from libgdal expected to be defined in 
/opt/local/lib/libgeos_c.1.dylib
_GEOSGetCentroid referenced from libgdal expected to be defined in 
/opt/local/lib/libgeos_c.1.dylib
_GEOSBoundary referenced from libgdal expected to be defined in 
/opt/local/lib/libgeos_c.1.dylib
_GEOSBuffer referenced from libgdal expected to be defined in 
/opt/local/lib/libgeos_c.1.dylib
_GEOSContains referenced from libgdal expected to be defined in 
/opt/local/lib/libgeos_c.1.dylib
_GEOSConvexHull referenced from libgdal expected to be defined in 
/opt/local/lib/libgeos_c.1.dylib
_GEOSCrosses referenced from libgdal expected to be defined in 
/opt/local/lib/libgeos_c.1.dylib
_GEOSDifference referenced from libgdal expected to be defined in 
/opt/local/lib/libgeos_c.1.dylib
_GEOSDisjoint referenced from libgdal expected to be defined in 
/opt/local/lib/libgeos_c.1.dylib
_GEOSDistance referenced from libgdal expected to be defined in 
/opt/local/lib/libgeos_c.1.dylib
_GEOSGeomFromWKB_buf referenced from libgdal expected to be defined in 
/opt/local/lib/libgeos_c.1.dylib
_GEOSIntersection referenced from libgdal expected to be defined in 
/opt/local/lib/libgeos_c.1.dylib
_GEOSIntersects referenced from libgdal expected to be defined in 
/opt/local/lib/libgeos_c.1.dylib
_GEOSOverlaps referenced from libgdal expected to be defined in 
/opt/local/lib/libgeos_c.1.dylib
_GEOSSymDifference referenced from libgdal expected to be defined in 
/opt/local/lib/libgeos_c.1.dylib
_GEOSTouches referenced from libgdal expected to be defined in 
/opt/local/lib/libgeos_c.1.dylib
_GEOSUnion referenced from libgdal expected to be defined in 
/opt/local/lib/libgeos_c.1.dylib
_GEOSWithin referenced from libgdal expected to be defined in 
/opt/local/lib/libgeos_c.1.dylib
_initGEOS referenced from libgdal expected to be defined in 
/opt/local/lib/libgeos_c.1.dylib
/usr/bin/libtool: internal link edit command failed
make: *** [rgdal.so] Error 1
chmod: 
/Library/Frameworks/R.framework/Versions/2.5/Resources/library/rgdal/libs/ppc/*: 
No such file or directory
ERROR: compilation failed for package 'rgdal'
** Removing 
'/Library/Frameworks/R.framework/Versions/2.5/Resources/library/rgdal'


Any suggestion?

Thanks, luca



More information about the R-SIG-Mac mailing list