[Rd] package compile error on RHEL x86_64 - FIXED
danlipsitt at gmail.com
Wed Jun 21 17:37:36 CEST 2006
For the record: The error below has been resolved. As Professor Ripley
said, it was a compiler problem. Upgrading to a more recent gcc rpm
(gcc-3.4.5-2) and its dependencies made the errors go away.
On 6/14/06, Dan Lipsitt <danlipsitt at gmail.com> wrote:
> I am unable to install the gmp package on an x86_64 (Xeon) machine. I
> have had the same problem with other packages (eg. MCMCpack) as well.
> I am running Red Hat Enterprise Linux 4.1.
> I get the following error:
> g++ -shared -L/usr/local/lib64 -o gmp.so biginteger.o
> biginteger_operator.o bigintegerR.o bigrational.o
> bigrational_operator.o bigrationalR.o factor.o -L/usr/local/lib/ -lgmp
> /usr/bin/ld: /usr/lib/gcc/x86_64-redhat-linux/3.4.3/libstdc++.a(functexcept.o):
> relocation R_X86_64_32 against `std::bad_exception::~bad_exception()'
> can not be used when making a shared object; recompile with -fPIC
> /usr/lib/gcc/x86_64-redhat-linux/3.4.3/libstdc++.a: could not read
> symbols: Bad value
> However, I have found that if I run "R CMD SHLIB" twice in the src/
> directory, once to build the .o files, and once to link, I can build
> the shared library. If I run it on the .o files instead of the .cc
> files it uses gcc instead of g++. This appears to be the change that
> allows the lib to build. "-fPIC" seems to have nothing to do with it.
> So my question is: How do I get "R CMD INSTALL" to link with gcc
> instead of g++? I have tried adding "LINK.cc = $(LINK.c)" to the top
> of src/Makevars.in and then running "R CMD check" in the top dir of
> the package, but it uses g++ anyway. Any other fix or workaround
> suggestions would be appreciated as well.
More information about the R-devel