unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: iyzsong@member.fsf.org (宋文武)
To: "Ludovic Courtès" <ludo@gnu.org>
Cc: guix-devel@gnu.org
Subject: Re: [PATCH]: gnu: Add guile-dbi.
Date: Tue, 21 Jun 2016 23:09:05 +0800	[thread overview]
Message-ID: <87inx2inou.fsf@member.fsf.org> (raw)
In-Reply-To: <87mvme8w8k.fsf@gnu.org> ("Ludovic Courtès"'s message of "Tue, 21 Jun 2016 16:14:35 +0200")

ludo@gnu.org (Ludovic Courtès) writes:

> Hi!
>
> Maurizio Boriani <baux@gnu.org> 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’t 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’s always 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? 
>
> I don’t think there’s 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_PATH)
in addition to LD_LIBRARY_PATH.  Find the absolute so filepath in it
ourself, then pass to dlopen.  


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.

  reply	other threads:[~2016-06-21 15:09 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-18  8:09 [PATCH]: gnu: Add guile-dbi 宋文武
2016-06-20  8:24 ` Ludovic Courtès
2016-06-21  8:35   ` Maurizio Boriani
2016-06-21 14:14     ` Ludovic Courtès
2016-06-21 15:09       ` 宋文武 [this message]
2016-06-21 20:56         ` Ludovic Courtès
2016-09-16  3:36           ` guile-dbi: Use libltdl and prefer GUILE_DBD_PATH 宋文武
2016-09-16  6:57             ` baux
2017-07-10 22:54             ` Linas Vepstas
2017-07-11 11:02               ` 宋文武
2017-07-11 18:31                 ` Nala Ginrut

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87inx2inou.fsf@member.fsf.org \
    --to=iyzsong@member.fsf.org \
    --cc=guix-devel@gnu.org \
    --cc=ludo@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).