Please require 'prefix' variable in *.pc

Felix Lechner felix.lechner at lease-up.com
Tue Dec 20 13:25:38 UTC 2022


Hi,

The 'prefix' variable, while often present in pkg-config files, is not
actually required. [1] Some projects therefore try to omit it [2]
which sometimes does not work for everyone. [3]

Would the maintainers accept a patch that generates a warning whenever
the variable is not present?

For operating systems like Guix [4]—and presumably Nix [5] too—there
would be a big advantage to using the "--define-variable" command-line
option [6] when installing build products to a versioned location in
their respective "stores". [7]

On Guix, the replacement of paths currently requires complexities [8]
that Pkg-config could help to avoid, while remaining true to its
original use case and mission.

Thank you for considering!

Kind regards
Felix Lechner

[1] see "Concepts", https://people.freedesktop.org/~dbn/pkg-config-guide.html
[2] https://github.com/linux-pam/linux-pam/pull/369#discussion_r650504735
[3] https://github.com/linux-pam/linux-pam/issues/466
[4] https://guix.gnu.org/
[5] https://nixos.org/
[6] https://linux.die.net/man/1/pkg-config
[7] https://guix.gnu.org/manual/en/html_node/Features.html
[8] https://github.com/guix-mirror/guix/commit/236b41a95899aa701ab71a1784e5c839dc2dce53#diff-ad9a3942ec0f54c27fa27ca667c8ae95fefae66a35713d5f69b80c69992c499aR1598


More information about the pkg-config mailing list