* bug#74010: openmpi@5 requires propagated libraries
@ 2024-10-25 9:36 Andreas Enge
2024-10-25 10:31 ` Ludovic Courtès
0 siblings, 1 reply; 5+ messages in thread
From: Andreas Enge @ 2024-10-25 9:36 UTC (permalink / raw)
To: 74010
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
^ permalink raw reply [flat|nested] 5+ messages in thread
* bug#74010: openmpi@5 requires propagated libraries
2024-10-25 9:36 bug#74010: openmpi@5 requires propagated libraries Andreas Enge
@ 2024-10-25 10:31 ` Ludovic Courtès
2024-10-25 10:46 ` Andreas Enge
2024-10-25 11:13 ` Andreas Enge
0 siblings, 2 replies; 5+ messages in thread
From: Ludovic Courtès @ 2024-10-25 10:31 UTC (permalink / raw)
To: Andreas Enge; +Cc: 74010
Hello,
Andreas Enge <andreas@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@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@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’.
^ permalink raw reply [flat|nested] 5+ messages in thread
* bug#74010: openmpi@5 requires propagated libraries
2024-10-25 10:31 ` Ludovic Courtès
@ 2024-10-25 10:46 ` Andreas Enge
2024-10-25 12:23 ` Ludovic Courtès
2024-10-25 11:13 ` Andreas Enge
1 sibling, 1 reply; 5+ messages in thread
From: Andreas Enge @ 2024-10-25 10:46 UTC (permalink / raw)
To: Ludovic Courtès; +Cc: 74010
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@5.
Andreas
^ permalink raw reply [flat|nested] 5+ messages in thread
* bug#74010: openmpi@5 requires propagated libraries
2024-10-25 10:31 ` Ludovic Courtès
2024-10-25 10:46 ` Andreas Enge
@ 2024-10-25 11:13 ` Andreas Enge
1 sibling, 0 replies; 5+ messages in thread
From: Andreas Enge @ 2024-10-25 11:13 UTC (permalink / raw)
To: Ludovic Courtès; +Cc: 74010
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@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@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@4 does not link with libfabric, as you
noticed, and it works nevertheless.
Andreas
^ permalink raw reply [flat|nested] 5+ messages in thread
* bug#74010: openmpi@5 requires propagated libraries
2024-10-25 10:46 ` Andreas Enge
@ 2024-10-25 12:23 ` Ludovic Courtès
0 siblings, 0 replies; 5+ messages in thread
From: Ludovic Courtès @ 2024-10-25 12:23 UTC (permalink / raw)
To: Andreas Enge; +Cc: 74010
Andreas Enge <andreas@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@5.
Only for software using Libtool. For example, this works:
guix build intel-mpi-benchmarks --with-input=openmpi@4=openmpi@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’.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2024-10-25 12:24 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-25 9:36 bug#74010: openmpi@5 requires propagated libraries Andreas Enge
2024-10-25 10:31 ` Ludovic Courtès
2024-10-25 10:46 ` Andreas Enge
2024-10-25 12:23 ` Ludovic Courtès
2024-10-25 11:13 ` Andreas Enge
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.