libexec (Re: "kde5" or "kf5" ?)

Alexander Neundorf neundorf at kde.org
Sat Feb 23 09:43:51 UTC 2013


On Friday 22 February 2013, David Faure wrote:
> On Friday 22 February 2013 18:45:45 Alexander Neundorf wrote:
> > On Friday 22 February 2013, David Faure wrote:
> > > On Thursday 21 February 2013 22:01:30 Alexander Neundorf wrote:
> > > > Why not have a KF5DIRS variable ?
> > > 
> > > You keep thinking "KDE4, renamed" :-)
> > > 
> > > Think of KF5 as standalone libs on top of Qt. Do you currently have to
> > > set a QCADIRS to use QCA, and a ATTICADIRS to use attica, and a
> > > SOPRANODIRS to use soprano? No, because:
> > > * executables are found using $PATH
> > > * libs are found using $LD_LIBRARY_PATH (and fallbacks)
> > > * plugins are found using $QT_PLUGIN_PATH
> > > * data files are found using $XDG_DATA_DIRS
> > > * global config files are found using $XDG_CONFIG_DIRS
> > 
> > So when I install kf5 libs to /opt/kf5-my-stuff/, I have to set
> > QT_PLUGIN_PATH, XDG_DATA_DIRS, XDG_CONFIG_DIRS (and potentially PATH and
> > LD_LIBRARY_PATH) to make the libraries work (if they have runtime
> > dependencies), instead of setting only KF5DIRS=/opt/kf5-my-stuff/ , i.e.
> > only one variable, and where I only need to know the install prefix, and
> > not all the details ?
> 
> You're dreaming, when you say "instead of" :)

Well, it's what I'd like to have :-)

> Surely you have to set PATH and LD_LIBRARY_PATH no matter what.
> 
> In fact, already now, when installing kdelibs (even 4) in a custom prefix,
> you *already* need to set PATH, LD_LIBRARY_PATH, XDG_DATA_DIRS,
> XDG_CONFIG_DIRS, QT_PLUGIN_PATH *and* KDEDIRS.
> Same thing for user stuff: XDG_DATA_HOME, XDG_CONFIG_HOME *and* KDEHOME.
> So what I'm suggesting is to actually set *less* env vars in KF5 than in
> KDE SC 4.

Well, it would be great if with KF5, if I install some library which needs to 
find its own files, it would find them without needing the help from 
environment variables.

I do not know the actual code, I am speaking more in the role of a potential 
3rd party user now, somebody who is working on a commercial custom Qt-only 
application, who would like to use some kf5 libs.
make install, get the include dir and libs to link, and after that, it would 
be great if it would just work, independent from the rest of the system, i.e. 
I don't want to get other stuff accidentially, and I don't want other stuff to 
be influenced by me. E.g. I would not want to get the KDE file dialog when 
running in a KDE desktop, or Gnome icons in a Gnome desktop if I didn't build 
with that option explicitely (because it will make my application behave or 
look different than how I want it to be and how I tested and support it).

Ideally I would unpack my binary application tar.gz including shared libs just 
somewhere, and it would just work.
RPATH can be handled with a bit of effort with $ORIGIN, if other files need to 
be found, this should be possible by finding the own location (see my other 
mail), and then using configured relative paths to the other parts.

> And if you install any other library into that prefix, one that doesn't
> come from kf5 but from elsewhere, the vars will be exactly the same. No
> more "KDE stuff in a KDE island using KDE-specific env vars", but instead,
> the standard XDG env vars that make it possible for our stuff to be found
> by non KDE code too. GTK code, Qt code, python code ... can all find stuff
> (e.g. application desktop files, mimetype definitions, etc. etc.) in
> XDG_DATA_DIRS.
> 
> Let's talk about QT_PLUGIN_PATH: you want Qt to load plugins in $KDEDIRS?
> I'll let you talk to the Qt developers, good luck :)

Again from the same POV as above, I would want that Qt finds only those 
plugins that were contained in my installation.
(I know that Qt is not easily relocatable)

Alex


More information about the Kde-frameworks-devel mailing list