From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: gobject-introspection typelibs and shared libraries Date: Mon, 08 Dec 2014 10:22:52 +0100 Message-ID: <87k322cx77.fsf@gnu.org> 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]:57093) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XxuWw-0003zY-Do for guix-devel@gnu.org; Mon, 08 Dec 2014 04:23:02 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XxuWs-0005mM-Au for guix-devel@gnu.org; Mon, 08 Dec 2014 04:22:58 -0500 Received: from hera.aquilenet.fr ([2a01:474::1]:51032) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XxuWs-0005l1-43 for guix-devel@gnu.org; Mon, 08 Dec 2014 04:22:54 -0500 In-Reply-To: (Federico Beffa's message of "Sun, 7 Dec 2014 23:11:24 +0100") 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: Federico Beffa Cc: Guix-devel Federico Beffa skribis: > 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? = What=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 OK. > 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. Yes, I see in the diagram on the page above that libraries are actually dlopened, with the name that appears in the typelib file. Thus the patch you proposed is the right thing, I think. Before committing, could you add a comment a the top of the file explaining that the file names contained in typelib files are meant to be dlopen=E2=80= =99d, hence this patch? Also please credit the original author of the patch. > 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. Definitely. Do we also need to do something for GI_TYPELIB_PATH? Perhaps this should be in the =E2=80=98native-search-paths=E2=80=99 field of gobject-int= rospection? (It would be good to push both changes at once, if appropriate, to reduce rebuilds.) Thanks for the explanations, and for addressing this! Ludo=E2=80=99.