Skip to content

gnome: look up vapigen using pkg-config#15484

Closed
helmutg wants to merge 2 commits intomesonbuild:masterfrom
helmutg:cross-vapigen
Closed

gnome: look up vapigen using pkg-config#15484
helmutg wants to merge 2 commits intomesonbuild:masterfrom
helmutg:cross-vapigen

Conversation

@helmutg
Copy link
Contributor

@helmutg helmutg commented Jan 20, 2026

vapigen has architecture-dependent search path. In a cross build, using the native one cannot work as it cannot locate the host libraries it is supposed to use. On most distributions, vapigen.pc names location of vapigen (often suffixed with an appropriate version). On Debian, vapigen.pc points at an architecture-specific wrapper that adapts the search path for the desired architecture. It is never wrong to consult vapigen.pc and it also helps users with multiple vala installations selecting the right one. Thus prefer locating vapigen via its pc file over searching $PATH while retaining the override mechanisms available.

Link: https://bugs.debian.org/1061107
Link: https://salsa.debian.org/gnome-team/vala/-/merge_requests/3
Related: 62a5e3a ("env2mfile: Use a cross vapigen on Debian if available")
Thanks: Simon McVittie
Thanks: Eli Schwartz

vapigen has architecture-dependent search path. In a cross build,
using the native one cannot work as it cannot locate the host libraries it
is supposed to use. On most distributions, vapigen.pc names location of
vapigen (often suffixed with an appropriate version). On Debian,
vapigen.pc points at an architecture-specific wrapper that adapts the
search path for the desired architecture. It is never wrong to consult
vapigen.pc and it also helps users with multiple vala installations
selecting the right one. Thus prefer locating vapigen via its pc file
over searching $PATH while retaining the override mechanisms available.

Link: https://bugs.debian.org/1061107
Link: https://salsa.debian.org/gnome-team/vala/-/merge_requests/3
Related: 62a5e3a ("env2mfile: Use a cross vapigen on Debian if available")
Thanks: Simon McVittie
Thanks: Eli Schwartz
@helmutg helmutg requested a review from jpakkane as a code owner January 20, 2026 08:54
@helmutg
Copy link
Contributor Author

helmutg commented Jan 20, 2026

/cc @eli-schwartz
/cc @smcv

@smcv
Copy link
Contributor

smcv commented Jan 20, 2026

Not a maintainer, but LGTM

@eli-schwartz
Copy link
Member

It is never wrong to consult vapigen.pc and it also helps users with multiple vala installations selecting the right one.

Slightly curious how this would work by the way. You'd need an unversioned pkgconfig file at the beginning of PKG_CONFIG_PATH instead of an unversioned binary at the beginning of PATH, and I think both are probably just as annoying.

@helmutg
Copy link
Contributor Author

helmutg commented Jan 20, 2026

It is never wrong to consult vapigen.pc and it also helps users with multiple vala installations selecting the right one.

Slightly curious how this would work by the way. You'd need an unversioned pkgconfig file at the beginning of PKG_CONFIG_PATH instead of an unversioned binary at the beginning of PATH, and I think both are probably just as annoying.

One of the ways of managing custom environments is using dedicated pkgconf "personalities", so you'd supply a custom pkgconf to meson and that way query packages from a particular location. I am not using this approach myself, but my understanding is that sysroots tend to use this.

A package (dependency) can contain a mixture of native and
architecture-dependent tools. Whether it is native or not, is a property
of the tool. In particular, gio-querymodules happens to be
architecture-dependent and is thus dropped.

Suggested-By: Simon McVittie <smcv@debian.org>
@eli-schwartz
Copy link
Member

@helmutg, thanks for submitting this PR. I'm sorry to say, that despite the best intentions on both of our parts when we originally discussed this, I don't think your PR is going to make it in.

As I'm sure you know -- my policy for a while now has been to reach out to major users of meson in order to aid in collaboration. For example, I hang out in numerous Linux distro development channels, including #debian-devel, in order to be available for Debian Project members to ask me questions etc regarding Meson use. It's how we came to be discussing the topic of this PR, even. I do this despite not being or planning to be a Debian user (and largely disagreeing with the ~majority of technical decisions Debian makes), because Debian is a major user and I want to hear how our users are using us. It often takes a lot of time and energy! But it can be very rewarding at times.

Unfortunately at the moment I cannot currently justify that kind of expenditure of my time and energy for the sake of the Debian Project or its representatives or their needs. I know this is not your fault, but it is currently the state of things. For details, please see the explanation in #debian-devel for the date 2026-02-03, at 10:02:48 AM EST.

As always, I remain available to end users of all sorts who happen to be using Debian (outside of a dpkg based build). And I am certainly happy to engage in friendly social chatting.

...

As far as this PR goes, it feels Debian Developer dpkg packaging specific (it certainly won't work on Gentoo, which explicitly has the "multiple vala installations" concern and decided that using pkgconfig for this was unworkable), was explicitly motivated for that use case, and frankly I feel uncomfortable at this point in time in evaluating its impact.

Again, sorry. :( I was not anticipating this any more than you were.

@helmutg
Copy link
Contributor Author

helmutg commented Feb 15, 2026

I am vaguely aware of what happened in IRC and can understand your stance.

Yet, I think we earlier agreed that the behavior requested here is generally sensible. vapigen is an architecture-dependent tool and therefore should be looked up with the host architecture pkg-config. That is not a Debian topic.

Would you agree to leave the PR open without working on it yourself?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants