* my load path bug
@ 2009-10-10 15:50 Ken Raeburn
2009-10-12 19:11 ` Ludovic Courtès
0 siblings, 1 reply; 3+ messages in thread
From: Ken Raeburn @ 2009-10-10 15:50 UTC (permalink / raw)
To: guile-devel
(Quick recap: I build and install to a non-standard directory, and
don't update LD_LIBRARY_PATH to cover it, and the "guile" binary has a
runtime load path specified that lets it find libguile, but Scheme
code tries to load other libraries and fails.)
Andy's patch (eb35012) adds $pkglibdir to the path searched for
libraries. That directory is $prefix/lib/guile; it contains a
subdirectory "1.9" and nothing else. The libguile-srfi-srfi-1-v-4.*
libraries guile searches for at startup are in $prefix/lib aka $libdir.
Changing SCM_LIB_DIR to be defined as $libdir instead of $pkglibdir is
easy enough, if the current location is where we want those
libraries. Do we need programs to be able to link against them
directly? Do we need non-guile programs to be able to find them with
dlopen? (Is it too late to consider changing it?)
Ken
Author: Ken Raeburn <raeburn@raeburn.org>
Date: Sat Oct 10 11:39:12 2009 -0400
Use libdir instead of pkglibdir for SCM_LIB_DIR.
diff --git a/libguile/Makefile.am b/libguile/Makefile.am
index acb26d9..7176c3c 100644
--- a/libguile/Makefile.am
+++ b/libguile/Makefile.am
@@ -601,7 +601,7 @@ libpath.h: $(srcdir)/Makefile.in $(top_builddir)/
config.status
@echo '#define SCM_PKGDATA_DIR "$(pkgdatadir)"' >> libpath.tmp
@echo '#define SCM_LIBRARY_DIR "$(pkgdatadir)/$
(GUILE_EFFECTIVE_VERSION)"'>>libpath.tmp
@echo '#define SCM_SITE_DIR "$(pkgdatadir)/site"' >> libpath.tmp
- @echo '#define SCM_LIB_DIR "$(pkglibdir)"' >> libpath.tmp
+ @echo '#define SCM_LIB_DIR "$(libdir)"' >> libpath.tmp
@echo '#define SCM_CCACHE_DIR "$(pkglibdir)/$
(GUILE_EFFECTIVE_VERSION)/ccache"' >> libpath.tmp
@echo '#define SCM_EFFECTIVE_VERSION "$(GUILE_EFFECTIVE_VERSION)"'
>> libpath.tmp
@echo '#define SCM_BUILD_INFO { \' >> libpath.tmp
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: my load path bug
2009-10-10 15:50 my load path bug Ken Raeburn
@ 2009-10-12 19:11 ` Ludovic Courtès
2009-10-19 19:00 ` Andy Wingo
0 siblings, 1 reply; 3+ messages in thread
From: Ludovic Courtès @ 2009-10-12 19:11 UTC (permalink / raw)
To: guile-devel
Hi Ken,
Ken Raeburn <raeburn@raeburn.org> writes:
> Andy's patch (eb35012) adds $pkglibdir to the path searched for
> libraries. That directory is $prefix/lib/guile; it contains a
> subdirectory "1.9" and nothing else. The libguile-srfi-srfi-1-v-4.*
> libraries guile searches for at startup are in $prefix/lib aka
> $libdir.
>
> Changing SCM_LIB_DIR to be defined as $libdir instead of $pkglibdir is
> easy enough, if the current location is where we want those
> libraries.
Yes, I think that’s the way to go, since libguile-srfi-*,
libguilereadline*, etc. get installed to $(libdir), not $(pkglibdir).
If nobody objects, please commit it.
> Do we need programs to be able to link against them directly?
Yes since people may be explicitly linking against them (they’ve always
been under $(libdir)).
> Do we need non-guile programs to be able to find them with dlopen?
Yes.
> (Is it too late to consider changing it?)
Yes.
Thanks,
Ludo’.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: my load path bug
2009-10-12 19:11 ` Ludovic Courtès
@ 2009-10-19 19:00 ` Andy Wingo
0 siblings, 0 replies; 3+ messages in thread
From: Andy Wingo @ 2009-10-19 19:00 UTC (permalink / raw)
To: Ludovic Courtès; +Cc: guile-devel
Hello
On Mon 12 Oct 2009 21:11, ludo@gnu.org (Ludovic Courtès) writes:
> Ken Raeburn <raeburn@raeburn.org> writes:
>
>> Andy's patch (eb35012) adds $pkglibdir to the path searched for
>> libraries. That directory is $prefix/lib/guile; it contains a
>> subdirectory "1.9" and nothing else. The libguile-srfi-srfi-1-v-4.*
>> libraries guile searches for at startup are in $prefix/lib aka
>> $libdir.
>>
>> Changing SCM_LIB_DIR to be defined as $libdir instead of $pkglibdir is
>> easy enough, if the current location is where we want those
>> libraries.
>
> Yes, I think that’s the way to go, since libguile-srfi-*,
> libguilereadline*, etc. get installed to $(libdir), not $(pkglibdir).
>
> If nobody objects, please commit it.
>
>> Do we need programs to be able to link against them directly?
>
> Yes since people may be explicitly linking against them (they’ve always
> been under $(libdir)).
>
>> Do we need non-guile programs to be able to find them with dlopen?
>
> Yes.
>
>> (Is it too late to consider changing it?)
>
> Yes.
For the list: we worked out a compromise. Guile .so or .dylib extensions
may be installed in the $libdir or in the extensions dir, which by
default is $prefix/lib/guile/1.9/extensions. Check pkg-config
--variable=extensionsdir guile-2.0 for the exact value.
Andy
--
http://wingolog.org/
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-10-19 19:00 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-10-10 15:50 my load path bug Ken Raeburn
2009-10-12 19:11 ` Ludovic Courtès
2009-10-19 19:00 ` Andy Wingo
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).