Notice: taglib-extras required

Andreas Pakulat apaku at gmx.de
Sat Mar 21 14:29:19 UTC 2009


On 21.03.09 08:33:53, Jeff Mitchell wrote:
> Andreas Pakulat wrote:
> > Usually KDE apps automatically set
> > rpath on their binary (because FindKDE4Internal.cmake sets a cmake flag
> > to always use rpath), so the export above shouldn't be necessary as long
> > as CMake knows the proper absolute path to the taglib-extras library
> > when building amarok.
> 
> CMake does know the proper absolute path -- I've done some debugging
> with Mark.

For the sake of correctness:

No it does not, thats the reason cmake doesn't set an RPATH or RUNPATH
on libamaroklib for libtag-extras.so. The problem is that you're passing
"-L/path -ltag-extras" via TAGLIB-EXTRAS_LIBRARIES to cmake's
link_libraries.  That works, because cmake ultimately recognizes this as
linker flags and hands it off to the linker. However cmake doesn't
analyze these flags to get an rpath from them, it only puts paths into
the RPATH in the library when it gets "/path/libtag-extras.so" via
TAGLIB-EXTRAS_LIBRARIES. Thats why it currently fails. If you want to
check for yourself:

- build taglib-extras into $HOME (or anywhere else excet /usr or
  /usr/local)
- make sure that PATH contains that prefix as first to
  taglib-extras-config is taken from it
- run cmake in a clean builddir (make sure it uses the taglib-extras
  from $HOME) and then build libamarok
- inspect libamarok.so via objdump -p | grep RPATH, it doesn't contain
  the directory of libtag-extras.so

Now change the installed config-script to return just the absolute path
for libtag-extras.so (including the filename itself). Then delete
libamaroklib.*, touch CMakeCache.txt (so cmake re-generates the
makefiles with the new output from the config-script) and re-build
amaroklib. Check the RPATH again and you'll see that its including the
path for libtag-extras.so. 

One could actually consider it a valid feature wish for cmake to inspect
-L arguments and add them to the rpath as well, feel free to submit a
request at http://public.kitware.com/Bug/my_view_page.php

Also just noticed that neither TAGLIB-EXTRAS_LIBRARIES nor _INCLUDES
where properly stored in the cache when the config-script was used.
Thats fixed with the (now comitted) patch as well.

Andreas

-- 
Are you sure the back door is locked?



More information about the Amarok mailing list