Bug 228386 - can't be build with -DCMAKE_SKIP_RPATH=TRUE
Summary: can't be build with -DCMAKE_SKIP_RPATH=TRUE
Status: RESOLVED FIXED
Alias: None
Product: bindings
Classification: Developer tools
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: kde-bindings
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-02-24 23:27 UTC by Pavel Volkovitskiy
Modified: 2010-02-28 18:26 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
fixes build without CMAKE_SKIP_BUILD_RPATH=FALSE (777 bytes, patch)
2010-02-26 07:30 UTC, Pavel Volkovitskiy
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Pavel Volkovitskiy 2010-02-24 23:27:50 UTC
Version:           4.4 (using Devel)
OS:                Linux
Installed from:    Compiled sources

if you build kdebindings without embedded RPATHs (or with INSTALL_RPATH) it will fail with:

generator/bin/smokegen: error while loading shared libraries: libcppparser.so: cannot open shared object file: No such file or directory

this library placed in generator/bin/too
Comment 1 Rex Dieter 2010-02-25 06:32:06 UTC
We've seen this in fedora too,
Comment 2 Arno Rehn 2010-02-25 18:45:00 UTC
Yes. That's just the way it is. I'm sorry that we need to run applications that we've just compiled, but otherwise it won't work. And that's what RPATH is for.

Is there any solution to make the linker find libraries outside LD_LIBRARY_PATH without setting RPATH?
Comment 3 Pavel Volkovitskiy 2010-02-26 07:28:51 UTC
Thats ok to use just compiled binaries in build tree, and there is at least to ways not to depend on cmake's RPATH settings

there is KDE4_HANDLE_RPATH_FOR_EXECUTABLE macro in KDE4Macros.cmake that just makes shell wrapper with proper LD_LIBRARY_PATH/DYLD_LIBRARY_PATH/PATH, but this will add dependency on kdelibs

or you can force cmake to use RPATH in generator sub-tree, see kdebindings-smokegen-rpath.patch

there is another way - set it for target with set_target_properties, i tried that but without success, may be i was doing something wrong, i'm not cmake guru
Comment 4 Pavel Volkovitskiy 2010-02-26 07:30:48 UTC
Created attachment 41125 [details]
fixes build without CMAKE_SKIP_BUILD_RPATH=FALSE
Comment 5 Arno Rehn 2010-02-28 18:26:32 UTC
SVN commit 1097205 by arnorehn:

Force RPATH for smokegen so that it can be used from
within the build tree.
Remove -Wl,--no-undefined from the CXXFLAGS for the
generator plugins to link properly.

BUG:228386
BUG:228383



 M  +4 -0      CMakeLists.txt  
 M  +3 -1      generators/CMakeLists.txt  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1097205