all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Andreas Enge <andreas@enge.fr>
To: Eric Bavier <ericbavier@gmail.com>
Cc: guix-devel@gnu.org
Subject: Re: [PATCH] build: cmake: Add input libraries to the rpath.
Date: Sun, 27 Apr 2014 10:59:27 +0200	[thread overview]
Message-ID: <20140427085927.GA4380@debian> (raw)
In-Reply-To: <87mwf9718f.fsf@gmail.com>

On Fri, Apr 25, 2014 at 12:44:32PM -0500, Eric Bavier wrote:
> We can't set CMAKE_SKIP_BUILD_RPATH=OFF as it prevents tests from
> working, since the executables and libraries would not have references
> to libraries in the build tree (I ran the lapack build e.g. with your
> patch, and all the tests fail).

Yes, I noticed the same problem with lapack.

> Your post prompted me to look into this matter a bit more.  I found for
> the gmsh package I posted yesterday that I could add the following to
> #:configuration-flags instead of using the add-libs-to-runpath phase::
>     "-DCMAKE_INSTALL_RPATH_USE_LINK_PATH:BOOL=ON"
>      ,(string-append "-DCMAKE_INSTALL_RPATH="
>                      (assoc-ref %outputs "out")
>                      "/lib")
> 
> I would defer to the cmake wiki page you linked above for a full
> explanation, but briefly: The CMAKE_INSTALL_RPATH_USE_LINK_PATH tells
> cmake to include in the installed rpath all of the directories of
> libraries it has linked into the library or executable, and the
> CMAKE_INSTALL_RPATH tells cmake that in addition there are libraries in
> the current project whose directory also needs to be added to the rpath.

Excellent, so we could drop all patchelf occurrences!

On Sat, Apr 26, 2014 at 10:52:52AM +0200, Ludovic Courtès wrote:
> One concern though: if a package installs libraries in a place other
> than $out/lib, like $out/lib/PACKAGE, this will break.

I think that Eric's following sentence gives the answer:
> I tried substituting the above two flags in for the lapack, gmsh, and
> slim builds, and the RUNPATHS seem to be at least as good as when using
> the manual augment-rpath method.

There is still the possibility of adding an augment-rpath phase manually
if a problem occurs, or maybe simply adding a second flag
"-DCMAKE_INSTALL_RPATH".

I will give it a try and commit a corresponding patch if everything works.

Andreas

  parent reply	other threads:[~2014-04-27  8:59 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2014-04-27  9:57     ` Andreas Enge
2014-04-27 17:17       ` Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140427085927.GA4380@debian \
    --to=andreas@enge.fr \
    --cc=ericbavier@gmail.com \
    --cc=guix-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.