Bruce Korb wrote:
Hi Brian, Harlan, and libtool-ers,
On Tue, Jun 24, 2008 at 4:59 PM, Brian Utterback
<[EMAIL PROTECTED]> wrote:
Bruce is correct that the problem has to do with "-R" but you don't do
"-R" the way he is using it here.
I need to point out that "he" isn't doing anything with the "-R".
I have to depend upon libtool to take canonical link commands
and transform them into whatever is needed for a particular platform.
If the "-R" option to the linker is not being configured correctly,
then they need to know about it.
I'll update my libtool as soon as there is a fix.
Regards, Bruce
On Solaris, the link time library search path is separate from the run
time library search path. The -L flag sets the link time (compile
time) library search path, and the -R flag sets the run time path. If
the library you are linking to is already installed in the same place
and the directory it is in is not on the default search path, then you
need to set the directory with both a -L and a -R. You use them the
same way, on the command line.
$ bash -x cc.sh
+ gcc -DHAVE_CONFIG_H -g -DTEST_TEST_NESTED_OPTS -I/pogo/users/bkorb/autogen-
5.9.6pre6 -I/pogo/users/bkorb/autogen-5.9.6pre6/_b -I/pogo/users/bkorb/autoge
n-5.9.6pre6/_b/agen5 -I/pogo/users/bkorb/autogen-5.9.6pre6/_b/autoopts -I/pog
o/users/bkorb/autogen-5.9.6pre6/agen5 -I/pogo/users/bkorb/autogen-5.9.6pre6/a
utoopts -I/usr/local/gnu/include -o nested nested.c /pogo/users/bkorb/autogen
-5.9.6pre6/_b/autoopts/.libs/libopts.a /pogo/users/bkorb/autogen-5.9.6pre6/_b
/autoopts/.libs/libguileopts.a -Wl,-R -L/usr/local/gnu/lib -lguile -lguile -lt
^^^^^^^^^^
dl -lsocket -lnsl -lm -lgen
That looks better, but:
$ ./nested -?
ld.so.1: nested: fatal: libguile-ltdl.so.1: open failed: No such file or
directory
Killed
Yes, -Wl,-R supplies a -R to the linker, but the -R to the linker needs an
argument, the same as the -L. Also, it is usual to supply the -R the same
way as the -L, as a plain flag to the compiler. The compiler knows to pass
it to the linker.
Brian Utterback
I notice that the configure script tests whether -Wl,-R works or not by
specifying -Wl,-R/tmp in the test, but then goes on to set
ag_cv_test_ldflags to simply "-Wl,-R" which is then used to set
AG_LD_FLAGS. I presume that the same thing occurred when libguile was
compiled.
Brian Utterback
_______________________________________________
http://lists.gnu.org/mailman/listinfo/libtool