Bug 228386

Summary: can't be build with -DCMAKE_SKIP_RPATH=TRUE
Product: [Developer tools] bindings Reporter: Pavel Volkovitskiy <olfway>
Component: generalAssignee: kde-bindings
Status: RESOLVED FIXED    
Severity: normal CC: arno, rdieter
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: fixes build without CMAKE_SKIP_BUILD_RPATH=FALSE

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