unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* cmake-build-system
@ 2015-07-05  8:52 Ricardo Wurmus
  2015-07-05 22:44 ` cmake-build-system Ludovic Courtès
  0 siblings, 1 reply; 3+ messages in thread
From: Ricardo Wurmus @ 2015-07-05  8:52 UTC (permalink / raw)
  To: guix-devel

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

Attached is a patch for the cmake-build-system.  I have encountered a
couple of applications that failed the validate-runpath phase because
the RUNPATH was not set properly.

I found that setting BUILD_WITH_INSTALL_RPATH=TRUE helped when the
INSTALL_RPATH was also set to contain all inputs, like this:

  (string-append "-DCMAKE_INSTALL_RPATH="
                 (string-join (map (match-lambda
                                     ((name . directory)
                                      (string-append directory "/lib")))
                                   %build-inputs) ";"))

Currently, the build system only sets the INSTALL_RPATH to the output’s
“/lib” directory.

The attached patch only adds BUILD_WITH_INSTALL_RPATH=TRUE.  I’m not
sure if this is sufficient, but I think it is actually a requirement.

What do you think?

~~ Ricardo


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-cmake-build-system-Enable-BUILD_WITH_INSTALL_RPATH.patch --]
[-- Type: text/x-patch, Size: 1128 bytes --]

From def7bdacbebc1969e0390674844c85982575c305 Mon Sep 17 00:00:00 2001
From: Ricardo Wurmus <rekado@elephly.net>
Date: Sun, 5 Jul 2015 10:45:15 +0200
Subject: [PATCH] cmake-build-system: Enable BUILD_WITH_INSTALL_RPATH.

* guix/build/cmake-build-system.scm (configure): Set BUILD_WITH_INSTALL_RPATH
  to TRUE.
---
 guix/build/cmake-build-system.scm | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/guix/build/cmake-build-system.scm b/guix/build/cmake-build-system.scm
index f57622e..7199e51 100644
--- a/guix/build/cmake-build-system.scm
+++ b/guix/build/cmake-build-system.scm
@@ -55,6 +55,8 @@
                   ,(string-append "-DCMAKE_INSTALL_PREFIX=" out)
                   ;; add input libraries to rpath
                   "-DCMAKE_INSTALL_RPATH_USE_LINK_PATH=TRUE"
+                  ;; link target in the build tree with the INSTALL_RPATH
+                  "-DCMAKE_BUILD_WITH_INSTALL_RPATH=TRUE"
                   ;; add (other) libraries of the project itself to rpath
                   ,(string-append "-DCMAKE_INSTALL_RPATH=" out "/lib")
                   ;; enable verbose output from builds
-- 
2.4.3


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

end of thread, other threads:[~2015-07-06  4:24 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-05  8:52 cmake-build-system Ricardo Wurmus
2015-07-05 22:44 ` cmake-build-system Ludovic Courtès
2015-07-06  4:23   ` cmake-build-system Ricardo Wurmus

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).