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.