[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] build: cmake: Add input libraries to the rpath.

From: Ludovic Courtès
Subject: Re: [PATCH] build: cmake: Add input libraries to the rpath.
Date: Sat, 26 Apr 2014 10:52:52 +0200
User-agent: Gnus/5.130009 (Ma Gnus v0.9) Emacs/24.3 (gnu/linux)

Eric Bavier <address@hidden> skribis:

> Andreas Enge <address@hidden> writes:
>> 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.
> 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).

OK, that’s what I feared.

> 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::
>      ,(string-append "-DCMAKE_INSTALL_RPATH="
>                      (assoc-ref %outputs "out")
>                      "/lib")


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

Good, it looks like this is what ‘cmake-build-system’ should do by

One concern though: if a package installs libraries in a place other
than $out/lib, like $out/lib/PACKAGE, this will break.

In practice, do CMake packages always install libraries in $libdir?

Thanks for helping out,

reply via email to

[Prev in Thread] Current Thread [Next in Thread]