[PATCH] Add rpath so the Qt libs are found at runtime

Daniel Kahn Gillmor dkg at fifthhorseman.net
Thu Mar 26 13:45:46 CET 2020


On Sun 2019-12-22 10:11:56 +0100, David Faure wrote:
> Subject: [PATCH] Add rpath so the Qt libs are found at runtime
>
> This is necessary when Qt is installed into a custom prefix.
 […]
> --- a/m4/qt.m4
> +++ b/m4/qt.m4
> @@ -57,6 +57,11 @@ AC_DEFUN([FIND_QT],
>        PINENTRY_QT_CFLAGS="$PINENTRY_QT_CFLAGS -std=c++11"
>      fi
>  
> +    qtlibdir=`"$PKG_CONFIG" --variable libdir Qt5Core`
> +    if test -n "$qtlibdir"; then
> +        PINENTRY_QT_LDFLAGS="$PINENTRY_QT_LDFLAGS -Wl,-rpath \"$qtlibdir\""
> +    fi
> +

hm, this *isn't* actually necessary on some platforms (debian, at least)
where "pkg-config --variable libdir Qt5Core" is non-empty.

    0 dkg at alice:~$ pkg-config --variable libdir Qt5Core
    /usr/lib/x86_64-linux-gnu
    0 dkg at alice:~$ 

(pinentry-qt does work fine on debian, without this patch)

Furthermore, RPATH is discouraged on debian, and has been for ages.
Details here:

    https://wiki.debian.org/RpathIssue

I'd rather not have to revert this patch in debian; is there some better
test that can be used?  or can we add a flag to configure that will
avoid setting rpath?

      --dkg
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 227 bytes
Desc: not available
URL: <https://lists.gnupg.org/pipermail/gnupg-devel/attachments/20200326/3a865be2/attachment-0001.sig>


More information about the Gnupg-devel mailing list