From mboxrd@z Thu Jan 1 00:00:00 1970 From: Federico Beffa Subject: Re: gobject-introspection typelibs and shared libraries Date: Sun, 7 Dec 2014 23:11:24 +0100 Message-ID: References: <87ppbvkwzj.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 ([2001:4830:134:3::10]:47874) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xxk35-0001Zm-Iy for guix-devel@gnu.org; Sun, 07 Dec 2014 17:11:28 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xxk34-0007tr-40 for guix-devel@gnu.org; Sun, 07 Dec 2014 17:11:27 -0500 In-Reply-To: <87ppbvkwzj.fsf@gnu.org> 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: =?UTF-8?Q?Ludovic_Court=C3=A8s?= Cc: Guix-devel On Sun, Dec 7, 2014 at 9:48 PM, Ludovic Court=C3=A8s wrote: > Federico Beffa skribis: > >> currently the typelib files used by gobject-introspection can't find >> shared libraries and require setting LD_LIBRARY_PATH. > > I don=E2=80=99t know much about all this; could you give some context? W= hat=E2=80=99s a > typelib files exactly? gobject-introspection is a tool to create bindings to C libraries for other languages. To make the system flexible it creates an intermediate object. typelib files are a binary store on disk of this intermediate object. https://developer.gnome.org/gi/stable/overview.html > >> I would like to propose to adopt the attached patch from the nix folk >> which should fix that and refer to shared libraries by absolute path. > > Is the output of gir-scanner(?) used on the linker command line? > Normally, our ld-wrapper handles adding a RUNPATH for any library listed > as -l on the linker command line. It is one of the tools used to create the typelib files from the C libraries, but I do not know all the details. It is one of the tools used for example by gtk+, pango, atk, gkd-pixbuf to generate the content of the .../lib/girepository-1.0 directory. Given that it is written in python, I do not think that it is used on the linker command line. The problem I've found is that the typelib files include the name of required shared libraries (.so), but not the absolute path. Therefore I was forced to set the LD_LIBRARY_PATH. I was actually googling to find out how to instruct an application where to look for the typelib files, when I saw this email http://lists.science.uu.nl/pipermail/nix-dev/2014-September/014309.html and thought that we could borrow the approach. Regards, Fede