[STATSGRASS] Re: spgrass6 compile problem
Thomas Adams
Thomas.Adams at noaa.gov
Wed Oct 17 08:09:01 EDT 2007
Roger,
Thank you very much for your suggestions. rgdal did fail to load into R.
It turns out that the version of g++ is 3.4.4 implying some kind of
mismatch between it and the shared library ../gcc_shlibs/libgcc_s.so.1,
which I believe is unused anyhow. So, I simply moved it to another name.
Can't see that that has caused any problems.
Anyhow, I have re-compiled gdal, R 2.6.0, sp, and rgdal and now I am
getting the following message, which is even more perplexing to me:
> library(rgdal)
Error in dyn.load(file, ...) :
unable to load shared library
'/awips/rep/lx/local_apps/R.dir/lib/R/library/rgdal/libs/rgdal.so':
/awips/rep/lx/local_apps/R.dir/lib/R/library/rgdal/libs/rgdal.so:
undefined symbol: OGR_G_GetY
Error: package/namespace load failed for 'rgdal'
which seems to imply (I think) that rgdal is not finding gdal when
trying to load; is this correct?
Regards,
Tom
Roger Bivand wrote:
> On Tue, 16 Oct 2007, Thomas Adams wrote:
>
>> Roger,
>>
>> I am trying to compile spgrass6 on a Linux system with R 2.6.0. I
>> have compiled all the dependencies without problems, but I am getting:
>>
>> xt4-tir:adams> R CMD INSTALL spgrass6_0.4-3.tar.gz
>> * Installing to library '/awips/rep/lx/local_apps/R.dir/lib/R/library'
>> * Installing *source* package 'spgrass6' ...
>> ** R
>> ** inst
>> ** preparing package for lazy loading
>> Loading required package: sp
>> Loading required package: maptools
>> Loading required package: foreign
>> Loading required package: rgdal
>> Error in dyn.load(file, ...) :
>> unable to load shared library
>> '/awips/rep/lx/local_apps/R.dir/lib/R/library/rgdal/libs/rgdal.so':
>> /awips/hydro/lx/gcc_shlibs/libgcc_s.so.1: version `GCC_3.3' not found
>> (required by /usr/lib/libstdc++.so.6)
>> Error: package 'rgdal' could not be loaded
>> Execution halted
>> ERROR: lazy loading failed for package 'spgrass6'
>> ** Removing '/awips/rep/lx/local_apps/R.dir/lib/R/library/spgrass6'
>> ** Restoring previous
>> '/awips/rep/lx/local_apps/R.dir/lib/R/library/spgrass6'
>>
>> I don't understand this:
>>
>> /awips/hydro/lx/gcc_shlibs/libgcc_s.so.1: version `GCC_3.3' not found
>> (required by /usr/lib/libstdc++.so.6)
>>
>> Do you have any insights? I have previously compiled spgrass6 without
>> problems. But we have had some system changes since that time. System
>> requirements force me to install in a non-standard location.
>
> What happens if you start R, say library(rgdal), and try to do - say -
> example(readGDAL)? If the same happens, then most likely rgdal was
> installed before the system upgrade, and you now have g++4, meaning
> that the dependencies of rgdal (or GDAL as a whole) are no longer met.
>
> If library(rgdal) fails as I suspect, you'll need to re-install it:
>
> install.packages("rgdal")
>
> ought to be enough, though GDAL may also need to be re-installed (all
> C++ programs are sensitive to build train upgrades, much more so than
> C programs). You may also do
>
> update.packages(checkBuilt=TRUE)
>
> which will freshen all the installed packages built with R < 2.6.
>
> If rgdal itself works, then sorry, no idea. Maybe somebody on the list
> (STATGRASS, R-sig-geo) may have seen something similar. How were R and
> GDAL installed, from source? What does g++ -v say?
>
> Roger
>
>
>>
>> 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 grass-stats
mailing list