From mboxrd@z Thu Jan 1 00:00:00 1970 From: iyzsong@member.fsf.org (=?utf-8?B?5a6L5paH5q2m?=) Subject: Re: [PATCH]: gnu: Add guile-dbi. Date: Tue, 21 Jun 2016 23:09:05 +0800 Message-ID: <87inx2inou.fsf@member.fsf.org> References: <87bn2yc3zu.fsf@member.fsf.org> <878ty06ze8.fsf@gnu.org> <8760t36it3.fsf@elisya.g.zucchetti.com> <87mvme8w8k.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]:48551) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bFNJA-00067y-Cj for guix-devel@gnu.org; Tue, 21 Jun 2016 11:09:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bFNJ8-0002cZ-9z for guix-devel@gnu.org; Tue, 21 Jun 2016 11:09:43 -0400 In-Reply-To: <87mvme8w8k.fsf@gnu.org> ("Ludovic =?utf-8?Q?Court=C3=A8s=22'?= =?utf-8?Q?s?= message of "Tue, 21 Jun 2016 16:14:35 +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" To: Ludovic =?utf-8?Q?Court=C3=A8s?= Cc: guix-devel@gnu.org ludo@gnu.org (Ludovic Court=C3=A8s) writes: > Hi! > > Maurizio Boriani skribis: > >> I'm the maintainer and first author of guile-dbi > > Good to see you here! :-) > Oh, nice! >> >> Unfortunately, Guile DBI loads its backends using `dlopen', so I >> >> have to set 'LD_LIBRARY_PATH' to '$guile-dbd-sqlite/lib' for >> >> loading it. >> >> Ludovic> I don=E2=80=99t have any great ideas. >> >> Ludovic> If it uses lt_dlopen, then we should recommend setting >> Ludovic> LTDL_LIBRARY_PATH instead of LD_LIBRARY_PATH, which is a >> Ludovic> lesser evil. >> >> Ludovic> Otherwise, we could also hard-code the file name of, say, >> Ludovic> guile-dbd-sqlite in guile-dbi, such that there=E2=80=99s al= ways at >> Ludovic> least one backend available. >> >> may be ok for you if I introduce and 'hardcoded' default search path >> for library lookup in guile-dbi source code and do a new release?=20 > > I don=E2=80=99t think there=E2=80=99s any good default search path that w= e could hard > code, though, except arbitrarily choosing one of the backends as I > suggested above. > > Ideas? I think it will be great to introduce a new search path (eg: GUILE_DBD_PATH) in addition to LD_LIBRARY_PATH. Find the absolute so filepath in it ourself, then pass to dlopen.=20=20 Another idea is changing dbd libraries to scheme modules. Then dbi will use the '(dbi dbd mysql)' module, the module may use 'load-extension'. So we can patch the scheme file of each dbd module.