Entering edit mode
Mathe, Ewy NIH/NCI [F]
▴
40
@mathe-ewy-nihnci-f-3124
Last seen 10.2 years ago
Hello,
I am having difficulty trying to install the xcms package for R
64-bit, on a machine running Red Hat Enterprise Linux Server release
5.4. The 32-bit version of R is also installed on there.
Here is what I have done so far:
The package has a dependency, netcdf-4.0.1. I've built this with the
-fPIC flag so that it would be compatible with 64-bit version. So far
so good.
Then I try:
R CMD INSTALL xcms and get the following:
[emathe@helix MySoftware]$ R CMD INSTALL xcms
* Installing to library '/home/emathe/R/i686-pc-linux-gnu-library/2.9'
* Installing *source* package 'xcms' ...
** libs
gcc -std=gnu99 -I/usr/local/R-2.9.1/lib/R/include -I/sw/include
-I/home/emathe/MySoftware/netcdf-4.0.1/include -D_LARGEFILE_SOURCE
-I/usr/local/include -fpic -g -O2 -c base64.c -o base64.o
gcc -std=gnu99 -I/usr/local/R-2.9.1/lib/R/include -I/sw/include
-I/home/emathe/MySoftware/netcdf-4.0.1/include -D_LARGEFILE_SOURCE
-I/usr/local/include -fpic -g -O2 -c mzROI.c -o mzROI.o
gcc -std=gnu99 -I/usr/local/R-2.9.1/lib/R/include -I/sw/include
-I/home/emathe/MySoftware/netcdf-4.0.1/include -D_LARGEFILE_SOURCE
-I/usr/local/include -fpic -g -O2 -c netCDF.c -o netCDF.o
gcc -std=gnu99 -I/usr/local/R-2.9.1/lib/R/include -I/sw/include
-I/home/emathe/MySoftware/netcdf-4.0.1/include -D_LARGEFILE_SOURCE
-I/usr/local/include -fpic -g -O2 -c ramp.c -o ramp.o
gcc -std=gnu99 -I/usr/local/R-2.9.1/lib/R/include -I/sw/include
-I/home/emathe/MySoftware/netcdf-4.0.1/include -D_LARGEFILE_SOURCE
-I/usr/local/include -fpic -g -O2 -c rampR.c -o rampR.o
gcc -std=gnu99 -I/usr/local/R-2.9.1/lib/R/include -I/sw/include
-I/home/emathe/MySoftware/netcdf-4.0.1/include -D_LARGEFILE_SOURCE
-I/usr/local/include -fpic -g -O2 -c util.c -o util.o
gcc -std=gnu99 -I/usr/local/R-2.9.1/lib/R/include -I/sw/include
-I/home/emathe/MySoftware/netcdf-4.0.1/include -D_LARGEFILE_SOURCE
-I/usr/local/include -fpic -g -O2 -c xcms.c -o xcms.o
gcc -std=gnu99 -shared -L/usr/local/lib -o xcms.so base64.o mzROI.o
netCDF.o ramp.o rampR.o util.o xcms.o
-L/home/emathe/MySoftware/netcdf-4.0.1/lib -L/sw/lib -lnetcdf -lz
-L/usr/local/R-2.9.1/lib/R/lib -lR
/usr/bin/ld: /usr/local/lib/libnetcdf.a(attr.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/libnetcdf.a: could not read symbols: Bad value
collect2: ld returned 1 exit status
make: *** [xcms.so] Error 1
ERROR: compilation failed for package 'xcms'
* Removing '/home/emathe/R/i686-pc-linux-gnu-library/2.9/xcms'
* Restoring previous '/home/emathe/R/i686-pc-linux-gnu-
library/2.9/xcms'
So I go into the xcms src and modify the MakeVars as you see below to
reflect that I want to use R64:
PKG_LIBS= -L/home/emathe/MySoftware/netcdf-4.0.1/lib -L/usr/lib64
-L/sw/lib -lnetcdf -lz
PKG_CPPFLAGS= -I/sw/include
-I/home/emathe/MySoftware/netcdf-4.0.1/include -D_LARGEFILE_SOURCE
But that doesn't work, I still get the same error.
So then, I try to run the gcc's by hand, modifying the code as such:
gcc -std=gnu99 -I/usr/local/R-2.9.1-64/lib64/R/include -I/sw/include
-I/home/emathe/MySoftware/netcdf-4.0.1/include -D_LARGEFILE_SOURCE
-I/usr/local/include -fpic -g -O2 -c base64.c -o base64.o
gcc -std=gnu99 -I/usr/local/R-2.9.1-64/lib64/R/include -I/sw/include
-I/home/emathe/MySoftware/netcdf-4.0.1/include -D_LARGEFILE_SOURCE
-I/usr/local/include -fpic -g -O2 -c mzROI.c -o mzROI.o
gcc -std=gnu99 -I/usr/local/R-2.9.1-64/lib64/R/include -I/sw/include
-I/home/emathe/MySoftware/netcdf-4.0.1/include -D_LARGEFILE_SOURCE
-I/usr/local/include -fpic -g -O2 -c netCDF.c -o netCDF.o
gcc -std=gnu99 -I/usr/local/R-2.9.1-64/lib64/R/include -I/sw/include
-I/home/emathe/MySoftware/netcdf-4.0.1/include -D_LARGEFILE_SOURCE
-I/usr/local/include -fpic -g -O2 -c ramp.c -o ramp.o
gcc -std=gnu99 -I/usr/local/R-2.9.1-64/lib64/R/include -I/sw/include
-I/home/emathe/MySoftware/netcdf-4.0.1/include -D_LARGEFILE_SOURCE
-I/usr/local/include -fpic -g -O2 -c rampR.c -o rampR.o
gcc -std=gnu99 -I/usr/local/R-2.9.1-64/lib64/R/include -I/sw/include
-I/home/emathe/MySoftware/netcdf-4.0.1/include -D_LARGEFILE_SOURCE
-I/usr/local/include -fpic -g -O2 -c util.c -o util.o
gcc -std=gnu99 -I/usr/local/R-2.9.1-64/lib64/R/include -I/sw/include
-I/home/emathe/MySoftware/netcdf-4.0.1/include -D_LARGEFILE_SOURCE
-I/usr/local/include -fpic -g -O2 -c xcms.c -o xcms.o
And that works just fine. But, the package is still not installed and
I don't know what to do next.
Can you help?
Thanks,
Ewy
Ewy Mathé, Ph. D.
Bioinformatics Staff Scientist, Laboratory of Human Carcinogenesis
National Cancer Institute, NIH
37 Convent Drive
Building 37, Room 3068
Bethesda, MD 20892-4255
Tel: 301-496-5835
Fax: 301-496-0497
[[alternative HTML version deleted]]