[R-sig-Geo] Building rgdal 0.6-7 on Mac

Roger Bivand Roger.Bivand at nhh.no
Mon Apr 20 20:59:02 CEST 2009


On Mon, 20 Apr 2009, Corey Sparks wrote:

> Dear list,
> I've just built my new version of R 2.9.0 and installed my packages.
>
>> sessionInfo()
> R version 2.9.0 Patched (2009-04-20 r48365)
> i386-apple-darwin9.6.0
>
> locale:
> C
>
> attached base packages:
> [1] stats     graphics  grDevices datasets  utils     methods   base
>
>
> I use rgdal for reading and writing raster data but when I try to install 
> version 0.6-7 (I already have 0.6-5 installed) from source, I get an error.

Was 0.6-5 built with R 2.8.1? If you feel like taking risks, please try to 
see whether installing rgdal_0.6-5 under R 2.9.0 provokes the same 
problem. Have you tried asking on R-sig-mac - the changes from 0.6-5 to 
0.6-7 were very small (a "[" subsetting operation with an omitted 
drop=FALSE)?

See for example:

http://rgdal.cvs.sourceforge.net/viewvc/rgdal/rgdal/R/sp_gdal.R?r1=1.30&r2=1.31

Nothing there should trigger problems, so I'd look to see whether there is 
something platform and/or R release related.

On Linux i386 and x86_64, and Windows i386, everything looks OK.

Roger

> I have installed all of the external dependencies (GDAL, PROJ4, etc) and 
> think I am specifying the installation command correctly.  I have 
> rgdal_0.6-7.tar.gz in my home directory, here is my command
>
> R --arch=x86_64 CMD INSTALL rgdal_0.6-7.tar.gz 
> --configure-args='--with-gdal-config=/Library/Frameworks/GDAL.framework/Versions/1.6/Programs/gdal-config 
> --with-proj-lib=/Library/Frameworks/PROJ.framework/Versions/4.6/unix/lib 
> --with-proj-include=/Library/Frameworks/PROJ.framework/Versions/4.6/Headers' 
> rgdal_0.6-7.tar.gz
>
> Here is what happens: Please forgive the voluminous output.
>
> * Installing to library '/Library/Frameworks/R.framework/Resources/library'
> * Installing *source* package 'rgdal' ...
> gdal-config: 
> /Library/Frameworks/GDAL.framework/Versions/1.6/Programs/gdal-config
> checking for gcc... gcc -arch x86_64 -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 -arch x86_64 -std=gnu99 accepts -g... yes
> checking for gcc -arch x86_64 -std=gnu99 option to accept ANSI C... none 
> needed
> checking how to run the C preprocessor... gcc -arch x86_64 -std=gnu99 -E
> checking for egrep... grep -E
> checking for ANSI C header files... rm: conftest.dSYM: is a directory
> rm: conftest.dSYM: is a directory
> 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.6/Headers 
> -I/Library/Frameworks/GDAL.framework/Versions/1.6/Headers
> Package LIBS:  -L/Library/Frameworks/PROJ.framework/Versions/4.6/unix/lib 
> -L/Library/Frameworks/GDAL.framework/Versions/1.6/unix/lib -lgdal
> configure: creating ./config.status
> config.status: creating src/Makevars
> ** libs
> ** arch - x86_64
> g++ -arch x86_64 -I/Library/Frameworks/R.framework/Resources/include 
> -I/Library/Frameworks/R.framework/Resources/include/x86_64 
> -I/Library/Frameworks/PROJ.framework/Versions/4.6/Headers 
> -I/Library/Frameworks/GDAL.framework/Versions/1.6/Headers 
> -I/usr/local/include    -fPIC  -g -O2 -c OGR_write.cpp -o OGR_write.o
> g++ -arch x86_64 -I/Library/Frameworks/R.framework/Resources/include 
> -I/Library/Frameworks/R.framework/Resources/include/x86_64 
> -I/Library/Frameworks/PROJ.framework/Versions/4.6/Headers 
> -I/Library/Frameworks/GDAL.framework/Versions/1.6/Headers 
> -I/usr/local/include    -fPIC  -g -O2 -c gdal-bindings.cpp -o gdal-bindings.o
> g++ -arch x86_64 -I/Library/Frameworks/R.framework/Resources/include 
> -I/Library/Frameworks/R.framework/Resources/include/x86_64 
> -I/Library/Frameworks/PROJ.framework/Versions/4.6/Headers 
> -I/Library/Frameworks/GDAL.framework/Versions/1.6/Headers 
> -I/usr/local/include    -fPIC  -g -O2 -c ogr_geom.cpp -o ogr_geom.o
> g++ -arch x86_64 -I/Library/Frameworks/R.framework/Resources/include 
> -I/Library/Frameworks/R.framework/Resources/include/x86_64 
> -I/Library/Frameworks/PROJ.framework/Versions/4.6/Headers 
> -I/Library/Frameworks/GDAL.framework/Versions/1.6/Headers 
> -I/usr/local/include    -fPIC  -g -O2 -c ogr_proj.cpp -o ogr_proj.o
> g++ -arch x86_64 -I/Library/Frameworks/R.framework/Resources/include 
> -I/Library/Frameworks/R.framework/Resources/include/x86_64 
> -I/Library/Frameworks/PROJ.framework/Versions/4.6/Headers 
> -I/Library/Frameworks/GDAL.framework/Versions/1.6/Headers 
> -I/usr/local/include    -fPIC  -g -O2 -c ogrdrivers.cpp -o ogrdrivers.o
> g++ -arch x86_64 -I/Library/Frameworks/R.framework/Resources/include 
> -I/Library/Frameworks/R.framework/Resources/include/x86_64 
> -I/Library/Frameworks/PROJ.framework/Versions/4.6/Headers 
> -I/Library/Frameworks/GDAL.framework/Versions/1.6/Headers 
> -I/usr/local/include    -fPIC  -g -O2 -c ogrsource.cpp -o ogrsource.o
> g++ -arch x86_64 -I/Library/Frameworks/R.framework/Resources/include 
> -I/Library/Frameworks/R.framework/Resources/include/x86_64 
> -I/Library/Frameworks/PROJ.framework/Versions/4.6/Headers 
> -I/Library/Frameworks/GDAL.framework/Versions/1.6/Headers 
> -I/usr/local/include    -fPIC  -g -O2 -c projectit.cpp -o projectit.o
> g++ -arch x86_64 -dynamiclib -Wl,-headerpad_max_install_names -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.6/unix/lib 
> -L/Library/Frameworks/GDAL.framework/Versions/1.6/unix/lib -lgdal -lproj 
> -F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework 
> -Wl,CoreFoundation
> ** R
> ** inst
> ** preparing package for lazy loading
> ** help
> *** installing help indices
>>>> Building/Updating help pages for package 'rgdal'
>    Formats: text html latex example
> CRS-class                         text    html    latex   example
> GDALDataset-class                 text    html    latex
> GDALDriver-class                  text    html    latex   example
> GDALMajorObject-class             text    html    latex   example
> GDALRasterBand-class              text    html    latex   example
> GDALReadOnlyDataset-class         text    html    latex   example
> GDALReadOnlyDataset-methods       text    html    latex   example
> GDALTransientDataset-class        text    html    latex   example
> RGB2PCT                           text    html    latex   example
> SGDF2PCT                          text    html    latex   example
> SpatialGDAL-class                 text    html    latex   example
> closeDataset-methods              text    html    latex
> displayDataset                    text    html    latex   example
> make_EPSG                         text    html    latex   example
> projInfo                          text    html    latex   example
> project                           text    html    latex   example
> readGDAL                          text    html    latex   example
> readOGR                           text    html    latex   example
> showWKT                           text    html    latex   example
> spTransform-methods               text    html    latex   example
> writeOGR                          text    html    latex   example
> ** building package indices ...
> * DONE (rgdal)
>
> * Installing *source* package 'rgdal' ...
> mv: rename /Library/Frameworks/R.framework/Resources/library/rgdal to 
> /Library/Frameworks/R.framework/Resources/library/00LOCK/rgdal/rgdal: 
> Directory not empty
> gdal-config: 
> /Library/Frameworks/GDAL.framework/Versions/1.6/Programs/gdal-config
> checking for gcc... gcc -arch x86_64 -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 -arch x86_64 -std=gnu99 accepts -g... yes
> checking for gcc -arch x86_64 -std=gnu99 option to accept ANSI C... none 
> needed
> checking how to run the C preprocessor... gcc -arch x86_64 -std=gnu99 -E
> checking for egrep... grep -E
> checking for ANSI C header files... rm: conftest.dSYM: is a directory
> rm: conftest.dSYM: is a directory
> 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.6/Headers 
> -I/Library/Frameworks/GDAL.framework/Versions/1.6/Headers
> Package LIBS:  -L/Library/Frameworks/PROJ.framework/Versions/4.6/unix/lib 
> -L/Library/Frameworks/GDAL.framework/Versions/1.6/unix/lib -lgdal
> configure: creating ./config.status
> config.status: creating src/Makevars
> ** libs
> ** arch - x86_64
> make: Nothing to be done for `all'.
> ** R
> ** inst
> ** preparing package for lazy loading
> Error in nchar(filename) : element 1 is empty;
>  the part of the args list of '.Internal' being evaluated was:
>  (x, type, allowNA)
> Error : unable to load R code in package 'rgdal'
> ERROR: lazy loading failed for package 'rgdal'
> * Removing '/Library/Frameworks/R.framework/Resources/library/rgdal'
> * Restoring previous 
> '/Library/Frameworks/R.framework/Resources/library/rgdal'
>
> Any thoughts would be greatly appreciated.  Thanks
> Corey
>
> Corey Sparks
> Assistant Professor
> Department of Demography and Organization Studies
> University of Texas at San Antonio
> One UTSA Circle
> San Antonio, TX 78249
> 210 458 6858
> corey.sparks 'at' utsa.edu
>
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo at stat.math.ethz.ch
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo

-- 
Roger Bivand
Economic Geography Section, Department of Economics, Norwegian School of
Economics and Business Administration, Helleveien 30, N-5045 Bergen,
Norway. voice: +47 55 95 93 55; fax +47 55 95 95 43
e-mail: Roger.Bivand at nhh.no



More information about the R-sig-Geo mailing list