unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* [PATCH] build: cmake: Add input libraries to the rpath.
@ 2014-04-25  7:13 Andreas Enge
  2014-04-25 11:31 ` Ludovic Courtès
  2014-04-25 17:44 ` Eric Bavier
  0 siblings, 2 replies; 7+ messages in thread
From: Andreas Enge @ 2014-04-25  7:13 UTC (permalink / raw)
  To: guix-devel

[-- Attachment #1: Type: text/plain, Size: 1006 bytes --]

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


[-- Attachment #2: 0001-build-cmake-Add-input-libraries-to-the-rpath.patch --]
[-- Type: text/plain, Size: 870 bytes --]

From f5089b7ca46ac8199aa89f582efc04f12add8cbc Mon Sep 17 00:00:00 2001
From: Andreas Enge <andreas@enge.fr>
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


^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2014-04-27 17:17 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-25  7:13 [PATCH] build: cmake: Add input libraries to the rpath Andreas Enge
2014-04-25 11:31 ` Ludovic Courtès
2014-04-25 17:44 ` Eric Bavier
2014-04-26  8:52   ` Ludovic Courtès
2014-04-27  8:59   ` Andreas Enge
2014-04-27  9:57     ` Andreas Enge
2014-04-27 17:17       ` Ludovic Courtès

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).