I am having trouble install rgdal. I am using Red Hat Enterprise Linux Server release 5.5 (Tikanga) and having the problem shown below when I try to install rgdal.
I have previously installed rgdal including building gdal from source so I am not new to this but have not previouly installed it on this particular machine. I built gdal 1.7.2 from source (couldn't get it going otherwise) using this configure command: ./configure --with-sqlite3=internal --without-libtool --without-ld-shared --with-expat=/usr/local/lib These commands all run ok so I assume gdal did get installed: gdal_translate --version gdalwarp --formats gdal-config --version All the switches on the above configure seemed to be essential or else it would not build or run. Maybe the problem is that I had to configure it using --without-ld-shared but rgdal uses -shared in its build. How can I change that? Or is there something else I can do? > install.packages("rgdal") ...snip... checking proj_api.h presence... yes checking for proj_api.h... yes checking for pj_init_plus in -lproj... yes ./proj_conf_test: error while loading shared libraries: libproj.so.0: wrong ELF class: ELFCLASS32 ./proj_conf_test: error while loading shared libraries: libproj.so.0: wrong ELF class: ELFCLASS32 Package CPP flags: -I/usr/local/include Package LIBS: /usr/local/lib/libgdal.a -Linternal/lib -lsqlite3 -L/usr/local/lib/lib -lexpat -lgif -ljpeg -ltiff -lpng -lz -lm -lrt -ldl -L/usr/kerberos/lib64 -lcurl -ldl -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err -lidn -lssl -lcrypto -lz configure: creating ./config.status config.status: creating src/Makevars ** libs g++ -m64 -I/usr/include/R -I/usr/local/include -I/usr/local/include -I"/usr/lib64/R/library/sp/include" -fpic -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -c OGR_write.cpp -o OGR_write.o g++ -m64 -I/usr/include/R -I/usr/local/include -I/usr/local/include -I"/usr/lib64/R/library/sp/include" -fpic -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -c gdal-bindings.cpp -o gdal-bindings.o gdal-bindings.cpp: In function ‘SEXPREC* RGDAL_GetRasterData(SEXPREC*, SEXPREC*, SEXPREC*, SEXPREC*)’: gdal-bindings.cpp:1016: warning: unused variable ‘offset’ gcc -m64 -std=gnu99 -I/usr/include/R -I/usr/local/include -I/usr/local/include -I"/usr/lib64/R/library/sp/include" -fpic -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -c local_stubs.c -o local_stubs.o g++ -m64 -I/usr/include/R -I/usr/local/include -I/usr/local/include -I"/usr/lib64/R/library/sp/include" -fpic -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -c ogr_geom.cpp -o ogr_geom.o gcc -m64 -std=gnu99 -I/usr/include/R -I/usr/local/include -I/usr/local/include -I"/usr/lib64/R/library/sp/include" -fpic -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -c ogr_polygons.c -o ogr_polygons.o g++ -m64 -I/usr/include/R -I/usr/local/include -I/usr/local/include -I"/usr/lib64/R/library/sp/include" -fpic -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -c ogr_proj.cpp -o ogr_proj.o g++ -m64 -I/usr/include/R -I/usr/local/include -I/usr/local/include -I"/usr/lib64/R/library/sp/include" -fpic -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -c ogrdrivers.cpp -o ogrdrivers.o g++ -m64 -I/usr/include/R -I/usr/local/include -I/usr/local/include -I"/usr/lib64/R/library/sp/include" -fpic -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -c ogrsource.cpp -o ogrsource.o g++ -m64 -I/usr/include/R -I/usr/local/include -I/usr/local/include -I"/usr/lib64/R/library/sp/include" -fpic -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -c projectit.cpp -o projectit.o projectit.cpp: In function ‘SEXPREC* projInfo(SEXPREC*)’: projectit.cpp:301: warning: ‘ans’ may be used uninitialized in this function g++ -m64 -shared -L/usr/local/lib64 -o rgdal.so OGR_write.o gdal-bindings.o local_stubs.o ogr_geom.o ogr_polygons.o ogr_proj.o ogrdrivers.o ogrsource.o projectit.o /usr/local/lib/libgdal.a -Linternal/lib -lsqlite3 -L/usr/local/lib/lib -lexpat -lgif -ljpeg -ltiff -lpng -lz -lm -lrt -ldl -L/usr/kerberos/lib64 -lcurl -ldl -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err -lidn -lssl -lcrypto -lz -lproj -L/usr/lib64/R/lib -lR /usr/bin/ld: /usr/local/lib/libgdal.a(genbindataset.o): relocation R_X86_64_32 against `a local symbol' can not be used when making a shared object; recompile with -fPIC /usr/local/lib/libgdal.a: could not read symbols: Bad value collect2: ld returned 1 exit status make: *** [rgdal.so] Error 1 ERROR: compilation failed for package ‘rgdal’ * removing ‘/usr/lib64/R/library/rgdal’ The downloaded packages are in ‘/tmp/RtmpglHU18/downloaded_packages’ Updating HTML index of packages in '.Library' Warning message: In install.packages("rgdal") : installation of package 'rgdal' had non-zero exit status _______________________________________________ R-sig-Geo mailing list R-sig-Geo@stat.math.ethz.ch https://stat.ethz.ch/mailman/listinfo/r-sig-geo