[R-sig-hpc] Problem compiling Rmpi on Linux

Hao Yu hyu at stats.uwo.ca
Mon Dec 8 19:24:59 CET 2008


Make sure when you are compiling LAM to use --enable-shared in configure.
Somehow LAM creates static lib as default and Rmpi needs dynamic lib to
work.

Hao

Blanchette, Marco wrote:
> Dear list,
>
> I am trying without success to install the Rmpi package on our large
> computing cluster but it keeps failing at compilation time. The machine
> is:
> bash-3.2$ uname -a
> Linux cluster04 2.6.18-53.el5 x86_64 x86_64 x86_64 GNU/Linux
>
> I have downloaded and successfully installed LAM-MPI under $HOME.
>
> If I try to install the Rmpi package by
> $  R CMD INSTALL Rmpi --configure-args=--with-mpi=$HOME
>
> I am getting the following error at compilation time (I also put the full
> transcript of the instalation at the end of this message).
> /usr/bin/ld: /home/mab/lib/libmpi.a(recv.o): relocation R_X86_64_32
> against `a local symbol' can not be used when making a shared object;
> recompile with -fPIC
> /home/mab/lib/libmpi.a: could not read symbols: Bad value
>
> Any help to resolve that issue would be greatly appreciated.
>
> Thanks
>
> Marco
>
>
> ---Instalation transcript ---
> mab cluster04 ~/src$ R CMD INSTALL Rmpi --configure-args=--with-mpi=$HOME
> * Installing to library '/home/mab/RLibrary'
> * Installing *source* package 'Rmpi' ...
> checking for gcc... gcc
> checking for C compiler default output file name... a.out
> checking whether the C compiler works... yes
> checking whether we are cross compiling... no
> checking for suffix of executables...
> checking for suffix of object files... o
> checking whether we are using the GNU C compiler... yes
> checking whether gcc accepts -g... yes
> checking for gcc option to accept ISO C89... none needed
> Try to find mpi.h ...
> Found in /home/mab/include
> Try to find libmpi.so or libmpich.a
> checking for main in -lmpi... yes
> Try to find liblam.so ...
> checking for main in -llam... yes
> checking for openpty in -lutil... yes
> checking for main in -lpthread... yes
> configure: creating ./config.status
> config.status: creating src/Makevars
> ** libs
> gcc -std=gnu99 -shared -L/usr/local/lib64 -o Rmpi.so RegQuery.o Rmpi.o
> conversion.o internal.o -L/home/mab/lib -lmpi -llam -lutil -lpthread -fPIC
>   -L/n/site/inst/Linux-x86_64/bioinfo/R/2.8.0/lib64/R/lib -lR
> /usr/bin/ld: /home/mab/lib/libmpi.a(recv.o): relocation R_X86_64_32
> against `a local symbol' can not be used when making a shared object;
> recompile with -fPIC
> /home/mab/lib/libmpi.a: could not read symbols: Bad value
> collect2: ld returned 1 exit status
> make: *** [Rmpi.so] Error 1
> chmod: cannot access `/home/mab/RLibrary/Rmpi/libs/*': No such file or
> directory
> ERROR: compilation failed for package 'Rmpi'
> ** Removing '/home/mab/RLibrary/Rmpi'
> --
> Marco Blanchette, Ph.D.
> Assistant Investigator
> Stowers Institute for Medical Research
> 1000 East 50th St.
>
> Kansas City, MO 64110
>
> Tel: 816-926-4071
> Cell: 816-726-8419
> Fax: 816-926-2018
>
> _______________________________________________
> R-sig-hpc mailing list
> R-sig-hpc at r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-hpc
>


-- 
Department of Statistics & Actuarial Sciences
Fax Phone#:(519)-661-3813
The University of Western Ontario
Office Phone#:(519)-661-3622
London, Ontario N6A 5B7
http://www.stats.uwo.ca/faculty/yu



More information about the R-sig-hpc mailing list