Hi, Mark H Weaver <m...@netris.org> skribis:
> I wrote: >> I've read the message referenced above several times, but I've failed to >> understand why we cannot use 'lt_dladdsearchdir' to augment the path, as >> shown in the first code excerpt of that message: >> >> env = getenv ("GUILE_SYSTEM_EXTENSIONS_PATH"); >> >> [...] >> >> if (env) >> lt_dladdsearchdir (env); >> else >> { >> lt_dladdsearchdir (SCM_LIB_DIR); >> lt_dladdsearchdir (SCM_EXTENSIONS_DIR); >> } > > Actually, I can already see a problem with this. SCM_LIB_DIR is usually > (always?) already present in the library search paths before Guile is > initialized. It is set to $(libdir) by libguile/Makefile. Isn't > $(libdir) where libguile is installed? In 1.8 and earlier, extensions were installed under $libdir, and it’s just an obvious convenience to ensure that $libdir is in the search path. Note that lt_dladdsearchdir /appends/ its arguments to the search path. [...] > With this in mind, I now propose the following: > > env = getenv ("GUILE_SYSTEM_EXTENSIONS_PATH"); > if (env) > lt_dladdsearchdir (env); > else > lt_dladdsearchdir (SCM_EXTENSIONS_DIR); > > and then to run the uninstalled guile, we'd need to set (or augment) one > of the *_LIBRARY_PATH environment variables to point within the build > directory, and also set GUILE_SYSTEM_EXTENSIONS_PATH. > > What do you think? First, I think we don’t want to change the behavior at all in 2.0, because that’s a sure way to surely get reports of angry users. Other than that, in 2.1 we could consider dropping $libdir like this, and making sure all extensions get installed in the right place. That would probably make sense. > On a related topic, why is libguilereadline-v-18.* installed in > SCM_LIB_DIR and not SCM_EXTENSIONS_DIR? Historical reasons. We should probably change it in 2.1, and also remove the “lib” prefix. WDYT? Ludo’.