[email protected] (宋文武) skribis: > [email protected] (Ludovic Courtès) writes: > >> Hi! >> >> Maurizio Boriani <[email protected]> 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.
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’.
