[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Testing doesn't work so well, but it builds

From: Brian Utterback
Subject: Re: Testing doesn't work so well, but it builds
Date: Tue, 24 Jun 2008 20:45:36 -0400
User-agent: Thunderbird (X11/20080602)

Bruce Korb wrote:
Hi Brian, Harlan, and libtool-ers,

On Tue, Jun 24, 2008 at 4:59 PM, Brian Utterback
<address@hidden> 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
+ 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 -? nested: fatal: open failed: No such file or 
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

reply via email to

[Prev in Thread] Current Thread [Next in Thread]