/usr prefix unconditionally placed above any other prefix #250
Loading…
Reference in New Issue
There is no content yet.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may exist for a short time before cleaning up, in most cases it CANNOT be undone. Continue?
Sometime after the 1.8 series, the logic changed to unconditionally prefer libraries in
/usr
over any other prefix. At least on FreeBSD, we have the base system (/usr
et al) and${LOCALBASE}
(usually/usr/local
but can be any prefix hierarchy not dissimilar to/opt
). Especially in a package building scenario, we want to prioritise${LOCALBASE}
over the base system.The biggest trigger for us is allowing users to pick their OpenSSL provider, whether OpenSSL from the base system or OpenSSL/LibreSSL from ports (which gets installed into
${LOCALBASE}
). The base system OpenSSL is always present in the environment regardless. With the current pkgconf, even if a user selects a provider from ports, the base OpenSSL is unconditionally detected and used leading to miscompiles and mislinks, particularly when OpenSSL was not traditionally detected/used in this way.Example context from building irssi, with pkgconf 2.0.3:
With pkgconf 1.8.1 this ordering was different and correct:
Reverting
384ade5
restores the pre-2.0.0 behaviour.What leads you to this conclusion? Literally nothing has changed in regard to how PKG_CONFIG_LIBDIR and PKG_CONFIG_PATH are evaluated.
If you want /usr/local paths to be preferred over /usr paths, then you must place them first in your
--with-pkg-config-path
configure argument. It searches in the specified order.PKG_CONFIG_LIBDIR
was set to have/usr/libdata/pkgconfig
last after all other entries, but was not honoured after384ade5
. Your commit also fixes things, thanks!