From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: [PATCH] build: cmake: Add input libraries to the rpath. Date: Fri, 25 Apr 2014 13:31:02 +0200 Message-ID: <87d2g5bq89.fsf@gnu.org> References: <20140425071346.GA12585@debian> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:45553) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WdeLY-00036Z-GM for guix-devel@gnu.org; Fri, 25 Apr 2014 07:31:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WdeLT-0008TY-LS for guix-devel@gnu.org; Fri, 25 Apr 2014 07:31:12 -0400 Received: from hera.aquilenet.fr ([2a01:474::1]:43653) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WdeLT-0008TC-E5 for guix-devel@gnu.org; Fri, 25 Apr 2014 07:31:07 -0400 In-Reply-To: <20140425071346.GA12585@debian> (Andreas Enge's message of "Fri, 25 Apr 2014 09:13:46 +0200") List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: Andreas Enge Cc: guix-devel@gnu.org Andreas Enge skribis: > 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 bui= ld > 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=3DOFF" > I wonder if we should instead use another of the rpath setting variables > given at > http://www.cmake.org/Wiki/CMake_RPATH_handling Yes, that would be better. > 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 aga= in > a cmake flag could solve the problem directly. > > Comments from cmake specialists are very welcome! [...] > --- a/guix/build/cmake-build-system.scm > +++ b/guix/build/cmake-build-system.scm > @@ -48,6 +48,7 @@ >=20=20 > (let ((args `(,srcdir > ,(string-append "-DCMAKE_INSTALL_PREFIX=3D" out) > + "-DCMAKE_SKIP_BUILD_RPATH=3DON" > ,@configure-flags))) So that means that CMake won=E2=80=99t pass -rpath flag when building, nor = when installing, right? (Which may be compensated by what ld-wrapper does.) Does it actually work with the packages you looked at, and for SLiM and and libssh (try building guile-ssh to check)? At any rate, that=E2=80=99ll deserve a comment because even after discussin= g it I still have to think twice what the option really does. :-) Thanks, Ludo=E2=80=99.