bug-libtool
[Top][All Lists]
Advanced

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

bug#54726: when linking a shared library on Linux, libtool 2.4.6 ignores


From: Nicolas Boulenguez
Subject: bug#54726: when linking a shared library on Linux, libtool 2.4.6 ignores libfoo.so arguments
Date: Tue, 5 Apr 2022 12:50:59 +0200

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.

Attachment: draft960469.diff
Description: Text Data

Attachment: reproducer
Description: Text document


reply via email to

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