Linker search path problems?

Alexander Neundorf neundorf at kde.org
Thu Jun 5 01:02:27 CEST 2008


On Thursday 05 June 2008, you wrote:
> On Thursday 05 June 2008, Alexander Neundorf wrote:
> > On Wednesday 04 June 2008, you wrote:
> > > On Wednesday 04 June 2008, Alexander Neundorf wrote:
> > > > On Wednesday 04 June 2008, David Faure wrote:
> > > > > On Wednesday 04 June 2008, Andreas Pakulat wrote:
> > > > > > Hmm, interesting my KDELibsDependenciesInternal.cmake in
> > > > > > /usr/share/apps/cmake/modules contains references to my
> > > > > > build/kdelibs directory. That is surely wrong.
> > > > >
> > > > > Yes I saw that here as well.
> > > >
> > > > For which libs ?
> > >
> > > Hmm, I had to rm all those dependencies files, and they have now been
> > > regenerated properly. This was indeed an upgrade bug only.
> >
> > Do you think the upgrade from cmake 2.4 to 2.6 or from phonon-in-kdelibs
> > to phonon-in-kdesupport or both together ?
>
> Hmm. In fact I have been using cvs (which became 2.6) for a very very long
> time, so that can't be it. Either it's a 2.5.x->2.6 migration issue, or
> it's indeed related to phonon. I should really have kept that file around.
> I hope Andreas has.

I think I understand what happened.

This is from FindPhonon.cmake:

find_library(PHONON_LIBRARY NAMES phonon 
             PATHS ${KDE4_LIB_INSTALL_DIR} ${KDE4_LIB_DIR}
             ${CMAKE_SYSTEM_LIBRARY_PATH} ${QT_LIBRARY_DIR} ${LIB_INSTALL_DIR}
             NO_DEFAULT_PATH)

Inside kdelibs, KDE4_LIB_DIR is set equal to LIBRARY_OUTPUT_PATH. So as soon 
as phonon was removed from kdelibs and this FindPhonon.cmake was added, it 
searched for libphonon.so also in tge kdelibs build dir and found it, since 
nobody had deleted the library file. Simply deleting the library from disk 
doesn't change a lot, since the path is in the cache. Deleting the library 
from disk (make clean) and removing the entry from the cache should have 
helped.
While looking at it, I noticed the following:
LIB_INSTALL_DIR: the current install dir for libs
KDE4_LIB_DIR: the directory, where libkdecore.so is located (which means the 
build dir if inside kdelibs)
KDE4_LIB_INSTALL_DIR: loaded from the installed kdelibs, should be the same as 
KDE4_LIB_DIR, but empty inside kdelibs, so this one is suited for searching

I committed a change to FindPhonon.cmake

(still this doesn't help everybody who has the bad path right now in his cmake 
cache)

Alex


More information about the Kde-buildsystem mailing list