[EMAIL PROTECTED] (Ludovic Courtès) writes: >> --- guile-config/guile-config.in.orig 2006-09-20 00:19:02.000000000 +0000 >> +++ guile-config/guile-config.in >> @@ -155,7 +155,7 @@ >> (if (or (string=? libdir "/usr/lib") >> (string=? libdir "/usr/lib/")) >> "" >> - (string-append "-L" (get-build-info 'libdir))) >> + (string-append "-Wl,-R" (get-build-info 'libdir) " >> -L" (get-build-info 'libdir))) >> (string-join other-flags) >> >> ))) > > Can you explain why this is needed? `guile-config' is only used by > applications that link against Guile. Did you have troubles compiling > such applications?
Sorry if this is stuff everyone knows, but.. There are several ways that programs find shared libraries at runtime. Some of my info is old, so sorry if I am incorrect: debian way: -rpath is evil. all libs are in /usr/lib, or use ld.so.conf or ldconfig of some kind netbsd way: by default, /usr and /usr/lib are searched. ldconfig is messy and LD_LIBRARY_PATH is a gross hack for other than debugging. Programs should be compiled with -R for directories that are to be searched at runtime. In particular, /usr/local/lib and /usr/pkg/lib are not in the default library search path. darwin way: absolute path is resolved at link time, and stored, so you get the same library you linked with (not quite sure on this). > Besides, `-Wl,-R' can probably not be considered portable. Probably you are right. But not having a way to include some sort of rpath when needed isn't portable either. My view is that the right answer from a portability viewpoint is to be aware of the rpath issue and to detect at configure time what the local rules are and then follow them. So probably --enable-rpath at configure should subsistute #t for @WANT_RPATH@ (instead of #f without) and the code above could be conditional. I've had to do similar things on various bits of guile over the years. _______________________________________________ Guile-user mailing list Guile-user@gnu.org http://lists.gnu.org/mailman/listinfo/guile-user