[R-sig-Geo] Regarding installation of R package rgdal

Subhash Karemore isubhashmk at outlook.com
Wed Jan 13 10:48:50 CET 2016


Hi,

I am trying to install R package 'rgdal' on SUSE Linux Enterprise Server. However it is failing with compilation error.

Errors:
----------
I/usr/lib64/R/include -DNDEBUG -I/usr/local/include -I/usr/local/include -I"/usr/lib64/R/library/sp/include"      -c OGR_write.cpp -o OGR_write.o
/bin/sh: I/usr/lib64/R/include: No such file or directory
make: [OGR_write.o] Error 127 (ignored)
I/usr/lib64/R/include -DNDEBUG -I/usr/local/include -I/usr/local/include -I"/usr/lib64/R/library/sp/include"      -c gdal-bindings.cpp -o gdal-bindings.o
/bin/sh: I/usr/lib64/R/include: No such file or directory
make: [gdal-bindings.o] Error 127 (ignored)
gcc -std=gnu99 -I/usr/lib64/R/include -DNDEBUG -I/usr/local/include -I/usr/local/include -I"/usr/lib64/R/library/sp/include"   -fpic  -fmessage-length=0 -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables  -c init.c -o init.o
gcc -std=gnu99 -I/usr/lib64/R/include -DNDEBUG -I/usr/local/include -I/usr/local/include -I"/usr/lib64/R/library/sp/include"   -fpic  -fmessage-length=0 -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables  -c local_stubs.c -o local_stubs.o
I/usr/lib64/R/include -DNDEBUG -I/usr/local/include -I/usr/local/include -I"/usr/lib64/R/library/sp/include"      -c ogr_geom.cpp -o ogr_geom.o
/bin/sh: I/usr/lib64/R/include: No such file or directory
make: [ogr_geom.o] Error 127 (ignored)
gcc -std=gnu99 -I/usr/lib64/R/include -DNDEBUG -I/usr/local/include -I/usr/local/include -I"/usr/lib64/R/library/sp/include"   -fpic  -fmessage-length=0 -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables  -c ogr_polygons.c -o ogr_polygons.o
I/usr/lib64/R/include -DNDEBUG -I/usr/local/include -I/usr/local/include -I"/usr/lib64/R/library/sp/include"      -c ogr_proj.cpp -o ogr_proj.o
/bin/sh: I/usr/lib64/R/include: No such file or directory
make: [ogr_proj.o] Error 127 (ignored)
I/usr/lib64/R/include -DNDEBUG -I/usr/local/include -I/usr/local/include -I"/usr/lib64/R/library/sp/include"      -c ogrdrivers.cpp -o ogrdrivers.o
/bin/sh: I/usr/lib64/R/include: No such file or directory
make: [ogrdrivers.o] Error 127 (ignored)
I/usr/lib64/R/include -DNDEBUG -I/usr/local/include -I/usr/local/include -I"/usr/lib64/R/library/sp/include"      -c ogrsource.cpp -o ogrsource.o
/bin/sh: I/usr/lib64/R/include: No such file or directory
make: [ogrsource.o] Error 127 (ignored)
I/usr/lib64/R/include -DNDEBUG -I/usr/local/include -I/usr/local/include -I"/usr/lib64/R/library/sp/include"      -c projectit.cpp -o projectit.o
/bin/sh: I/usr/lib64/R/include: No such file or directory
make: [projectit.o] Error 127 (ignored)
-shared -L/usr/lib64/R/lib -L/usr/local/lib64 -o rgdal.so OGR_write.o gdal-bindings.o init.o local_stubs.o ogr_geom.o ogr_polygons.o ogr_proj.o ogrdrivers.o ogrsource.o projectit.o -L/usr/local/lib -lgdal -lproj -L/usr/lib64/R/lib -lR
/bin/sh: line 2: -shared: command not found
make: *** [rgdal.so] Error 127
ERROR: compilation failed for package 'rgdal'
* removing '/usr/lib64/R/library/rgdal'

The downloaded source packages are in
        '/tmp/Rtmpd0WifB/downloaded_packages'
Updating HTML index of packages in '.Library'
Making 'packages.html' ... done
Warning message:
In install.packages("rgdal", repos = "http://cran.r-project.org") :
  installation of package 'rgdal' had non-zero exit status

However it got installed successfully on openSUSE. Here is the output:
---------------------------------------------------------------------------------------
g++ -std=c++11 -I/usr/lib64/R/include -DNDEBUG -I/usr/include/gdal -I/usr/local/include -I"/usr/lib64/R/library/sp/include"   -fpic  -fmessage-length=0 -grecord-gcc-switches -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -g -c OGR_write.cpp -o OGR_write.o
g++ -std=c++11 -I/usr/lib64/R/include -DNDEBUG -I/usr/include/gdal -I/usr/local/include -I"/usr/lib64/R/library/sp/include"   -fpic  -fmessage-length=0 -grecord-gcc-switches -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -g -c gdal-bindings.cpp -o gdal-bindings.o
gcc -std=gnu99 -I/usr/lib64/R/include -DNDEBUG -I/usr/include/gdal -I/usr/local/include -I"/usr/lib64/R/library/sp/include"   -fpic  -fmessage-length=0 -grecord-gcc-switches -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -g  -c init.c -o init.o
gcc -std=gnu99 -I/usr/lib64/R/include -DNDEBUG -I/usr/include/gdal -I/usr/local/include -I"/usr/lib64/R/library/sp/include"   -fpic  -fmessage-length=0 -grecord-gcc-switches -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -g  -c local_stubs.c -o local_stubs.o
g++ -std=c++11 -I/usr/lib64/R/include -DNDEBUG -I/usr/include/gdal -I/usr/local/include -I"/usr/lib64/R/library/sp/include"   -fpic  -fmessage-length=0 -grecord-gcc-switches -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -g -c ogr_geom.cpp -o ogr_geom.o
gcc -std=gnu99 -I/usr/lib64/R/include -DNDEBUG -I/usr/include/gdal -I/usr/local/include -I"/usr/lib64/R/library/sp/include"   -fpic  -fmessage-length=0 -grecord-gcc-switches -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -g  -c ogr_polygons.c -o ogr_polygons.o
g++ -std=c++11 -I/usr/lib64/R/include -DNDEBUG -I/usr/include/gdal -I/usr/local/include -I"/usr/lib64/R/library/sp/include"   -fpic  -fmessage-length=0 -grecord-gcc-switches -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -g -c ogr_proj.cpp -o ogr_proj.o
g++ -std=c++11 -I/usr/lib64/R/include -DNDEBUG -I/usr/include/gdal -I/usr/local/include -I"/usr/lib64/R/library/sp/include"   -fpic  -fmessage-length=0 -grecord-gcc-switches -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -g -c ogrdrivers.cpp -o ogrdrivers.o
g++ -std=c++11 -I/usr/lib64/R/include -DNDEBUG -I/usr/include/gdal -I/usr/local/include -I"/usr/lib64/R/library/sp/include"   -fpic  -fmessage-length=0 -grecord-gcc-switches -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -g -c ogrsource.cpp -o ogrsource.o
g++ -std=c++11 -I/usr/lib64/R/include -DNDEBUG -I/usr/include/gdal -I/usr/local/include -I"/usr/lib64/R/library/sp/include"   -fpic  -fmessage-length=0 -grecord-gcc-switches -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -g -c projectit.cpp -o projectit.o
g++ -std=c++11 -shared -L/usr/lib64/R/lib -L/usr/local/lib64 -o rgdal.so OGR_write.o gdal-bindings.o init.o local_stubs.o ogr_geom.o ogr_polygons.o ogr_proj.o ogrdrivers.o ogrsource.o projectit.o -L/usr/lib64 -lgdal -lproj -L/usr/lib64/R/lib -lR
installing to /usr/lib64/R/library/rgdal/libs
** R
** data
** inst
** preparing package for lazy loading
** help
*** installing help indices
** building package indices
** installing vignettes
** testing if installed package can be loaded
* DONE (rgdal)

The command I used for installing the package is "install.package('rgdal', repos='http://cran.r-project.org')". I don't know why R package installation is failing on SLES. Even other R packages are getting installed successfully on SLES. It seems that it is not picking gcc compiler on SLES. Could you please let me know, why installation of R package 'rgdal' is failing on SLES? Do I need set anything?

Thanks
Subhash



More information about the R-sig-Geo mailing list