From mboxrd@z Thu Jan 1 00:00:00 1970 From: Timothy Sample Subject: Re: How-to solve runpath-errors when splitting packages? Date: Sat, 13 Apr 2019 13:31:38 -0400 Message-ID: <8736mlerr9.fsf@ngyro.com> References: <2d6e4d33-3cdb-cf19-ce48-26aaebec763e@crazy-compilers.com> <87ftqp3p2h.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([209.51.188.92]:35376) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hFMVE-0004cE-1Y for guix-devel@gnu.org; Sat, 13 Apr 2019 13:31:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hFMVD-0006HN-41 for guix-devel@gnu.org; Sat, 13 Apr 2019 13:31:44 -0400 Received: from out2-smtp.messagingengine.com ([66.111.4.26]:48557) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hFMVC-0006GH-JZ for guix-devel@gnu.org; Sat, 13 Apr 2019 13:31:43 -0400 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" To: Hartmut Goebel Cc: Guix-devel Hi Hartmut, Ludovic Court=C3=A8s writes: > Hi Hartmut, > > Hartmut Goebel skribis: > >> I already managed to split the output into several. Here is an the >> file-list for zbar:qt: >> >> /gnu/store/=E2=80=A6-zbar-0.22-gtk/bin/zbarcam-gtk >> /gnu/store/=E2=80=A6-zbar-0.22-gtk/lib/libzbargtk.so.0.0.2 >> /gnu/store/=E2=80=A6-zbar-0.22-gtk/lib/libzbargtk.a >> /gnu/store/=E2=80=A6-zbar-0.22-gtk/lib/libzbargtk.la >> /gnu/store/=E2=80=A6-zbar-0.22-gtk/include/zbar/zbargtk.h >> /gnu/store/=E2=80=A6-zbar-0.22-gtk/lib/pkgconfig/zbar-gtk.pc >> >> Obviously zbarcam-gtk should use libzbargtk.so from the same output. >> >> How can I make zbarcam-gtk find the lib? Any ideas? > > Normally, the build system (QMake I suppose?) should take care of it. > > In GNU configure parlance, if you do: > > ./configure --libdir=3D/some/thing/lib > > then the build system will ensure that executables, once installed, have > /some/thing/lib in their RUNPATH. > > IOW, instead of adding a post-install phase that moves files around, > make sure to pass the right libdir option to QMake or whatever. I learned a bit about this when splitting up some GNOME packages. There is a general problem. Many GNOME packages don=E2=80=99t split things along =E2=80=9Clibdir=E2=80=9D/=E2=80=9Cbindir=E2=80=9D lines, but rather core li= brary, GUI library, and GUI binary. I had little luck with usual configure script flags. It was much easier and more reliable to patch the =E2=80=9C*.in=E2=80=9D files of = the various subpackages. For an example, see =E2=80=9Clibgoa=E2=80=9D. The only funny= thing there is that I had to set =E2=80=9C--libdir=E2=80=9D back to its usual output, b= ecause we automatically set it when an output is called =E2=80=9Clib=E2=80=9D. If th= e output had a different name, it wouldn=E2=80=99t be necessary to reset =E2=80=9C--libd= ir=E2=80=9D. I checked what Nix does for packages with the same problem, and it looks like they tend to move stuff after it has been installed, and then use =E2=80=9Cpatchelf=E2=80=9D to fix up the paths. My instinct says that this= is a little bit more brittle, but I suppose our runpath validation would keep everything on course. Hope that helps! -- Tim