Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 946789 - dev-libs/glib-2.80.5-r1: USE=test: ffi and gio build failures
Summary: dev-libs/glib-2.80.5-r1: USE=test: ffi and gio build failures
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo Linux Gnome Desktop Team
URL:
Whiteboard:
Keywords: PullRequest
Depends on:
Blocks:
 
Reported: 2024-12-21 16:40 UTC by Jan Ziak (atomsymbol)
Modified: 2024-12-21 22:31 UTC (History)
2 users (show)

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


Attachments
emerge --info (emerge-info.txt,8.50 KB, text/plain)
2024-12-21 16:41 UTC, Jan Ziak (atomsymbol)
Details
build.log.gz (dev-libs:glib-2.80.5-r1:20241221-163329.log.gz,178.77 KB, application/gzip)
2024-12-21 16:43 UTC, Jan Ziak (atomsymbol)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Ziak (atomsymbol) 2024-12-21 16:40:34 UTC
---- Build error 1:

In file included from ../glib-2.80.5/girepository/tests/autoptr.c:23:
../glib-2.80.5/girepository/girffi.h:30:10: fatal error: ffi.h: No such file or directory                                                                             
   30 | #include <ffi.h>
      |          ^~~~~~~
compilation terminated

---- Build error 2:

../glib-2.80.5/gio/gfile.c:7216: Error: Gio: multiple "not" annotations:                                                                                              
 * @iostream: (out) (not optional) (not nullable) (transfer full): on return, a #GFileIOStream for the created file

Reproducible: Always
Comment 1 Jan Ziak (atomsymbol) 2024-12-21 16:41:16 UTC
Created attachment 914618 [details]
emerge --info
Comment 2 Jan Ziak (atomsymbol) 2024-12-21 16:43:08 UTC
Created attachment 914619 [details]
build.log.gz
Comment 3 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-12-21 16:48:42 UTC
[32m * [39;49;00mUSE:        abi_x86_32 abi_x86_64 amd64 dbus elf elibc_glibc introspection kernel_linux mime static-libs test xattr
[32m * [39;49;00mFEATURES:   installsources network-sandbox preserve-libs sandbox splitdebug userpriv

Do you have USE=test enabled manually (rather than FEATURES=test, which is supposed to control this)?
Comment 4 Jan Ziak (atomsymbol) 2024-12-21 17:33:44 UTC
(In reply to Sam James from comment #3)
> [32m * [39;49;00mUSE:        abi_x86_32 abi_x86_64 amd64 dbus elf
> elibc_glibc introspection kernel_linux mime static-libs test xattr
> [32m * [39;49;00mFEATURES:   installsources network-sandbox preserve-libs
> sandbox splitdebug userpriv
> 
> Do you have USE=test enabled manually (rather than FEATURES=test, which is
> supposed to control this)?

Yes, I had USE=test in package.use. After removing it, the package builds and installs successfully.
Comment 5 Gabi Falk 2024-12-21 21:52:10 UTC
This one is fixed upstream:
https://gitlab.gnome.org/GNOME/glib/-/commit/99382cfb4b5edf56f7c62eccc155f361a640298a

$ git describe --contains 99382cfb4b5edf56f7c62eccc155f361a640298a
2.81.0~25^2~2

I'll make a PR.
Comment 6 Larry the Git Cow gentoo-dev 2024-12-21 22:18:48 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b9e64c2cc352c1309d3c8d35ae9917b35a30116b

commit b9e64c2cc352c1309d3c8d35ae9917b35a30116b
Author:     Gabi Falk <gabifalk@gmx.com>
AuthorDate: 2024-12-21 21:30:00 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2024-12-21 22:18:09 +0000

    dev-libs/glib: Backport upstream fix for autoptr test
    
    Closes: https://bugs.gentoo.org/946789
    Signed-off-by: Gabi Falk <gabifalk@gmx.com>
    Closes: https://github.com/gentoo/gentoo/pull/39816
    Signed-off-by: Sam James <sam@gentoo.org>

 .../glib/files/glib-2.80.5-tests-autoptr-ffi.patch | 29 ++++++++++++++++++++++
 dev-libs/glib/glib-2.80.5-r1.ebuild                |  1 +
 2 files changed, 30 insertions(+)
Comment 7 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-12-21 22:19:15 UTC
Thanks Gabi.
Comment 8 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-12-21 22:19:38 UTC
(In reply to Jan Ziak (atomsymbol) from comment #4)
> (In reply to Sam James from comment #3)
> > [32m * [39;49;00mUSE:        abi_x86_32 abi_x86_64 amd64 dbus elf
> > elibc_glibc introspection kernel_linux mime static-libs test xattr
> > [32m * [39;49;00mFEATURES:   installsources network-sandbox preserve-libs
> > sandbox splitdebug userpriv
> > 
> > Do you have USE=test enabled manually (rather than FEATURES=test, which is
> > supposed to control this)?
> 
> Yes, I had USE=test in package.use. After removing it, the package builds
> and installs successfully.

Thanks. You shouldn't ever need USE=test set anywhere (it never controls *running* the tests anyway, it's really an implementation detail, and FEATURES=test is what you want).
Comment 9 Jan Ziak (atomsymbol) 2024-12-21 22:26:33 UTC
(In reply to Sam James from comment #8)
> You shouldn't ever need USE=test set anywhere (it never controls
> *running* the tests anyway, it's really an implementation detail, and
> FEATURES=test is what you want).

Well, an informal rule usually leads to somebody not taking the rule into account. If it is allowed --> somebody will definitely try it.
Comment 10 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-12-21 22:31:45 UTC
ebuilds will never execute src_test with USE=test. I don't contest that it should be nicer for users who want to enable tests, I'm just explaining to you the status quo and that USE=test isn't the way to do that.