[xslt] Private libraries incorrectly passed to command line when linking dynamically


libxslt.pc, libexslt.pc and xslt-config all incorrectly pass private
library dependencies (such as libm and libgcrypt) to the command line
when linking dynamically. This causes un-necessary dependencies to be

For many years, Debian has patched libxslt to avoid this problem. In
libxslt's pkg-config files, M_LIBS and LIBGCRYPT_LIBS are moved to the
Libs.private field, where they will only be passed to the command line
if --static is passed to pkg-config.

In xslt-config, Debian patches the source to add a new switch,
--static, which combines with --libs to output the dependencies
required for static linking. Private dependencies are not passed to
the command line when --libs is invoked as normal.

This problem was identified as still present when patching upstream
PHP 7.4 to use libxslt's pkg-config files.

Patches are available in a merge request #3 on Gitlab [1].



[1] https://gitlab.gnome.org/GNOME/libxslt/merge_requests/3

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