GNU bug report logs - #74010
openmpi@5 requires propagated libraries

Previous Next

Package: guix;

Reported by: Andreas Enge <andreas <at> enge.fr>

Date: Fri, 25 Oct 2024 09:38:02 UTC

Severity: normal

To reply to this bug, email your comments to 74010 AT debbugs.gnu.org.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-guix <at> gnu.org:
bug#74010; Package guix. (Fri, 25 Oct 2024 09:38:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Andreas Enge <andreas <at> enge.fr>:
New bug report received and forwarded. Copy sent to bug-guix <at> gnu.org. (Fri, 25 Oct 2024 09:38:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Andreas Enge <andreas <at> enge.fr>
To: bug-guix <at> gnu.org
Subject: openmpi <at> 5 requires propagated libraries
Date: Fri, 25 Oct 2024 11:36:46 +0200
Hello,

when updating openmpi from @4 to @5, my code does not link any more with the
messages:
ld: cannot find -lrdmacm: No such file or directory
ld: cannot find -lefa: No such file or directory
ld: cannot find -libverbs: No such file or directory
ld: cannot find -lpsm2: No such file or directory

Installing rdma-core and psm2 solves the problem.

Here is a way to reproduce the problem:
cd /tmp
tar xvf `guix build -S cm`
cd cm-0.4.3
guix shell --pure openmpi -D cm -- /bin/sh --norc
./configure --enable-mpi
make -j

Hm, I think the culprit is actually libfabric. It has these two packages as
inputs, and contains this in its libfabric.pc:
Libs.private:  -lpsm2 -lrdmacm -libverbs -lefa -latomic -lpthread -ldl

I am not familiar with pkgconfig and do not know what distinguishes the Libs
from the Libs.private field. But the line for linking my binary contains this
in exactly this order:
/gnu/store/0f6bjfrf9kkdqh27y0bab9x9b4i8w5gi-libfabric-1.22.0/lib/libfabric.so -lrdmacm -lefa -libverbs -lpsm2

So this at least confirms the idea that something needs to be done for
libfabric. Propagate its inputs? ldd on libfabric.so shows the required
libraries
   librdmacm.so.1 => /gnu/store/2d...
and so on, so I do not understand what goes wrong.

Andreas





Information forwarded to bug-guix <at> gnu.org:
bug#74010; Package guix. (Fri, 25 Oct 2024 10:33:02 GMT) Full text and rfc822 format available.

Message #8 received at 74010 <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludovic.courtes <at> inria.fr>
To: Andreas Enge <andreas <at> enge.fr>
Cc: 74010 <at> debbugs.gnu.org
Subject: Re: bug#74010: openmpi <at> 5 requires propagated libraries
Date: Fri, 25 Oct 2024 12:31:29 +0200
Hello,

Andreas Enge <andreas <at> enge.fr> skribis:

> when updating openmpi from @4 to @5, my code does not link any more with the
> messages:
> ld: cannot find -lrdmacm: No such file or directory
> ld: cannot find -lefa: No such file or directory
> ld: cannot find -libverbs: No such file or directory
> ld: cannot find -lpsm2: No such file or directory
>
> Installing rdma-core and psm2 solves the problem.
>
> Here is a way to reproduce the problem:
> cd /tmp
> tar xvf `guix build -S cm`

Note that ‘cm’ as currently packaged does not depend on openmpi.

> Hm, I think the culprit is actually libfabric. It has these two packages as
> inputs, and contains this in its libfabric.pc:
> Libs.private:  -lpsm2 -lrdmacm -libverbs -lefa -latomic -lpthread -ldl
>
> I am not familiar with pkgconfig and do not know what distinguishes the Libs
> from the Libs.private field. But the line for linking my binary contains this
> in exactly this order:

It looks like the culprit is not pkg-config but Libtool:

--8<---------------cut here---------------start------------->8---
$ cat $(guix build openmpi <at> 5 |grep -v debug)/lib/libmpi.la |grep ^dependency_libs
dependency_libs=' -L/gnu/store/lqgg509yb3f85ck4k6l0qp7a70bz7daa-libevent-2.1.12/lib -L/gnu/store/j9nkxb0kcx8i6fmjjlg9m5icapdnsvs8-hwloc-2.11.1-lib/lib -L/gnu/store/mqmlzbzarz2s56khlkl7xk20xlsxdf04-openpmix-4.2.8/lib -L/gnu/store/an3mrydqv3x9kzkv45jcay0jh301v06q-libpciaccess-0.16/lib -L/gnu/store/1prv14v6jfnzzg7szm57690b7fr6sx33-zlib-1.3/lib -L/gnu/store/0f6bjfrf9kkdqh27y0bab9x9b4i8w5gi-libfabric-1.22.0/lib -L/gnu/store/0qqy5010by77h33ny3gzmaqx90c93q5v-ucx-1.15.0/lib /gnu/store/1g7npkghs0b25gyk42pgcns8icy29gk3-openmpi-5.0.3/lib/libopen-pal.la /gnu/store/0f6bjfrf9kkdqh27y0bab9x9b4i8w5gi-libfabric-1.22.0/lib/libfabric.la -lrdmacm -lefa -libverbs -lpsm2 /gnu/store/zzpbp6rr43smwxzvzd4qd317z5j7qblj-gcc-11.4.0-lib/lib/libatomic.la -lpthread /gnu/store/0qqy5010by77h33ny3gzmaqx90c93q5v-ucx-1.15.0/lib/libucp.la /gnu/store/0qqy5010by77h33ny3gzmaqx90c93q5v-ucx-1.15.0/lib/libuct.la /gnu/store/0qqy5010by77h33ny3gzmaqx90c93q5v-ucx-1.15.0/lib/libucs.la /gnu/store/0qqy5010by77h33ny3gzmaqx90c93q5v-ucx-1.15.0/lib/libucm.la -lrt /gnu/store/mqmlzbzarz2s56khlkl7xk20xlsxdf04-openpmix-4.2.8/lib/libpmix.la -ldl /gnu/store/lqgg509yb3f85ck4k6l0qp7a70bz7daa-libevent-2.1.12/lib/libevent_core.la /gnu/store/lqgg509yb3f85ck4k6l0qp7a70bz7daa-libevent-2.1.12/lib/libevent_pthreads.la /gnu/store/j9nkxb0kcx8i6fmjjlg9m5icapdnsvs8-hwloc-2.11.1-lib/lib/libhwloc.la -lm /gnu/store/an3mrydqv3x9kzkv45jcay0jh301v06q-libpciaccess-0.16/lib/libpciaccess.la -lz'
$ cat $(guix build openmpi <at> 4 |grep -v debug)/lib/libmpi.la |grep ^dependency_libs
dependency_libs=' -L/gnu/store/an3mrydqv3x9kzkv45jcay0jh301v06q-libpciaccess-0.16/lib -L/gnu/store/1prv14v6jfnzzg7szm57690b7fr6sx33-zlib-1.3/lib /gnu/store/gaip8ig4yv0hx5s60hbka6h8lkh6747y-openmpi-4.1.6/lib/libopen-rte.la /gnu/store/gaip8ig4yv0hx5s60hbka6h8lkh6747y-openmpi-4.1.6/lib/libopen-pal.la /gnu/store/j9nkxb0kcx8i6fmjjlg9m5icapdnsvs8-hwloc-2.11.1-lib/lib/libhwloc.la -lm /gnu/store/an3mrydqv3x9kzkv45jcay0jh301v06q-libpciaccess-0.16/lib/libpciaccess.la -lz /gnu/store/lqgg509yb3f85ck4k6l0qp7a70bz7daa-libevent-2.1.12/lib/libevent_core.la /gnu/store/lqgg509yb3f85ck4k6l0qp7a70bz7daa-libevent-2.1.12/lib/libevent_pthreads.la'
--8<---------------cut here---------------end--------------->8---

We need to check the build process of openmpi to see where all these
extra ‘-l’ in libmpi.la come from.

Thanks,
Ludo’.




Information forwarded to bug-guix <at> gnu.org:
bug#74010; Package guix. (Fri, 25 Oct 2024 10:48:02 GMT) Full text and rfc822 format available.

Message #11 received at 74010 <at> debbugs.gnu.org (full text, mbox):

From: Andreas Enge <andreas <at> enge.fr>
To: Ludovic Courtès <ludovic.courtes <at> inria.fr>
Cc: 74010 <at> debbugs.gnu.org
Subject: Re: bug#74010: openmpi <at> 5 requires propagated libraries
Date: Fri, 25 Oct 2024 12:46:36 +0200
Am Fri, Oct 25, 2024 at 12:31:29PM +0200 schrieb Ludovic Courtès:
> Note that ‘cm’ as currently packaged does not depend on openmpi.

No, because I did not add the "--enable-mpi" configuration option.
This is just an example; I think the problem would occur with any
software using openmpi <at> 5.

Andreas





Information forwarded to bug-guix <at> gnu.org:
bug#74010; Package guix. (Fri, 25 Oct 2024 11:15:02 GMT) Full text and rfc822 format available.

Message #14 received at 74010 <at> debbugs.gnu.org (full text, mbox):

From: Andreas Enge <andreas <at> enge.fr>
To: Ludovic Courtès <ludovic.courtes <at> inria.fr>
Cc: 74010 <at> debbugs.gnu.org
Subject: Re: bug#74010: openmpi <at> 5 requires propagated libraries
Date: Fri, 25 Oct 2024 13:13:26 +0200
Am Fri, Oct 25, 2024 at 12:31:29PM +0200 schrieb Ludovic Courtès:
> It looks like the culprit is not pkg-config but Libtool:
> --8<---------------cut here---------------start------------->8---
> $ cat $(guix build openmpi <at> 5 |grep -v debug)/lib/libmpi.la |grep ^dependency_libs
> dependency_libs='
> ...
> /gnu/store/0f6bjfrf9kkdqh27y0bab9x9b4i8w5gi-libfabric-1.22.0/lib/libfabric.la -lrdmacm -lefa -libverbs -lpsm2 /gnu/store/zzpbp6rr43smwxzvzd4qd317z5j7qblj-gcc-11.4.0-lib/lib/libatomic.la -lpthread

This part comes from libfabric, which has this line in 
/gnu/store/0f6bjfrf9kkdqh27y0bab9x9b4i8w5gi-libfabric-1.22.0/lib/libfabric.la :
dependency_libs=' -lrdmacm -lefa -libverbs -lpsm2 /gnu/store/zzpbp6rr43smwxzvzd4qd317z5j7qblj-gcc-11.4.0-lib/lib/libatomic.la -lpthread -ldl'

But both openmpi <at> 4 and @5 depend on libfabric, so this does not explain
the difference.

Then I do not understand why one of the libraries has an absolute path,
and the others just their name. Maybe something should be changed in
the building of libfabric?

But indeed my code using openmpi <at> 4 does not link with libfabric, as you
noticed, and it works nevertheless.

Andreas





Information forwarded to bug-guix <at> gnu.org:
bug#74010; Package guix. (Fri, 25 Oct 2024 12:25:01 GMT) Full text and rfc822 format available.

Message #17 received at 74010 <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludovic.courtes <at> inria.fr>
To: Andreas Enge <andreas <at> enge.fr>
Cc: 74010 <at> debbugs.gnu.org
Subject: Re: bug#74010: openmpi <at> 5 requires propagated libraries
Date: Fri, 25 Oct 2024 14:23:39 +0200
Andreas Enge <andreas <at> enge.fr> skribis:

> Am Fri, Oct 25, 2024 at 12:31:29PM +0200 schrieb Ludovic Courtès:
>> Note that ‘cm’ as currently packaged does not depend on openmpi.
>
> No, because I did not add the "--enable-mpi" configuration option.
> This is just an example; I think the problem would occur with any
> software using openmpi <at> 5.

Only for software using Libtool.  For example, this works:

  guix build intel-mpi-benchmarks --with-input=openmpi <at> 4=openmpi <at> 5

This particular package uses CMake, which is more common than Autotools
in this domain.

Maybe someday we’ll just remove .la files wholesale, as Debian and
others have been doing for a while.

Ludo’.




This bug report was last modified 230 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.