Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 784272 - x11-libs/colord-gtk-0.2.0 USE=introspection fails to compile. Couldn't find Colord-1.0.gir.
Summary: x11-libs/colord-gtk-0.2.0 USE=introspection fails to compile. Couldn't find C...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal
Assignee: Gentoo Linux Gnome Desktop Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-04-20 01:39 UTC by Ewerton D.
Modified: 2021-04-29 20:54 UTC (History)
4 users (show)

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


Attachments
x11-libs/colord-gtk build.log (build.log,54.33 KB, text/plain)
2021-04-20 01:42 UTC, Ewerton D.
Details
x11-libs/colord-gtk build.log (colord-gtk.build.log,51.88 KB, text/plain)
2021-04-20 23:07 UTC, Ewerton D.
Details
emerge --info log (emerge.info,6.30 KB, application/x-info)
2021-04-20 23:08 UTC, Ewerton D.
Details
emerge --info =x11-libs/colord-gtk-0.2.0::gentoo (log.log,6.06 KB, text/x-log)
2021-04-21 00:08 UTC, ricardompcampos
Details
Prebuilt copy of file that package is attempting to include (ColordGtk-1.0.gir,28.06 KB, application/xml)
2021-04-23 02:42 UTC, Kenneth G. Strawn
Details
Patched ebuild (colord-gtk-0.2.0.ebuild,1.39 KB, text/plain)
2021-04-23 02:51 UTC, Kenneth G. Strawn
Details
Patch to roll both previous changes into one (0001-Temporary-workaround-for-Bug-784272.patch,29.85 KB, patch)
2021-04-23 03:00 UTC, Kenneth G. Strawn
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ewerton D. 2021-04-20 01:39:08 UTC
x11-misc/colord-1.4.5 USE=introspection compiled, but didn't create Colord-1.0.gir include.

x11-libs/colord-gtk-0.2.0 USE=introspection fails to compile. Couldn't find Colord-1.0.gir.

Reproducible: Always

Steps to Reproduce:
1.Emerge x11-libs/colord-gtk-0.2.0 USE=introspection works, but didn't create Colord-1.0.gir include.
2.Emerge x11-misc/colord-1.4.5 USE=introspection compiled, but didn't create Colord-1.0.gir include.
Actual Results:  
Don't compile colord-gtk.

Expected Results:  
Compiled whit success.
Comment 1 Ewerton D. 2021-04-20 01:42:10 UTC
Created attachment 700944 [details]
x11-libs/colord-gtk build.log
Comment 2 Ewerton D. 2021-04-20 11:35:22 UTC
I'm sorry about my mistake.

Steps to Reproduce:
1.Emerge x11-misc/colord-1.4.5 USE=introspection compiled, but didn't create Colord-1.0.gir include.
2.Emerge x11-libs/colord-gtk-0.2.0 USE=introspection fails to compile. Couldn't find Colord-1.0.gir.
Comment 3 Ewerton D. 2021-04-20 23:04:30 UTC
Comment on attachment 700944 [details]
x11-libs/colord-gtk build.log

compiled by gentoo-lto overlay
Comment 4 Ewerton D. 2021-04-20 23:04:45 UTC
Comment on attachment 700944 [details]
x11-libs/colord-gtk build.log

Compiled with gentoo-lto overlay.
Comment 5 Ewerton D. 2021-04-20 23:07:03 UTC
Created attachment 701352 [details]
x11-libs/colord-gtk build.log

Compiled with default CFLAGS.
Comment 6 Ewerton D. 2021-04-20 23:08:04 UTC
Created attachment 701355 [details]
emerge --info log

emerge --info with default CFLAGS.
Comment 7 ricardompcampos 2021-04-21 00:08:45 UTC
Created attachment 701358 [details]
emerge --info =x11-libs/colord-gtk-0.2.0::gentoo

Hello. Same here.
Comment 8 ricardompcampos 2021-04-21 02:57:44 UTC
Obs: Compiling without introspection use flag works fine. Like in:

$ USE="-introspection" emerge -av colord-gtk
Comment 9 Ewerton D. 2021-04-21 03:10:12 UTC
Thanks Ricardo! With USE -introspect works fine! Bug fixed!
Comment 10 ricardompcampos 2021-04-21 13:23:09 UTC
I think is not that simple. I'm trying to emerge gnome-light here and others packages that require introspection USE flag also doesn't compile. Same error, ninja build failed. Ex: gnome-base/gnome-control-center-40.0
Comment 11 Ewerton D. 2021-04-21 13:26:45 UTC
(In reply to ricardompcampos from comment #10)
> I think is not that simple. I'm trying to emerge gnome-light here and others
> packages that require introspection USE flag also doesn't compile. Same
> error, ninja build failed. Ex: gnome-base/gnome-control-center-40.0

But you can disable introspetcion for colord-gtk package only in package.use. Fine works to compile gnome-light for me.
Comment 12 ricardompcampos 2021-04-21 13:36:13 UTC
(In reply to Ewerton D. from comment #11)
> (In reply to ricardompcampos from comment #10)
> > I think is not that simple. I'm trying to emerge gnome-light here and others
> > packages that require introspection USE flag also doesn't compile. Same
> > error, ninja build failed. Ex: gnome-base/gnome-control-center-40.0
> 
> But you can disable introspetcion for colord-gtk package only in
> package.use. Fine works to compile gnome-light for me.

I tried! Works only for colord-gtk. Still fail for gnome-control-center. Which I think shows that the problem here is not about colord-gtk.
Comment 13 ricardompcampos 2021-04-21 14:23:15 UTC
I'm not sure what happened here. After a @world update (without changing any USE flag for a particular package and having introspection USE flag added to make.conf file, which I tried before) gnome-light and its dependencies were compiled just fine.

These dependencies were failing before: gnome-control-center and gdm. (Not sure about others).

I noticed some libs were upgraded. Maybe that fixed the problem.
Comment 14 Matt Turner gentoo-dev 2021-04-21 20:56:10 UTC
I'm struggling to come up with an explanation for this.

If it had just been a single report, then I would say some one-off bizarre thing happened and Colord-1.0.gir was lost or something.

But two people having the same issue...

There haven't been any changes to x11-misc/colord or x11-libs/colord-gtk that would have affected the presence of Colord-1.0.gir, and the dependency on x11-misc/colord in x11-libs/colord-gtk looks correct:

DEPEND="
    ...
          >=x11-misc/colord-0.1.27:=[introspection?,vala?]
"

I'm confused.
Comment 15 ricardompcampos 2021-04-22 13:17:54 UTC
Yes. Indeed confusing. colord-gtk still doesn't compile with introspection USE flag.

Having introspection enabled globally and disabled just for this package it seems to work. But I can't explain more.
Comment 16 Kenneth G. Strawn 2021-04-23 02:09:34 UTC
The problem is the fact that it passes this parameter to g-ir-scanner (long command snipped to avoid taking up half a page):

/usr/bin/g-ir-scanner <snip> --include=Colord-1.0 <snip>

It's literally trying to include the very thing it's trying to build, hence the "Couldn't find include 'Colord-1.0.gir'" error.

Seems the suspect is lines 20-28 of https://gitweb.gentoo.org/repo/gentoo.git/tree/x11-libs/colord-gtk/files/colord-gtk-0.2.0-optional-introspection.patch:

+if get_option('introspection')
 libcolord_gtk_gir = gnome.generate_gir(
   colord_gtk,
   sources : [
@@ -97,6 +98,7 @@ libcolord_gtk_gir = gnome.generate_gir(
   ],
   install : true
 )
+endif

You'd definitely need to find some other way to do this that doesn't cause a circular build dependency.
Comment 17 Kenneth G. Strawn 2021-04-23 02:42:53 UTC
Created attachment 701790 [details]
Prebuilt copy of file that package is attempting to include

As a temporary workaround I'm attaching a prebuilt copy of ColordGtk-1.0.gir from before this bug began to rear its ugly head. Strongly suggest adding this to https://gitweb.gentoo.org/repo/gentoo.git/tree/x11-libs/colord-gtk/files as a temporary solution while routes to a more permanent fix are explored.
Comment 18 Kenneth G. Strawn 2021-04-23 02:51:49 UTC
Created attachment 701793 [details]
Patched ebuild

Adding a pkg_preinst function to the ebuild for taking Attachment 701790 [details] from ${FILESDIR} and placing it in the first location that g-ir-scanner looks in prior to installation. Hopefully this solves the problem.
Comment 19 Kenneth G. Strawn 2021-04-23 03:00:47 UTC
Created attachment 701796 [details, diff]
Patch to roll both previous changes into one

Twofold temporary workaround:

1. Add a copy of /usr/share/gir-1.0/Colord-1.0.gir to ${FILESDIR}
2. Patch the ebuild to make it install that file prior to installation
Comment 20 Matt Turner gentoo-dev 2021-04-23 03:09:39 UTC
(In reply to Kenneth G. Strawn from comment #16)
> The problem is the fact that it passes this parameter to g-ir-scanner (long
> command snipped to avoid taking up half a page):
> 
> /usr/bin/g-ir-scanner <snip> --include=Colord-1.0 <snip>
> 
> It's literally trying to include the very thing it's trying to build, hence
> the "Couldn't find include 'Colord-1.0.gir'" error.

No... it's not. The command you're referring to is:

/usr/bin/g-ir-scanner ... --output libcolord-gtk/ColordGtk-1.0.gir ... --include=Colord-1.0 ...

Colord-1.0.gir    is provided by x11-misc/colord.
ColordGtk-1.0.gir is provided by x11-libs/colord-gtk.

Subsequent comments are totally off-base as a result.
Comment 21 Kenneth G. Strawn 2021-04-23 03:16:15 UTC
(In reply to Matt Turner from comment #20)
> (In reply to Kenneth G. Strawn from comment #16)
> > The problem is the fact that it passes this parameter to g-ir-scanner (long
> > command snipped to avoid taking up half a page):
> > 
> > /usr/bin/g-ir-scanner <snip> --include=Colord-1.0 <snip>
> > 
> > It's literally trying to include the very thing it's trying to build, hence
> > the "Couldn't find include 'Colord-1.0.gir'" error.
> 
> No... it's not. The command you're referring to is:
> 
> /usr/bin/g-ir-scanner ... --output libcolord-gtk/ColordGtk-1.0.gir ...
> --include=Colord-1.0 ...
> 
> Colord-1.0.gir    is provided by x11-misc/colord.
> ColordGtk-1.0.gir is provided by x11-libs/colord-gtk.
> 
> Subsequent comments are totally off-base as a result.

Alright, I stand corrected ― no circular dependencies, but that still shouldn't keep my patch that provides a temporary workaround from working.
Comment 22 Kenneth G. Strawn 2021-04-23 03:17:27 UTC
(In reply to Matt Turner from comment #20)
> (In reply to Kenneth G. Strawn from comment #16)
> > The problem is the fact that it passes this parameter to g-ir-scanner (long
> > command snipped to avoid taking up half a page):
> > 
> > /usr/bin/g-ir-scanner <snip> --include=Colord-1.0 <snip>
> > 
> > It's literally trying to include the very thing it's trying to build, hence
> > the "Couldn't find include 'Colord-1.0.gir'" error.
> 
> No... it's not. The command you're referring to is:
> 
> /usr/bin/g-ir-scanner ... --output libcolord-gtk/ColordGtk-1.0.gir ...
> --include=Colord-1.0 ...
> 
> Colord-1.0.gir    is provided by x11-misc/colord.
> ColordGtk-1.0.gir is provided by x11-libs/colord-gtk.
> 
> Subsequent comments are totally off-base as a result.

Even better: why not just add x11-misc/colord as a dependency?
Comment 23 Matt Turner gentoo-dev 2021-04-23 03:55:50 UTC
(In reply to Kenneth G. Strawn from comment #22)
> Even better: why not just add x11-misc/colord as a dependency?

It is a dependency.

Are you trolling? Please stop.
Comment 24 Ionen Wolkens gentoo-dev 2021-04-28 08:06:40 UTC
(In reply to Matt Turner from comment #14)
> I'm struggling to come up with an explanation for this.
Had a quick look at this since I keep seeing reports, and it's not surprising.

In colord-1.4.5.ebuild there's nothing using "introspection" except dependencies.

1.3.5 used to have a $(multilib_native_use_enable introspection)
Comment 25 Ionen Wolkens gentoo-dev 2021-04-28 08:31:23 UTC
And I see why may have trouble reproducing, it _is_ installed if have USE=vala, so this is a -vala issue.
Comment 26 Larry the Git Cow gentoo-dev 2021-04-29 01:56:15 UTC
The bug has been closed via the following commit(s):

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

commit 2a99448fde4dd9e790ae7381a466d332bc3812ec
Author:     Matt Turner <mattst88@gentoo.org>
AuthorDate: 2021-04-29 01:48:46 +0000
Commit:     Matt Turner <mattst88@gentoo.org>
CommitDate: 2021-04-29 01:56:07 +0000

    x11-misc/colord: Drop unnecessary (???) build patch
    
    I wrote this patch to fix a failure in the configure stage, but I now
    cannot reproduce the failure without the patch, and the patch made
    USE=vala control whether introspection files were generated and
    installed.
    
    Closes: https://bugs.gentoo.org/784272
    Signed-off-by: Matt Turner <mattst88@gentoo.org>

 ...{colord-1.4.5.ebuild => colord-1.4.5-r1.ebuild} |  1 -
 .../1.4.5-build-Fix-building-without-vapi.patch    | 53 ----------------------
 2 files changed, 54 deletions(-)
Comment 27 Matt Turner gentoo-dev 2021-04-29 01:58:26 UTC
(In reply to Ionen Wolkens from comment #24)
> (In reply to Matt Turner from comment #14)
> > I'm struggling to come up with an explanation for this.
> Had a quick look at this since I keep seeing reports, and it's not
> surprising.
> 
> In colord-1.4.5.ebuild there's nothing using "introspection" except
> dependencies.
> 
> 1.3.5 used to have a $(multilib_native_use_enable introspection)

Yep, there's no option in the meson build system to disable introspection.

(In reply to Ionen Wolkens from comment #25)
> And I see why may have trouble reproducing, it _is_ installed if have
> USE=vala, so this is a -vala issue.

... and my patch to fix the build without vala caused this problem, and now I can't figure out what problem it was fixing, so I've removed it.

Thanks for your insights!