[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
empty "-L" (Re: Linking to third-party shared libary)
From: |
Guido Draheim |
Subject: |
empty "-L" (Re: Linking to third-party shared libary) |
Date: |
Fri, 17 Aug 2001 17:10:54 +0200 |
Kenneth Pronovici wrote:
> [...]
> What happens is that, even though I specify a -L option (and libtool seems
> to notice it) the phase that builds my .la file fails because the linker
> can't find the two TIBCO libraries. This seems to be because the -L
> directive gets dropped along the way. I've included my short Makefile.am
> file and the actual errors below my sig for reference.
> [...]
> libmm_la_LDFLAGS = @TIBRV_LDFLAGS@
> [...]
>
> /bin/sh ../libtool --mode=link gcc -g -O2 -o libmm.la
-rpath /home/pronovic/tmp/local/lib -L /opt/tibco/tibrv/lib
> [..]
> /usr/bin/ld: cannot find -ltibrv
> collect2: ld returned 1 exit status
@ Kenneth
sorry to bother you, there's a space between "-L" and your libdir.
Even that it may be allowed with some linkers, it is atleast not
quite portable to have a space before the argument. Check your
configure.ac script where you did define that TIBRV_LDFLAGS.
@ libtool-ML :
isn't there a need to check an empty -L? Currently we end up
in a section looking like this:
absdir=`cd "$dir" && pwd`
if test -z "$absdir"; then
$echo "$modename: cannot determine absolute directory name of
\`$dir'" 1>&2
exit 1
fi
now this is interesting - a `cd` with an empty argument happens
to be a valid call that does not change anywhere - and so the abspath
of the build-dir is taken (which can be seen in the original mail too).
Well, why do I feel that this is wrong? If I really want the localdir,
I'd surely used "-L.", right?
Patch could be easy - just before that section, add a `test -z "$dir"`.
I am just not sure if "-L" may have been projected to do something more
useful and the functionality does go the wrong way in the current libtool
version. Opinions?
cheers, Guido