unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* [PATCH] gnu: tbb: Set library rpath.
@ 2015-04-14 12:19 Ricardo Wurmus
  2015-04-15 19:56 ` Ludovic Courtès
  0 siblings, 1 reply; 2+ messages in thread
From: Ricardo Wurmus @ 2015-04-14 12:19 UTC (permalink / raw)
  To: Guix-devel

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

Hi Guix,

the attached patch augments LDFLAGS indirectly over LIB_LINK_FLAGS with
the rpath flag for the library output of the package.  This fixes rpath
problems with /lib/libtbbmalloc_proxy.so.2 and possibly others (see
http://hydra.gnu.org/build/367038/nixlog/2/raw) as reported by Ludo.

Note: I did not run the complete test suite again (because it takes a
very long time on my machine), and when tests are enabled a couple more
libraries are created.  Since they all probably share LIB_LINK_FLAGS I
expect any problems there to also be fixed by this patch.

~~ Ricardo


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-gnu-tbb-Set-library-rpath.patch --]
[-- Type: text/x-patch, Size: 1166 bytes --]

From 56246d7bf2f60272ceed63d9291f47f42431119b Mon Sep 17 00:00:00 2001
From: Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de>
Date: Tue, 14 Apr 2015 14:11:42 +0200
Subject: [PATCH] gnu: tbb: Set library rpath.

* gnu/packages/tbb.scm (tbb)[arguments]: Add the rpath for lib directory of
  output to LDFLAGS.
---
 gnu/packages/tbb.scm | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/tbb.scm b/gnu/packages/tbb.scm
index 42670d7..3c41141 100644
--- a/gnu/packages/tbb.scm
+++ b/gnu/packages/tbb.scm
@@ -46,8 +46,13 @@
     (build-system gnu-build-system)
     (arguments
      `(#:test-target "test"
-       #:phases (alist-delete
+       #:phases (alist-replace
                  'configure
+                 (lambda* (#:key outputs #:allow-other-keys)
+                   (substitute* "build/linux.gcc.inc"
+                     (("LIB_LINK_FLAGS =")
+                      (string-append "LIB_LINK_FLAGS = -Wl,-rpath="
+                                     (assoc-ref outputs "out") "/lib"))))
                  (alist-replace
                   'install
                   (lambda* (#:key outputs #:allow-other-keys)
-- 
2.1.0


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

* Re: [PATCH] gnu: tbb: Set library rpath.
  2015-04-14 12:19 [PATCH] gnu: tbb: Set library rpath Ricardo Wurmus
@ 2015-04-15 19:56 ` Ludovic Courtès
  0 siblings, 0 replies; 2+ messages in thread
From: Ludovic Courtès @ 2015-04-15 19:56 UTC (permalink / raw)
  To: Ricardo Wurmus; +Cc: Guix-devel

Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de> skribis:

> Note: I did not run the complete test suite again (because it takes a
> very long time on my machine), and when tests are enabled a couple more
> libraries are created.  Since they all probably share LIB_LINK_FLAGS I
> expect any problems there to also be fixed by this patch.

OK.

> From 56246d7bf2f60272ceed63d9291f47f42431119b Mon Sep 17 00:00:00 2001
> From: Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de>
> Date: Tue, 14 Apr 2015 14:11:42 +0200
> Subject: [PATCH] gnu: tbb: Set library rpath.
>
> * gnu/packages/tbb.scm (tbb)[arguments]: Add the rpath for lib directory of
>   output to LDFLAGS.

OK to push.  Thanks for looking into it!

Ludo’.

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

end of thread, other threads:[~2015-04-15 19:57 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-04-14 12:19 [PATCH] gnu: tbb: Set library rpath Ricardo Wurmus
2015-04-15 19:56 ` 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).