Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 951487 - dev-libs/glib-2.82.5: Dependency gobject-introspection-1.0 not found breaks build (when using binpkgs?)
Summary: dev-libs/glib-2.82.5: Dependency gobject-introspection-1.0 not found breaks b...
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal major
Assignee: Gentoo Linux Gnome Desktop Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-03-17 07:45 UTC by Stefan Huber
Modified: 2025-04-05 10:13 UTC (History)
7 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge log (dev-libs:glib-2.82.5:20250319-004122.log,50.52 KB, text/x-log)
2025-03-19 02:42 UTC, Mark G. Woodruff
Details
emerge --info dev-libs/glib (emerge.info.txt,17.25 KB, text/plain)
2025-03-19 21:19 UTC, Mazunki Hoksaas
Details
amd64 meson-log (meson-log.amd64.txt,375.69 KB, text/plain)
2025-03-19 21:20 UTC, Mazunki Hoksaas
Details
x86 meson log (meson-log.x86.txt,390.49 KB, text/plain)
2025-03-19 21:20 UTC, Mazunki Hoksaas
Details
build.log (build.log,50.47 KB, text/x-log)
2025-03-19 21:21 UTC, Mazunki Hoksaas
Details
emerge update @world logs (emerge_uUDN_@world.txt,37.23 KB, text/plain)
2025-03-19 22:27 UTC, Mazunki Hoksaas
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Stefan Huber 2025-03-17 07:45:16 UTC
Building dev-libs/glib-2.82.5 fails during configuration phase:

[…]
Found CMake: /usr/bin/cmake (3.31.5)
Run-time dependency gobject-introspection-1.0 found: NO (tried cmake)

../glib-2.82.5/girepository/introspection/meson.build:78:17: ERROR: Dependency lookup for gobject-introspection-1.0 with method 'pkgconfig' failed: Could not generate cflags for gobject-introspection-1.0:
Package dependency requirement 'glib-2.0 >= 2.82.0' could not be satisfied.
Package 'glib-2.0' has version '2.80.5', required version is '>= 2.82.0'
Package dependency requirement 'gobject-2.0 >= 2.82.0' could not be satisfied.
Package 'gobject-2.0' has version '2.80.5', required version is '>= 2.82.0'


A full log can be found at /var/tmp/portage/dev-libs/glib-2.82.5/work/glib-2.82.5-abi_x86_64.amd64/meson-logs/meson-log.txt
 * ERROR: dev-libs/glib-2.82.5::gentoo failed (configure phase):
[…]

The package is installed and the corresponding pkgconfig files do exist:

❯ qlist dev-libs/gobject-introspection | grep pc
/usr/lib64/pkgconfig/gobject-introspection-no-export-1.0.pc
/usr/lib64/pkgconfig/gobject-introspection-1.0.pc

However, as the error message states, the Required property in gobject-introspection-1.0.pc itself requires a glib version higher than the currently installed. (That is, glib-2.80.5-r1 is installed, to be updated to 2.82.5, yet currently installed gobject-introspection-1.82.0-r2 requires already >=glib-2.82.)


Interestingly, gobject-introspection-1.82.0-r2 has as RDEPEND already >=dev-libs/glib-2.82.0:2[introspection], yet it is not installed. This leaves me a bit puzzled.


I worked around this by manually patching gobject-introspection-1.0.pc, i.e., changing the required glib and gobject minimum verison to 2.80.0; upgrading glib; and reverting the change to the pc file.


I filed this bug mainly for documentary reasons, in case others have similar issues.

Reproducible: Always
Comment 1 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2025-03-17 07:46:37 UTC
Having the full build.log, meson-log.txt, and indeed emerge --info would be helpful here.
Comment 2 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2025-03-17 07:47:35 UTC
(In reply to Sam James from comment #1)
> Having the full build.log, meson-log.txt, and indeed emerge --info would be
> helpful here.

(In particular, really need to understand what interaction happened with the boostrap gobject-introspection in the ebuild.)
Comment 3 Stefan Huber 2025-03-17 08:11:21 UTC
Shame on me, I did not copied those files before the successful workaround-emerge cleaned it up.

What I could restore is this information from emerge.log:

1742135107:  >>> emerge (21 of 46) dev-libs/gobject-introspection-1.82.0-r2 to /
1742135107:  === (21 of 46) Merging Binary (dev-libs/gobject-introspection-1.82.0-r2::/var/cache/binpkgs/dev-libs/gobject-introspection/gobject-introspection-1.82.0-r2-1.gpkg.tar)
1742135111:  >>> AUTOCLEAN: dev-libs/gobject-introspection:0
1742135111:  === Unmerging... (dev-libs/gobject-introspection-1.80.1-r3)
1742135113:  >>> unmerge success: dev-libs/gobject-introspection-1.80.1-r3
1742135115:  === (21 of 46) Post-Build Cleaning (dev-libs/gobject-introspection-1.82.0-r2::/var/cache/binpkgs/dev-libs/gobject-introspection/gobject-introspection-1.82.0-r2-1.gpkg.tar)
1742135115:  ::: completed emerge (21 of 46) dev-libs/gobject-introspection-1.82.0-r2 to /
1742135115:  >>> emerge (22 of 46) sys-libs/ncurses-6.5_p20250125 to /
[…]
1742135183:  >>> emerge (25 of 46) dev-libs/glib-2.82.5 to /
1742135183:  === (25 of 46) Cleaning (dev-libs/glib-2.82.5::/var/db/repos/gentoo/dev-libs/glib/glib-2.82.5.ebuild)
1742135183:  === (25 of 46) Compiling/Merging (dev-libs/glib-2.82.5::/var/db/repos/gentoo/dev-libs/glib/glib-2.82.5.ebuild)
1742135216:  *** Finished. Cleaning up...
1742135216:  *** exiting unsuccessfully with status '1'.
1742135217:  *** terminating.


Here we see that dev-libs/gobject-introspection-1.82.0-r2 has been scheduled for merge before dev-libs/glib-2.82.5. But for glib to be upgraded from <2.82 to >=2.82, it requires a <gobject-introspection-2.82, since gobject-introspection-1.82.0-r2 has a pkgconfig that requires >=dev-libs/glib-2.82.

Based on this, dev-libs/glib-2.82.5 shall have a BDEPEND on >=dev-libs/gobject-introspection-1.82.0. But is has not.

The set use-flag 'introspection' pulls in ">=dev-libs/gobject-introspection-common-${INTROSPECTION_PV}", with INTROSPECTION_PV being 1.82.0, for [R]DEPEND. And we have "!gobject-introspection-1.80.1" as [R]DEPEND.

Hope this adds valuable information.
Comment 4 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2025-03-17 08:17:04 UTC
(In reply to Stefan Huber from comment #3)
> Based on this, dev-libs/glib-2.82.5 shall have a BDEPEND on
> >=dev-libs/gobject-introspection-1.82.0. But is has not.

That would introduce a circular dependency. This is why we have..

```
        # Build internal copy of gobject-introspection to avoid circular dependency (built for native abi only)
        if multilib_native_use introspection && ! has_version ">=dev-libs/${INTROSPECTION_P}" ; then
[...]
```

in the glib ebuilds, since 2.80.x.

The questions are:
* How did you end up with gobject-introspection-1.82.0 installed before glib-2.82*?
* Did the `has_version` check return true instead of false, so it didn't try to build a bootstrap gobject-introspection?
* Are binpkgs relevant here? (Yes, probably; doesn't mean a dep is necessarily wrong, may be a Portage bug, but likely relevant nonetheless)
Comment 5 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2025-03-17 08:21:38 UTC
gobject-introspection even has a configure check for the right version of glib, so it can't be built with the wrong one. That would mean having a binpkg of gobject-introspection is needed for whatever you hit.
Comment 6 Stefan Huber 2025-03-17 08:32:29 UTC
Right, gobject-introspection has glib-2.82.0 as [R]DEPEND. But since gobject-introspection has been installed as binpkg as of emerge.log, this allowed gobject-introspection to be emerged before glib? I am sorry, I am not very familiar with the dependency mechanics of binpkg.


The emerge command that led to this was according to emerge.log:

1742197495: Started emerge on: Mär 17, 2025 08:44:54
1742197495:  *** emerge --newuse --oneshot --update --ask --backtrack=200 --deep --keep-going --with-bdeps=y --reinstall=changed-use --getbinpkg --regex-search-auto=y --verbose --usepkg @world
Comment 7 Mark G. Woodruff 2025-03-19 01:33:21 UTC
Suspect this will bite everyone using binary packages.

sudo emerge -a --unmerge dev-libs/gobject-introspection
sudo emerge -a1  dev-libs/glib
sudo telinit u
sudo emerge --autounmask=y --autounmask-write --ask --update --newuse --deep --with-bdeps=y @world

worked for me after the first emerge @world failed.
Comment 8 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2025-03-19 01:34:28 UTC
(In reply to Mark G. Woodruff from comment #7)
> Suspect this will bite everyone using binary packages.
> 

I don't think so. We'd have far more reports of that if so.

> sudo emerge -a --unmerge dev-libs/gobject-introspection
> sudo emerge -a1  dev-libs/glib
> sudo telinit u

(glibc != glib, so no need for that.)

> sudo emerge --autounmask=y --autounmask-write --ask --update --newuse --deep
> --with-bdeps=y @world
> 
> worked for me after the first emerge @world failed.

If you hit this exact issue, it'd be great to have the logs Stefan lost.
Comment 9 Mark G. Woodruff 2025-03-19 02:42:04 UTC
Created attachment 921212 [details]
emerge log

If this doesn't have what you need, let me know and I'll emerge it on another system (which should fail the same way)
Comment 10 Mazunki Hoksaas 2025-03-19 21:19:32 UTC
Created attachment 921315 [details]
emerge --info dev-libs/glib
Comment 11 Mazunki Hoksaas 2025-03-19 21:20:18 UTC
Created attachment 921316 [details]
amd64 meson-log

/var/tmp/portage/dev-libs/glib-2.82.5/work/glib-2.82.5-abi_x86_64.amd64/meson-logs/meson-log.txt
Comment 12 Mazunki Hoksaas 2025-03-19 21:20:41 UTC
Created attachment 921317 [details]
x86 meson log

/var/tmp/portage/dev-libs/glib-2.82.5/work/glib-2.82.5-abi_x86_64.amd64/meson-logs/meson-log.txt
Comment 13 Mazunki Hoksaas 2025-03-19 21:21:15 UTC
Created attachment 921318 [details]
build.log

/var/tmp/portage/dev-libs/glib-2.82.5/temp/build.log
Comment 14 Mazunki Hoksaas 2025-03-19 21:27:11 UTC
This seems to have hit me too. I have enabled binary packages globally, but as my system is also multilib globally, there is some large disparity between what packages are installed from binary packages, and which aren't (is there a chance we might get an official multilib binhost?).

Let me know what I can/should test before continuing. I haven't dug much into what is causing this, other than trying `env USE=-introspection`, which didn't help, as I don't have too much time on my hands lately.

It might be useful to know I haven't updated my system in a while, and I never got around to fixing the rust migration yet. I'm currently sitting at >100 pending updates:
  Total: 145 packages (122 upgrades, 1 downgrade, 3 new, 2 in new slots, 17 reinstalls, 32 binaries), Size of downloads: 0 KiB
Comment 15 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2025-03-19 21:29:25 UTC
emerge -p -uvDU @world (or whatever your regular upgrade command is) output showing a bad merge plan would be really helpful.

What would be even *more* helpful is if someone could try extract a stage3 (possibly one from last week or something), and then give commands that lead to a bad merge plan being shown.
Comment 16 Mazunki Hoksaas 2025-03-19 22:27:56 UTC
Created attachment 921319 [details]
emerge update @world logs

emerge -p -uUDN @world 2>&1 | tee emerge_uUDN_@world.txt
Comment 17 Mazunki Hoksaas 2025-03-19 22:32:07 UTC
I do believe many of the updates here are unrelated to this issue. I only mentioned that since there might be some correlation.

I hope I'll have time this weekend to clean up the system, and oneshotting upgrades until only the blockers remain. If I should wait on any of that for testing purposes, please let me know. I'd be happy to be a bunny.
Comment 18 onkobu 2025-03-29 14:30:29 UTC
> I don't think so. We'd have far more reports of that if so.

Here you go, +1

Number 65 in my last emerge is binary of gobject-introspection-1.82.0-r2. After this glib as regular build compiled and failing with the same dependency error.

Not every one running gentoo with binary package distribution will complain but silently apply the fix with unmerge gobject-instrospection followed by emerge of glib.

The latter does not merge on my machine because of non matching USE:

=dev-libs/glib-2.82.5 static-libs

The host building my binaries also builds qemu which requires static-libs for some packages. The machine which emerged in wrong order does not need any emulation nor container nor virtualization and thus builds glib on its own.

I'll simply set up a binary package distribution for non-emulation/ non-virtualization hosts or add static-libs for this machine. Maybe the latter since it doesn't require much work.
Comment 19 onkobu 2025-03-29 14:31:53 UTC
> The latter does not merge on my machine because of non matching USE:

Should be: The latter does not merge >binary package of glib< on my machine because of non matching USE:
Comment 20 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2025-03-29 14:35:13 UTC
(In reply to onkobu from comment #18)
> > I don't think so. We'd have far more reports of that if so.

> Not every one running gentoo with binary package distribution will complain
> but silently apply the fix with unmerge gobject-instrospection followed by
> emerge of glib.

I'm not disputing that the issue exists. I'm saying there's something more to it (like merge order), i.e. it's not simply about binpkg users and every binpkg user is affected.
Comment 21 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2025-03-29 14:36:16 UTC
A workaround we can add in dev-libs/glib is to see if the available gobject-introspection is truly usable, not just checking has_version.
Comment 22 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2025-03-29 14:47:38 UTC
(In reply to Sam James from comment #20)

(This is also shown by the fact that glib+gobject-introspection are extremely common dependencies and we've had no mention of it on forums, MLs, or IRC; again, the issue is real, I was simply disputing that "every binpkg user" would hit it.)
Comment 23 onkobu 2025-03-30 07:04:00 UTC
> I was simply disputing that "every binpkg user" would hit it.

No offense intended, I'm fine. I could also solve it by re-configuring USE so that the particular hosts pulls both binaries. Maybe dependency calculation for binaries yields a different order something like priority (gobject-introspection comes first) or relaxation (glib is pushed back after gobject-introspection).

I assume that binary packages skip some of the DEPEND-constraints because they're already build and only require runtime dependencies.
[+] Comment 24 Stuart Shelton 2025-04-05 09:39:18 UTC Comment hidden (obsolete)
[+] Comment 25 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2025-04-05 09:41:51 UTC Comment hidden (obsolete)
[+] Comment 26 Stuart Shelton 2025-04-05 10:01:00 UTC Comment hidden (obsolete)
[+] Comment 27 Stuart Shelton 2025-04-05 10:02:43 UTC Comment hidden (obsolete)
[+] Comment 28 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2025-04-05 10:03:33 UTC Comment hidden (obsolete)
[+] Comment 29 Stuart Shelton 2025-04-05 10:13:12 UTC Comment hidden (obsolete)