[R] Problem installing rgdal on Mac OS X

Thomas Adams Thomas.Adams at noaa.gov
Thu Apr 5 03:44:03 CEST 2007


Please forgive me for posting this here if it is not appropriate (where 
should this question be posed?)…

I am attempting to install rgdal (from source, since there is no binary) 
on Mac OS X 10.4.9 on a PowerPC G3 Macintosh. I have R version 2.4.1 
(2006-12-18) installed. Following the install directions suggested at:

http://www.sal.uiuc.edu/tools/tools-sum/rgeo/rgeo-detail/map-packages-on-cran

The Mac OS X Frameworks packages were obtained from: 
http://www.kyngchaos.com/software/unixport

Using R CMD INSTALL in a term window I have:

R CMD INSTALL rgdal_0.5-6.tar.gz 
--configure-args='--with-gdal-config=/Library/Frameworks/GDAL.framework/Versions/1.4/Programs/gdal-config 
--with-proj-include=/Library/Frameworks/PROJ.framework/Versions/4.5/Headers 
--with-proj-lib=/Library/Frameworks/PROJ.framework/Versions/4.5/unix/lib'

which produces the following output:

* Installing *source* package 'rgdal' ...
gdal-config: 
/Library/Frameworks/GDAL.framework/Versions/1.4/Programs/gdal-config
checking for gcc... gcc-4.0 -arch ppc -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 -std=gnu99 accepts -g... yes
checking for gcc-4.0 -arch ppc -std=gnu99 option to accept ANSI C... 
none needed
checking how to run the C preprocessor... gcc-4.0 -arch ppc -std=gnu99 -E
checking 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/Library/Frameworks/PROJ.framework/Versions/4.5/Headers 
-I/Library/Frameworks/GDAL.framework/unix/include
Package LIBS: -L/Library/Frameworks/PROJ.framework/Versions/4.5/unix/lib 
-L/Library/Frameworks/GDAL.framework/unix/lib -lgdal
configure: creating ./config.status
config.status: creating src/Makevars
** libs
** arch - ppc
g++-4.0 -arch ppc -I/Library/Frameworks/R.framework/Resources/include 
-I/Library/Frameworks/R.framework/Resources/include/ppc 
-I/Library/Frameworks/PROJ.framework/Versions/4.5/Headers 
-I/Library/Frameworks/GDAL.framework/unix/include -I/usr/local/include 
-fPIC -g -O2 -c OGR_write.cpp -o OGR_write.o
g++-4.0 -arch ppc -I/Library/Frameworks/R.framework/Resources/include 
-I/Library/Frameworks/R.framework/Resources/include/ppc 
-I/Library/Frameworks/PROJ.framework/Versions/4.5/Headers 
-I/Library/Frameworks/GDAL.framework/unix/include -I/usr/local/include 
-fPIC -g -O2 -c gdal-bindings.cpp -o gdal-bindings.o
g++-4.0 -arch ppc -I/Library/Frameworks/R.framework/Resources/include 
-I/Library/Frameworks/R.framework/Resources/include/ppc 
-I/Library/Frameworks/PROJ.framework/Versions/4.5/Headers 
-I/Library/Frameworks/GDAL.framework/unix/include -I/usr/local/include 
-fPIC -g -O2 -c ogr_geom.cpp -o ogr_geom.o
g++-4.0 -arch ppc -I/Library/Frameworks/R.framework/Resources/include 
-I/Library/Frameworks/R.framework/Resources/include/ppc 
-I/Library/Frameworks/PROJ.framework/Versions/4.5/Headers 
-I/Library/Frameworks/GDAL.framework/unix/include -I/usr/local/include 
-fPIC -g -O2 -c ogr_proj.cpp -o ogr_proj.o
g++-4.0 -arch ppc -I/Library/Frameworks/R.framework/Resources/include 
-I/Library/Frameworks/R.framework/Resources/include/ppc 
-I/Library/Frameworks/PROJ.framework/Versions/4.5/Headers 
-I/Library/Frameworks/GDAL.framework/unix/include -I/usr/local/include 
-fPIC -g -O2 -c ogrdrivers.cpp -o ogrdrivers.o
g++-4.0 -arch ppc -I/Library/Frameworks/R.framework/Resources/include 
-I/Library/Frameworks/R.framework/Resources/include/ppc 
-I/Library/Frameworks/PROJ.framework/Versions/4.5/Headers 
-I/Library/Frameworks/GDAL.framework/unix/include -I/usr/local/include 
-fPIC -g -O2 -c ogrsource.cpp -o ogrsource.o
g++-4.0 -arch ppc -I/Library/Frameworks/R.framework/Resources/include 
-I/Library/Frameworks/R.framework/Resources/include/ppc 
-I/Library/Frameworks/PROJ.framework/Versions/4.5/Headers 
-I/Library/Frameworks/GDAL.framework/unix/include -I/usr/local/include 
-fPIC -g -O2 -c projectit.cpp -o projectit.o
g++-4.0 -arch ppc -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/Library/Frameworks/PROJ.framework/Versions/4.5/unix/lib 
-L/Library/Frameworks/GDAL.framework/unix/lib -lgdal -lproj 
-L/Library/Frameworks/R.framework/Resources/lib/ppc -lR -dylib_file 
libRblas.dylib:/Library/Frameworks/R.framework/Resources/lib/ppc/libRblas.dylib
/usr/bin/libtool: unknown option character `m' in: -macosx_version_min
Usage: /usr/bin/libtool -static [-] file [...] [-filelist 
listfile[,dirname]] [-arch_only arch] [-sacLT]
Usage: /usr/bin/libtool -dynamic [-] file [...] [-filelist 
listfile[,dirname]] [-arch_only arch] [-o output] [-install_name name] 
[-compatibility_version #] [-current_version #] [-seg1addr 0x#] 
[-segs_read_only_addr 0x#] [-segs_read_write_addr 0x#] [-seg_addr_table 
<filename>] [-seg_addr_table_filename <file_system_path>] [-all_load] 
[-noall_load]
make: *** [rgdal.so] Error 1
chmod: 
/Library/Frameworks/R.framework/Versions/2.4/Resources/library/rgdal/libs/ppc/*: 
No such file or directory
ERROR: compilation failed for package 'rgdal'
** Removing 
'/Library/Frameworks/R.framework/Versions/2.4/Resources/library/rgdal'

Are there any suggestions? I have tried this on two different machines 
with the same result.

Regards,
Tom

-- 
Thomas E Adams
National Weather Service
Ohio River Forecast Center
1901 South State Route 134
Wilmington, OH 45177

EMAIL:	thomas.adams at noaa.gov

VOICE:	937-383-0528
FAX:	937-383-0033



More information about the R-help mailing list