Boost logo

Boost Users :

From: Juergen Hunold (juergen.hunold_at_[hidden])
Date: 2008-05-26 06:00:08


Hi !

On Sunday 25 May 2008, Ransom Briggs wrote:
> Hello,
>
> Here are the problems that I've had trying to get Boost.MPI and
> MPICH2 to work together (I've had these problems with both
> boost_1_35_0 and the CVS Boost versions)

CVS ? Sounds strange :-))

> gcc.link.dll
> bin.v2/libs/mpi/build/gcc-4.1.2/release/threading-multi/libboost_mpi-
>gcc41-mt-1_35.so.1.35.0
> /usr/lib/gcc/x86_64-pc-linux-gnu/4.1.2/../../../../x86_64-pc-linux-gn
>u/bin/ld: /opt/mpich/lib/libmpich.a(attr_get.o): relocation
> R_X86_64_32 against `a local symbol' can not be used when making a
> shared object; recompile with -fPIC
> /opt/mpich/lib/libmpich.a: could not read symbols: Bad value
> collect2: ld returned 1 exit status

*sigh* Which distribution ? I've got this one on SuSE-10.3.

The problem is that "libmpich.a" is not compiled with -fPIC. This leads
to the compiler warning above. Yes, you must compile _static_ library
sources with -fPIC on x86_64.

> I'm unsure of where to fix this at, where should I add this?

Blame your distribution vendor.
Or compile mpi from scratch.

For the record: Boost.Build adds -fPIC for all compilations (shared and
static) due to this gcc behaviour.

Yours,

Jürgen

-- 
* Dipl.-Math. Jürgen Hunold       ! Ingenieurgesellschaft für 
* voice: ++49 511 262926 57       ! Verkehrs- und Eisenbahnwesen mbH  
* fax  : ++49 511 262926 99       ! Lister Straße 15
* juergen.hunold_at_[hidden]        ! www.ivembh.de
* 
* Geschäftsführer:                ! Sitz des Unternehmens: Hannover
* Prof. Dr.-Ing. Thomas Siefer    ! Amtsgericht Hannover, HRB 56965
* PD Dr.-Ing. Alfons Radtke       !

Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net