From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andreas Enge Subject: [PATCH] build: cmake: Add input libraries to the rpath. Date: Fri, 25 Apr 2014 09:13:46 +0200 Message-ID: <20140425071346.GA12585@debian> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="Qxx1br4bt0+wmkIi" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:52313) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WdaKa-0006ax-DR for guix-devel@gnu.org; Fri, 25 Apr 2014 03:14:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WdaKV-0004GN-54 for guix-devel@gnu.org; Fri, 25 Apr 2014 03:13:56 -0400 Received: from moutng.kundenserver.de ([212.227.17.13]:53097) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WdaKU-0004GD-R1 for guix-devel@gnu.org; Fri, 25 Apr 2014 03:13:51 -0400 Content-Disposition: inline List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: guix-devel@gnu.org --Qxx1br4bt0+wmkIi Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In a discussion we had yesterday, Ludovic mentioned the need to pass a special flag to the cmake configure phase to modify the rpath of installed libraries, as done for the package slim. I then noticed I needed the same flag for clucene. The attached patch applies it globally in the cmake build system. This should also avoid the need for the add-libs-to-runpath phase in the gmsh package Eric Bavier posted yesterday. In slim, there is another flag: ;; Don't build libslim.so, because then the build ;; system is unable to set the right RUNPATH on the ;; 'slim' binary. "-DBUILD_SHARED_LIBS=OFF" I wonder if we should instead use another of the rpath setting variables given at http://www.cmake.org/Wiki/CMake_RPATH_handling Moreover, libclucene-core.so needs to be linked to libclucene-shared.so.1 from the same package. Here we usually employ patchelf, but maybe yet again a cmake flag could solve the problem directly. Comments from cmake specialists are very welcome! Andreas --Qxx1br4bt0+wmkIi Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="0001-build-cmake-Add-input-libraries-to-the-rpath.patch" >From f5089b7ca46ac8199aa89f582efc04f12add8cbc Mon Sep 17 00:00:00 2001 From: Andreas Enge Date: Fri, 25 Apr 2014 09:00:03 +0200 Subject: [PATCH] build: cmake: Add input libraries to the rpath. * guix/build/cmake-build-system.scm (configure): Add flag. --- guix/build/cmake-build-system.scm | 1 + 1 file changed, 1 insertion(+) diff --git a/guix/build/cmake-build-system.scm b/guix/build/cmake-build-system.scm index 7599856..fb07b99 100644 --- a/guix/build/cmake-build-system.scm +++ b/guix/build/cmake-build-system.scm @@ -48,6 +48,7 @@ (let ((args `(,srcdir ,(string-append "-DCMAKE_INSTALL_PREFIX=" out) + "-DCMAKE_SKIP_BUILD_RPATH=ON" ,@configure-flags))) (setenv "CMAKE_LIBRARY_PATH" (getenv "LIBRARY_PATH")) (setenv "CMAKE_INCLUDE_PATH" (getenv "CPATH")) -- 1.8.4 --Qxx1br4bt0+wmkIi--