Hi Hartmut,

guix-comm...@gnu.org skribis:

> commit 16b8aff85bcdb9799496c4a27257210cd45158e5
> Author: Hartmut Goebel <h.goe...@crazy-compilers.com>
> 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