New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WIP] Attempt to add /usr/local search paths #199
Conversation
While this didn't actually work, please see: https://bugzilla.opensuse.org/show_bug.cgi?id=1175039
|
In Alpine, we use autoconf build system still because meson isn't in the bootstrap. To set the paths we use The meson build system should be adjusted to have the same configuration option. |
|
Anyway, opensuse uses autoconf and While it is true that the Meson build system does not support configuring the search path, they aren't using Meson, so it's not a problem. The redhat customer complaining about pkgconf claims that PKG_CONFIG_PATH is not working for him. Most likely it is actually a problem with his Can you elaborate on what problem you are actually trying to solve, since it appears SuSE does not include /usr/local paths in the default search path on purpose? |
|
I would have said the latter part on opensuse bugzilla but I cannot for the life of me figure out how to create an account there that actually works. Either way, this is not an issue in pkgconf, so closing this PR. |
|
The RH/Fedora and openSUSE packaging are functionally identical since I wrote both. The As far as I'm aware |
|
I've confirmed this does work as intended with a minimally valid |
That's extremely sad. I don't know what good reason you have, but you're breaking every build system (case in point: Meson) on purpose. Nobody expects to set PKG_CONFIG_PATH. This used to work.
Indeed, |
|
For what its worth, you can install a site config file to change this behavior. Read the pkgconf-personality man page. You will want to name the personality file I suspect Fedora/RHEL/SUSE have excluded /usr/local to ensure that only their libraries are pulled in on their builds. It may be helpful to streamline the site configuration somehow to make it easier for your specific scenario. I'm open to ideas. |
|
The site configuration might be a solution for the workplace, but as a library author (https://github.com/anordal/narg), I'm still devastated – what's the point of shipping a pkg-config file anymore? Now that Meson supports CMake packages, it makes more sense to ship that. |
This is pretty much the reason. Given that pkgconf is configurable and allows for overrides via variables and config files, it's not really a big deal that it's not searched by default. For what it's worth, most distributions have never enabled search of |
|
Isn't that a bit backwards? Distro-packaging is normally the exception. E.g. all software is supposed to install to I'm surprised to hear that most distros never searched in /usr/local, but in that case, consider this a feature request ;-) |
|
Personally I have to agree with @anordal. The way that we handle this in alpine is to just override the search path in the build environment. But either way, this is probably a conversation to have downstream -- the pkgconf project can't change how downstream distributions are shipping the software. (Oh, and if someone wants to fix the meson --with-pkg-config-path feature, that would be welcome here.) |
I just want to point out this is not true in Slackware where both pkg-config and pkgconf search /usr/local by default. |
|
I feel like perhaps writing a document outlining best practices for distributions shipping pkg-config implementations might be useful. Alpine and Debian ship |
|
On the flip side, the RPM ecosystem tends to lean towards synchronizing build and user environment settings as much as possible, to eliminate "surprise" inconsistencies. It's also still unfortunately common for people to build RPMs on their regular environments by just running However, I am tempted to consider the idea of making the |
|
Well, in Alpine, we can change the environment variables that are exposed when you run If |
|
In alpine or in any of the RPM distros do other tools like I'm not sure how useful it would be to configure these protections for just pkgconf and not the rest of the system? |
|
We used to have them, but they've been chipped away over the years as people have wanted relocatable RPMs and RPMs built on alternative prefixes to work (e.g. Flatpak runtimes and apps composed from RPM builds...). |
|
I've adjusted the behavior for Fedora 33+: https://src.fedoraproject.org/rpms/pkgconf/c/05c8560a2eadac70cdc0e66554b5a4a6ac298f01 As for openSUSE Tumbleweed, I've made an SR to change this too: https://build.opensuse.org/request/show/825209 |
|
Alpine's LD does search /usr/local paths by default. Perhaps we should fix that. Thanks for the observation @orbea. |
While this didn't actually work, please see:
https://bugzilla.opensuse.org/show_bug.cgi?id=1175039