Skip to content

rgdal compile error on RHEL5 [SEC=UNCLASSIFIED]

4 messages · twuest, Roger Bivand

#
Hi all,

I am getting exactly the same error when compiling the latest rgdal (0.7-22)
on RHEL5 (CentOS 5.5) using the gdal v1.8.0 RPM from the elgis repository.

Could anybody resolve this problem?

Thanks,
Thomas

Here are some specs:

gdalinfo --version
GDAL 1.8.0, released 2011/01/12


locate libgdal
/usr/lib/ogdi/libgdal.so
/usr/lib64/libgdal.so
/usr/lib64/libgdal.so.1
/usr/lib64/libgdal.so.1.15.0
/usr/lib64/libgdalconstjni.so
/usr/lib64/libgdalconstjni.so.1
/usr/lib64/libgdalconstjni.so.1.15.0
/usr/lib64/libgdaljni.so
/usr/lib64/libgdaljni.so.1
/usr/lib64/libgdaljni.so.1.15.0
/usr/lib64/ogdi/libgdal.so


/sbin/ldconfig -v | grep gdal
	libgdaljni.so.1 -> libgdaljni.so.1.15.0
	libgdalconstjni.so.1 -> libgdalconstjni.so.1.15.0
	libgdal.so.1 -> libgdal.so.1.15.0


nm -D /usr/lib64/libgdal.so.1.15.0 | grep GDALAllRegister
00000037a70cc3c0 T GDALAllRegister
R version 2.15.2 (2012-10-26)
Platform: x86_64-unknown-linux-gnu (64-bit)

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C              
 [3] LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8    
 [5] LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8   
 [7] LC_PAPER=C                 LC_NAME=C                 
 [9] LC_ADDRESS=C               LC_TELEPHONE=C            
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base
#
On Wed, 14 Nov 2012, twuest wrote:

            
You are the only person with access to relevant information. What your 
"same error" is, only you know - no text from any existing thread is 
included in your message.

(from your nabble footer, it was:

https://stat.ethz.ch/pipermail/r-sig-geo/2012-August/015872.html
https://stat.ethz.ch/pipermail/r-sig-geo/2012-September/016020.html

My advice then was as you can read.

For all systems installing rgdal from source, it is recommended that you 
consider not installing binary external dependencies, but installing them 
from source. All of the Linux GIS packages, be it Debian or RPM, have 
had numerous reported problems. So far, all installation problems on such 
systems have turned out to be problems in the external dependencies of 
rgdal, often multiple installs of GDAL (with the library pointed to by 
gdal-config not being the first such in the search path), or similar.

So this is work for you, nobody else. Using binary packages has advantages 
and disadvantages, you've hit a disadvantage, that "dependency hell" has 
said "hello".

Roger

  
    
#
On Wed, 14 Nov 2012, twuest wrote:

            
You are the only person with access to relevant information. What your 
"same error" is, only you know - no text from any existing thread is 
included in your message.

Th error refers to the one originally posted by Andrew Harley (see above):
When running "R CMD INSTALL rgdal", the installation fails with

...
configure: error: GDALAllRegister not found in libgdal.


For all systems installing rgdal from source, it is recommended that you 
consider not installing binary external dependencies, but installing them 
from source. All of the Linux GIS packages, be it Debian or RPM, have 
had numerous reported problems. So far, all installation problems on such 
systems have turned out to be problems in the external dependencies of 
rgdal, often multiple installs of GDAL (with the library pointed to by 
gdal-config not being the first such in the search path), or similar.


I previously removed the old gdal RPMs, so there should be no 'gdal'
left-overs.

With elgis' gdal-1.7.3-3_0.el5.elgis.x86_64 and rgdal version 0.6-33, things
worked fine.


So this is work for you, nobody else. Using binary packages has advantages 
and disadvantages, you've hit a disadvantage, that "dependency hell" has 
said "hello".


Well, installing from source may resolve one particular problem but
introduces again new dependencies. Beside providing binaries, package
managers and repositories such as 'elgis' for RHEL (and many others) are
helping a lot to resolve exactly this "dependency hell".

Thus, I guess this issue might interest others too.

Thomas
#
On Wed, 14 Nov 2012, twuest wrote:

            
Did you follow my suggestion to the original poster, which was to download 
and unpack the rgdal source package to a local temporary directory, and 
run:

R CMD INSTALL rgdal

and then examine the output to config.*? The problem you are experiencing 
is your problem, so if you need to resolve it, you should commit to doing 
so. Nobody else has your exact combination of system configuration and 
installed binary packages (Linux GIS binary packages are typically used by 
very few systems in the same combination, and are often very out of date).

You have once again edited out important content from my reply. Please do 
not do that - my messages are copyright to me and may not be cut at your 
pleasure. This list is not an adjunct to Nabble - please do not treat it 
as such.

I am still pretty certain that the installation error you are seeing is 
caused by gdal-config not pointing to the directory in shich the *.so file 
is to be found, so an installation muddle on your system. In addition, 
/sbin/ldconfig may not have been run after installing GDAL.

Please do:

R CMD INSTALL rgdal, and examining the contents of the rgdal
directory, specifically the config.log, config.status and errors.txt
files. The final file should record the compiler and linker error
messages.

as I wrote before. I believe that I recollect a message from the original 
poster reporting success after cleaning up muddle, but cannot find it on 
my system now. It certainly wasn't on thread or list, so Nabble has no 
record of the resolution. The configure file in rgdal is intended to trap 
systems that are not configured correctly, and so rgdal is working exactly 
to design here.

Roger