From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: cmake-build-system Date: Mon, 06 Jul 2015 00:44:31 +0200 Message-ID: <874mlins1c.fsf@gnu.org> References: <87d207j8ak.fsf@elephly.net> 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]:48296) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZBseO-0000XQ-Qn for guix-devel@gnu.org; Sun, 05 Jul 2015 18:44:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZBseJ-0000Lr-Nv for guix-devel@gnu.org; Sun, 05 Jul 2015 18:44:40 -0400 In-Reply-To: <87d207j8ak.fsf@elephly.net> (Ricardo Wurmus's message of "Sun, 05 Jul 2015 10:52:19 +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: Ricardo Wurmus Cc: guix-devel Ricardo Wurmus skribis: > 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=3DTRUE helped when the > INSTALL_RPATH was also set to contain all inputs, like this: > > (string-append "-DCMAKE_INSTALL_RPATH=3D" > (string-join (map (match-lambda > ((name . directory) > (string-append directory "/lib"))) > %build-inputs) ";")) Ideally we would never have to do this because ld-wrapper is supposed to take care of that. This is in powertabeditor, right? What happens if you build it without this and with VERBOSE=3D1 (as a =E2=80=98make=E2=80=99 variable) and GUIX_LD_WRAPPER_DEBUG=3D1 (environment variable)? I would like to see where the -rpath get lost or overwritten. > The attached patch only adds BUILD_WITH_INSTALL_RPATH=3DTRUE. I=E2=80=99= m not > sure if this is sufficient, but I think it is actually a requirement. Unfortunately CMake has complex RPATH handling and it seems to resist us. It would be good to see, taking powertabeditor as an example, how we can achieve better results. I don=E2=80=99t know whether BUILD_WITH_INSTALL_RPATH=3DTRUE is necessary, but I think we must first better understand what=E2=80=99s going on. Thank you, Ludo=E2=80=99.