Summary: | cmake could not write new RPATH to akonadiserver | ||
---|---|---|---|
Product: | [Frameworks and Libraries] Akonadi | Reporter: | Daniel Betz <dnlbtz> |
Component: | server | Assignee: | Volker Krause <vkrause> |
Status: | RESOLVED NOT A BUG | ||
Severity: | normal | CC: | brad.king, kdepim-bugs, neundorf |
Priority: | NOR | ||
Version: | 4.4 | ||
Target Milestone: | --- | ||
Platform: | Compiled Sources | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: |
Description
Daniel Betz
2010-02-16 21:30:53 UTC
Which cmake version are you using ? Alex cmake version 2.8.0 Remove the library from the build tree and then do make VERBOSE=1 to see the actual link line for it. It should contain something like -Wl,-rpath,/home/daniel/packs/KDE/kdesupport/build/lib:/home/daniel/packs/KDE/kdesupport/build/soprano/soprano:/usr/local/lib: Verify that the trailing ':' appears in the actual link line. At least one person has reported this issue with CMake before. He was using a patched linker (/usr/bin/ld) that refused to put any empty-string RPATH entry into binaries. Does your linker implement such a policy? While this is good for security, CMake already ensures that the trailing ':' does not end up in the install tree (which is why it refuses to install). At one time CMake did not add the trailing colon. However, the RPATH field in ELF binaries uses a string table entry that can be shared with other strings in the binary (such as symbol names). When CMake re-writes it on installation it could mangle the other strings because it overwrites the whole string table entry. We added the trailing ':' to make collision with other strings unlikely (symbols generally do not end in ':' and string literals are stored elsewhere). By removing the trailing ':' the linker exposes the binary to the possibility of mangled symbols after RPATH editing. Sorry, my fault. I played around with the linker command to fix another issue with a boot library. That was related to: https://bugs.kde.org/show_bug.cgi?id=227275 http://www.cmake.org/Bug/view.php?id=10304 In the first link you see that the colon is there. For sure I accidentally removed the colon. To verify, I let cmake link some targets again and everywhere the trailing colon was present and the RPATH_CHANGE during installation succeeded. |