From felix.lechner at lease-up.com Tue Dec 20 13:25:38 2022 From: felix.lechner at lease-up.com (Felix Lechner) Date: Tue, 20 Dec 2022 05:25:38 -0800 Subject: Please require 'prefix' variable in *.pc Message-ID: 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 From tfheen at err.no Tue Dec 20 13:54:47 2022 From: tfheen at err.no (Tollef Fog Heen) Date: Tue, 20 Dec 2022 14:54:47 +0100 Subject: Please require 'prefix' variable in *.pc In-Reply-To: (Felix Lechner's message of "Tue, 20 Dec 2022 05:25:38 -0800") References: Message-ID: <87mt7i18pk.fsf@err.no> ]] Felix Lechner 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? No, I don't think so. Having prefix defined is just a common convention for a variable, not a requirement. pkg-config tries reasonably hard to not dictate what variables people use. -- Tollef Fog Heen UNIX is user friendly, it's just picky about who its friends are