[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-buildsystem
Subject:    Re: kdesupport rpath issues
From:       Rex Dieter <rdieter () math ! unl ! edu>
Date:       2010-02-12 17:25:44
Message-ID: hl42tu$9ao$1 () ger ! gmane ! org
[Download RAW message or body]

Maciej Mrozowski wrote:

> On Friday 12 of February 2010 16:36:31 Rex Dieter wrote:
>> I'm on Fedora 12, using cmake-2.8.0
>> 
>> For me, building many kdesupport items, I end up with binaries and
>> libraries that have rpaths containing /usr/lib64 (or /usr/lib on 32 bit).
>> As I understand it, normal system library paths shouldn't be rpath'd.
>> 
>> I've seen this so far trying to build:  akonadi, attica, strigi, soprano
>> 
>> Is this expected?
>> 
>> (At first I thought it to be a generalized cmake problem, but I've also
>> tested several other non-kdesupport cmake-based projects without
>> problems, including libmusicbrainz, openjpeg, qcomicbook)
> 
> It's expected according to soprano or strigi CMakeLists.txt:
...
> It's been put there purposely it seems as a safe default for developers
> and alike.
> I think you can still disable it if you're sure you install those libs in
> standard location in your distribution (say /usr/lib${LIB_SUFFIX)) by
> passing -DCMAKE_SKIP_RPATH=ON to cmake.

Eww.  OK, we ran into this with FindKDE4Internal.cmake too, and came up with 
this hackish patch, I'd appreciate if it got some feedback/love from someone 
with more cmake-fu than I, and we can hopefully get this upstreamed.

The intention here is to simply not rpath anything in 
${CMAKE_SYSTEM_LIBRARY_PATH}
but maybe I'm oversimplifying.  

-- Rex

["kdelibs-4.3.98-no_rpath.patch" (text/x-patch)]

diff -up kdelibs-4.3.98/cmake/modules/FindKDE4Internal.cmake.no_rpath \
                kdelibs-4.3.98/cmake/modules/FindKDE4Internal.cmake
--- kdelibs-4.3.98/cmake/modules/FindKDE4Internal.cmake.no_rpath	2010-02-02 \
                08:56:04.117624211 -0600
+++ kdelibs-4.3.98/cmake/modules/FindKDE4Internal.cmake	2010-02-02 09:51:15.752373945 \
-0600 @@ -947,10 +947,19 @@ if (UNIX)
       set(CMAKE_INSTALL_NAME_DIR ${LIB_INSTALL_DIR})
    else (APPLE)
       # add our LIB_INSTALL_DIR to the RPATH and use the RPATH figured out by cmake \
                when compiling
-      set(CMAKE_INSTALL_RPATH ${LIB_INSTALL_DIR} )
+      # set(CMAKE_INSTALL_RPATH ${LIB_INSTALL_DIR} )
+      message(STATUS "CMAKE_SYSTEM_LIBRARY_PATH: ${CMAKE_SYSTEM_LIBRARY_PATH}")
+      message(STATUS "LIB_INSTALL_DIR: ${LIB_INSTALL_DIR}")
+      list(FIND CMAKE_SYSTEM_LIBRARY_PATH ${LIB_INSTALL_DIR} \
_LIB_INSTALL_DIR_INDEX_IN_CMAKE_SYSTEM_LIBRARY_PATH) +      message(STATUS \
"_LIB_INSTALL_DIR_INDEX_IN_CMAKE_SYSTEM_LIBRARY_PATH: \
${_LIB_INSTALL_DIR_INDEX_IN_CMAKE_SYSTEM_LIBRARY_PATH}") +      \
if(${_LIB_INSTALL_DIR_INDEX_IN_CMAKE_SYSTEM_LIBRARY_PATH} EQUAL -1) +        \
message(STATUS "appending to CMAKE_INSTALL_RPATH: ${LIB_INSTALL_DIR}") +        \
list(APPEND CMAKE_INSTALL_RPATH ${LIB_INSTALL_DIR}) +      \
endif(${_LIB_INSTALL_DIR_INDEX_IN_CMAKE_SYSTEM_LIBRARY_PATH} EQUAL -1) +
       set(CMAKE_SKIP_BUILD_RPATH FALSE)
       set(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE)
-      set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
+      set(CMAKE_INSTALL_RPATH_USE_LINK_PATH FALSE)
    endif (APPLE)
 endif (UNIX)
 



_______________________________________________
Kde-buildsystem mailing list
Kde-buildsystem@kde.org
https://mail.kde.org/mailman/listinfo/kde-buildsystem


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic