GNU bug report logs - #54726
when linking a shared library on Linux, libtool 2.4.6 ignores libfoo.so arguments

Previous Next

Package: libtool;

Reported by: Nicolas Boulenguez <nicolas <at> debian.org>

Date: Tue, 5 Apr 2022 14:24:01 UTC

Severity: normal

To reply to this bug, email your comments to 54726 AT debbugs.gnu.org.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-libtool <at> gnu.org:
bug#54726; Package libtool. (Tue, 05 Apr 2022 14:24:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Nicolas Boulenguez <nicolas <at> debian.org>:
New bug report received and forwarded. Copy sent to bug-libtool <at> gnu.org. (Tue, 05 Apr 2022 14:24:01 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Nicolas Boulenguez <nicolas <at> debian.org>
To: bug-libtool <at> gnu.org
Subject: when linking a shared library on Linux, libtool 2.4.6 ignores
 libfoo.so arguments
Date: Tue, 5 Apr 2022 12:50:59 +0200
[Message part 1 (text/plain, inline)]
Hello.

When linking a shared library or a program against a (locally built, not
installed) foo library, it is recommended to prefer
  dir/libfoo.so
over
  -Ldir -lfoo
which only adds complexity and unwanted ambiguity (for example,
/usr/lib/libfoo.{a,so} may silently be selected if dir/libfoo.so is
unexpectedly missing).

Libtool recognizes such options when linking a program, but ignores
them when linking a shared library.

The attached reproducer
* builds with -Ldir -lfoo in order to ensure that the sources are
  correct
* demonstrates the link failure with a direct path
* builds with the attached patch applied and a direct path

Just in case it helps, the original bug report is here:
Bug-Debian: https://bugs.debian.org/960469

Thanks.
[draft960469.diff (text/x-diff, attachment)]
[reproducer (text/plain, attachment)]

This bug report was last modified 2 years and 237 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.