Pierre Neidhardt <ambre...@gmail.com> skribis:

>> Could you paste the excerpt from that log that shows the command that
>> produced libdevmapper-event-lvm2mirror.so?
>>
>> It may be a matter of adding -ldevmapper to that command (which in turn
>> will lead ld-wrapper to add the right -Wl,-rpath flag.)
>
> Done, here is the result:
>
>> env GUIX_LD_WRAPPER_DEBUG=yes make

[...]

> make[4]: Entering directory 
> '/tmp/guix-build-lvm2-2.02.177.drv-0/LVM2.2.02.177/daemons/dmeventd/plugins/mirror'
> gcc -shared -Wl,-soname,libdevmapper-event-lvm2mirror.so.2.02 \
>       -O2  -fPIC -L../../../../daemons/dmeventd/plugins/lvm2 
> -Wl,--version-script,.export.sym -Wl,-z,relro -L../../../../libdm 
> -L../../../../lib -L../../../../libdaemon/client 
> -L../../../../daemons/dmeventd dmeventd_mirror.o   -ldevmapper-event-lvm2 
> -ldevmapper -o libdevmapper-event-lvm2mirror.so.2.02

[...]

> There does not seem to be any "-rpath" towards the output.

Indeed.  So I think you need to modify
‘daemons/dmeventd/plugins/mirror/Makefile’ or otherwise arrange to have
‘-Wl,-rpath=OUT/lib’ passed when linking
libdevmapper-event-lvm2mirror.so.

Packages using Libtool don’t have this problem because Libtool relinks
upon installation so that the installed binaries have the right RUNPATH.

HTH,
Ludo’.

Reply via email to