Subject: Re: [bug#40492] [PATCH] gnu: Add meshlab

From: Ludovic Courtès <[email-masked]>
Date: Wed, 22 Apr 2020 21:52:56 +0200

Egun on,  :-)

Ekaitz Zarraga <[email-masked]> skribis:

> Thanks for the detailed answer. I'll check the formatting errors.
> About the RUNPATH checks, I isolated one of the errors and I don't know what to change.
>
> This is the error of the file libsamplefilter.so during the runpath check:
>
> validating RUNPATH of 2 binaries in "/gnu/store/lcpp0gpispfqw8zna2mjrr6cwj3ih133-meshlab-Meshlab-2020.04/bin"...
>
> But the first element in the RUNPATH is the place where the library is. This is the library's path:
>
> /gnu/store/lcpp0gpispfqw8zna2mjrr6cwj3ih133-meshlab-Meshlab-2020.04/lib/meshlab/libmeshlab-common.so
>
>
> This is the linking of the libsamplefilter.so file:
>
> [ 98%] Linking CXX shared module ../../distrib/plugins/libsamplefilter.so
> cd /tmp/guix-build-meshlab-Meshlab-2020.04.drv-0/source/build/sampleplugins/samplefilter && /gnu/store/iz9500ssxcqlyr74hg1jq10ycrh42yq1-cmake-minimal-3.15.1/bin/cmake -E cmake_link_script CMakeFiles/samplefilter.dir/link.txt --verbose=1
>
> The -rpath and -Wl are set to /tmp/guix-build-meshlab-Meshlab-2020.04.drv-0/source/build/common
> but it should be set to the directory it showed previously, right?

Not really, I think CMake initially sets the RUNPATH to the build tree,
as shown above, that’s OK.  I think it changes it upon “make install”.

> If I need to change that, what do I have to do?

One way to fix it would be to arrange to pass ‘-Wl,-rpath,'$ORIGIN'’ on
the link command line of the plugins.

Another solution would be to add a post-install phase to move
libmeshlab-common.so* to $output/lib, which seems more conventional,
though perhaps upstream had good reasons not to do that.

HTH!

Ludo’.