Boost logo

Boost-Build :

Subject: Re: [Boost-build] Translating mpicxx output into command line args
From: Vladimir Prus (ghost_at_[hidden])
Date: 2009-11-27 14:29:05


On Friday 27 November 2009 22:20:10 K. Noel Belcourt wrote:

> Hi,
>
> I've attached part of the bjam.log output from nightly trunk tests to
> demonstrate a problem with how the build system translates mpicxx -
> show output into Boost-build link line arguments.
>
> [ output from mpicxx -show ]
>
> <linkflags>-Wl,-rpath <linkflags>-Wl,/home/sntools/extras/mpi/
> mpich-1.2.7p1-gcc-4.4.1-64Bit/lib <linkflags>-Wl,-rpath <linkflags>-
> Wl,/home/sntools/extras/compilers/gcc-4.4.1/lib64
> <linkflags>-Wl,-rpath <linkflags>-Wl,/home/sntools/extras/compilers/
> gcc-4.4.1/lib
>
> The mpicxx output is not correctly translated into link line
> arguments by Boost-build. Here you can see that the above mpicxx -
> show output is converted to these invalid link line arguments.
>
> -Wl,-rpath -Wl,/home/sntools/extras/compilers/gcc-4.4.1/lib -Wl,/home/
> sntools/extras/compilers/gcc-4.4.1/lib64 -Wl,/home/sntools/extras/mpi/
> mpich-1.2.7p1-gcc-4.4.1-64Bit/lib
>
> Notice the missing -Wl,-rpath before the second and third library
> paths (plus the secondary issue that the library search directories
> have been reordered). A fair number of MPI tests fail because of
> this error. Does anyone know of a clever way to fix this?

Does the following help? It should generate a single <linkflags>
feature that is more direct. I don't seem to have this problem,
so cannot immediate test.

- Volodya

Index: mpi.jam
===================================================================
--- mpi.jam (revision 57791)
+++ mpi.jam (working copy)
@@ -218,7 +218,7 @@
     if $(otherflags) {
        for unknown in $(unknown-features)
        {
- result += "$(unknown)$(otherflags)" ;
+ result += "$(unknown)$(otherflags:J= )" ;
        }
     }


Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk