From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: [PATCH]: gnu: Add guile-dbi. Date: Tue, 21 Jun 2016 22:56:21 +0200 Message-ID: <87fus6mfbe.fsf@gnu.org> References: <87bn2yc3zu.fsf@member.fsf.org> <878ty06ze8.fsf@gnu.org> <8760t36it3.fsf@elisya.g.zucchetti.com> <87mvme8w8k.fsf@gnu.org> <87inx2inou.fsf@member.fsf.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]:47081) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bFSip-0001vz-JO for guix-devel@gnu.org; Tue, 21 Jun 2016 16:56:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bFSin-00071L-JO for guix-devel@gnu.org; Tue, 21 Jun 2016 16:56:34 -0400 In-Reply-To: <87inx2inou.fsf@member.fsf.org> (=?utf-8?B?IuWui+aWh+atpiIn?= =?utf-8?B?cw==?= message of "Tue, 21 Jun 2016 23:09:05 +0800") 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: =?utf-8?B?5a6L5paH5q2m?= Cc: guix-devel@gnu.org iyzsong@member.fsf.org (=E5=AE=8B=E6=96=87=E6=AD=A6) skribis: > 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 a= lways 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 = we 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_PA= TH) > in addition to LD_LIBRARY_PATH. Find the absolute so filepath in it > ourself, then pass to dlopen.=20=20 Why not, but then it would be redundant with LD_LIBRARY_PATH and LTDL_LIBRARY_PATH, which would further complicate the search rules. > 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. I like this approach! Ludo=E2=80=99.