guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: 07/09: gnu: kinit: Use LIBRARY_PATH to search for dynamically loaded


From: Ludovic Courtès
Subject: Re: 07/09: gnu: kinit: Use LIBRARY_PATH to search for dynamically loaded libs.
Date: Sat, 05 Jan 2019 15:24:17 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux)

Hi Hartmut,

address@hidden skribis:

> commit 16b8aff85bcdb9799496c4a27257210cd45158e5
> Author: Hartmut Goebel <address@hidden>
> Date:   Thu Mar 1 23:08:44 2018 +0100
>
>     gnu: kinit: Use LIBRARY_PATH to search for dynamically loaded libs.
>     
>     Transfer the NixOS "kdeinit-libpath" patch for kinit as of
>     2018-02-17.
>     
>     * gnu/packages/patches/kinit-kdeinit-libpath.patch: New file.
>     * gnu/local.mk (dist_patch_DATA): Add it.
>     * gnu/packages/kde-frameworks.scm (kinit)[source]: Use it.

[...]

> ++                // Try to load the library relative to the active profiles.
> ++                QByteArrayList profiles = 
> qgetenv("LIBRARY_PATH").split(':');
> ++                for (const QByteArray &profile: profiles) {
> ++                    if (!profile.isEmpty()) {
> ++                        l.setFileName(QFile::decodeName(profile) + 
> QStringLiteral("/") + libpath);
> ++                        if (l.load()) break;
> ++                    }

I find this use of LIBRARY_PATH questionable: it’s the variable normally
used by the compiler driver (gcc) at link time, not by the loader
(ld.so).  IOW, it’s really a compile-time variable, and one that has
nothing to do with Qt or KDE.

What about using a different variable for this purpose?  It could be
KDE_PLUGIN_PATH or something like this, and we could add it to
‘native-search-paths’ of kinit.  We could also avoid the “+ libpath” bit
I suppose.

Thoughts?

Apologies if this has been discussed elsewhere…

Thank you,
Ludo’.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]