Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 678766 - Stage1 build failed for sys-devel/binutils in ~arch: The following REQUIRED_USE flag constraints are unsatisfied: cxx? ( gold plugins )
Summary: Stage1 build failed for sys-devel/binutils in ~arch: The following REQUIRED_U...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Hosted Projects
Classification: Unclassified
Component: Catalyst (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Release Team
URL:
Whiteboard:
Keywords:
Depends on: 677888
Blocks:
  Show dependency tree
 
Reported: 2019-02-25 17:06 UTC by Alexis Lahouze
Modified: 2019-03-04 09:35 UTC (History)
3 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alexis Lahouze 2019-02-25 17:06:04 UTC
Hi there,

I set up a full stack build from stage1 to stage3 using Catalyst, with ACCEPT_KEYWORDS="~amd64" and default/linux/amd64/17.0 profile.

I ran into an issue caused by the cxx to gold+plugins USE flag transition (see #677888)

The USE flag is almost built in /usr/portage/profiles/base/make.defaults, where there are BOOTSTRAP_USE and USE which add cxx flag explicitly.

sys-devel/binutils now requires gold and plugins USE flags but these are not set.

To prevent this, I have to explicitly override USE flag in catalystrc and package.use, which is not wanted because I think theses stages should be built without any USE flag alteration.

I am not sure if this is the right place to fill this issue because it is related to Portage, please let me know.

Best regards,
Alexis.
Comment 1 Sergei Trofimovich (RETIRED) gentoo-dev 2019-02-25 21:38:24 UTC
bug #663776 change USE=+cxx to USE="+gold +plugins". I think normally none of two should be needed for a default system.

Is USE=cxx (or their substitutes) really needed for stages bootstrap?
Comment 2 Arfrever Frehtes Taifersar Arahesis 2019-02-26 00:11:13 UTC
When commit 39d937a0feb6af576c2c751e44afce92452960d7 [1] is reverted, then this bug should solve itself.
So fixing bug #677888 and reverting above commit looks like optimal solution.

[1] https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=39d937a0feb6af576c2c751e44afce92452960d7
Comment 3 Alexis Lahouze 2019-02-27 08:46:55 UTC
I am not sure which is the right solution.

If there really is a transition to depend on gold+plugins when cxx is activated, the fix must be done be in profiles.

Here are the line in the base profile where the cxx use flag is activated:
https://gitweb.gentoo.org/repo/gentoo.git/tree/profiles/base/make.defaults#n111
https://gitweb.gentoo.org/repo/gentoo.git/tree/profiles/base/make.defaults#n128

If not, the revert of the commit should be enough.
Comment 4 Sergei Trofimovich (RETIRED) gentoo-dev 2019-02-27 21:29:08 UTC
You can try removing
    USE="${USE} cxx"
line locally and check if can bootstrap a system for you.

I think it's not needed nowadays. binutils should have never required it and gcc[cxx] is a forced flag for native builds.
Comment 5 Sergei Trofimovich (RETIRED) gentoo-dev 2019-02-27 21:44:59 UTC
(In reply to Sergei Trofimovich from comment #4)
> You can try removing
>     USE="${USE} cxx"

Sorry, I meant removing 'cxx' from:
    BOOTSTRAP_USE="cxx ...
Comment 6 Alexis Lahouze 2019-02-27 23:11:44 UTC
Removed cxx from both USE and BOOTSTRAP_USE from portage/profiles/base/make.defaults in my local portage snapshot.

Stage1 build is now running.

No USE flag constraint violation for now.

I will tell you if stage2 and stage3 are following nicely.

Thanks!
Comment 7 Alexis Lahouze 2019-02-27 23:14:33 UTC
(In reply to Alexis Lahouze from comment #6)

> Stage1 build is now running.

It seems gcc is now built without cxx use flag.I will see where it is going tomorrow.
Comment 8 Jorge Manuel B. S. Vicetto (RETIRED) Gentoo Infrastructure gentoo-dev 2019-02-28 02:32:14 UTC
For historical context, I'm adding some links here.

https://bugs.gentoo.org/390701 - bug about the broken stages after the move from the nocxx to the cxx use flag
https://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/profiles/base/make.defaults?r1=1.71&r2=1.72 - diff or the original update to the base profile
https://390701.bugs.gentoo.org/attachment.cgi?id=292827 - original complete profile patch

If @toolchain doesn't see any issue with dropping cxx from BOOTSTRAP_USE, I don't see any reason for RelEng to object.
Comment 9 Alexis Lahouze 2019-02-28 10:33:49 UTC
Stage1 build is done.

Stage2 failed, but I don't think it is related to cxx USE flag, this is a Perl error (Can't locate Locale/Messages.pm in @INC).

It seems the build in stage2 is done in stable not with ~amd64, so there is some mess with perl library versions.

Will try to fix this to build stage2 with ~amd64, I'll let you know.
Comment 10 Alexis Lahouze 2019-02-28 12:06:39 UTC
(In reply to Alexis Lahouze from comment #9)

> Will try to fix this to build stage2 with ~amd64, I'll let you know.

Nope, was wrong, ~amd64 keyword is accepted in my build, the issue is elsewhere, I will find out to resume build on stage2.
Comment 11 Alexis Lahouze 2019-02-28 13:46:08 UTC
(In reply to Alexis Lahouze from comment #10)
> (In reply to Alexis Lahouze from comment #9)
> 
> > Will try to fix this to build stage2 with ~amd64, I'll let you know.
> 
> Nope, was wrong, ~amd64 keyword is accepted in my build, the issue is
> elsewhere, I will find out to resume build on stage2.

Stage2 build passed after running perl-cleaner --reallyall. I don't know why I had to do this, I thought perl packages were merged in stage1.

Continuing to stage3.
Comment 12 Alexis Lahouze 2019-02-28 19:05:37 UTC
(In reply to Alexis Lahouze from comment #11)
> (In reply to Alexis Lahouze from comment #10)
> > (In reply to Alexis Lahouze from comment #9)
> > 
> > > Will try to fix this to build stage2 with ~amd64, I'll let you know.
> > 
> > Nope, was wrong, ~amd64 keyword is accepted in my build, the issue is
> > elsewhere, I will find out to resume build on stage2.
> 
> Stage2 build passed after running perl-cleaner --reallyall. I don't know why
> I had to do this, I thought perl packages were merged in stage1.
> 
> Continuing to stage3.

I had a dependency cycle not related to cxx use flag, fixed by adding USE="-filecaps" in catalystrc. Build is ongoing.
Comment 13 Larry the Git Cow gentoo-dev 2019-02-28 20:34:05 UTC
The bug has been closed via the following commit(s):

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

commit 9f709b636e948552d72c4a94cd632bfa30f97e3a
Author:     Sergei Trofimovich <slyfox@gentoo.org>
AuthorDate: 2019-02-28 20:16:58 +0000
Commit:     Sergei Trofimovich <slyfox@gentoo.org>
CommitDate: 2019-02-28 20:33:57 +0000

    profiles/base/make.defaults: drop IUSE=cxx from BOOTSTRAP_USE
    
    IUSE=cxx was removed from binutils in bug #663776 in favour
    of IUSE="gold plugins."
    
    USE=cxx is a no-op for non-cross gcc. And binutils's gold and
    plugin support should not be needed to bootstrap a toolchain.
    
    Reported-by: Alexis Lahouze
    Tested-by: Alexis Lahouze
    Reviewed-by: Jorge Manuel B. S. Vicetto
    Bug: https://bugs.gentoo.org/663776
    Closes: https://bugs.gentoo.org/678766#c8
    Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>

 profiles/base/make.defaults | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Comment 14 Alexis Lahouze 2019-03-01 14:54:28 UTC
(In reply to Sergei Trofimovich from comment #5)
> (In reply to Sergei Trofimovich from comment #4)
> > You can try removing
> >     USE="${USE} cxx"
> 
> Sorry, I meant removing 'cxx' from:
>     BOOTSTRAP_USE="cxx ...

Hi Sergei,

Is there a reason to leave USE="${USE} cxx" in base profile? I have not tested yet but I think it will cause the same kind of issue as for BOOTSTRAP_USE (I removed both for my test and it seems in good way to finish my whole build).
Comment 15 Sergei Trofimovich (RETIRED) gentoo-dev 2019-03-01 19:48:12 UTC
(In reply to Alexis Lahouze from comment #14)
> (In reply to Sergei Trofimovich from comment #5)
> > (In reply to Sergei Trofimovich from comment #4)
> > > You can try removing
> > >     USE="${USE} cxx"
> > 
> > Sorry, I meant removing 'cxx' from:
> >     BOOTSTRAP_USE="cxx ...
> 
> Hi Sergei,
> 
> Is there a reason to leave USE="${USE} cxx" in base profile? I have not
> tested yet but I think it will cause the same kind of issue as for
> BOOTSTRAP_USE (I removed both for my test and it seems in good way to finish
> my whole build).

BOOTSTRAP_USE is a bit special as it uses 'USE="-* ${BOOTSTRAP_USE}" ...'. That it the main source of inconsistency.

USE=cxx is just a default that is supposed to be consistent with rest of defaults in ::gentoo. If it's not then it's likely a different bug.
Comment 16 Alexis Lahouze 2019-03-02 09:01:53 UTC
(In reply to Sergei Trofimovich from comment #15)
> (In reply to Alexis Lahouze from comment #14)
>
> […]
> 
> BOOTSTRAP_USE is a bit special as it uses 'USE="-* ${BOOTSTRAP_USE}" ...'.
> That it the main source of inconsistency.
> 
> USE=cxx is just a default that is supposed to be consistent with rest of
> defaults in ::gentoo. If it's not then it's likely a different bug.

Ok, THank you for your reply!

I will fill a bug for USE="${USE} cxx" if it is needed.
Comment 17 Alexis Lahouze 2019-03-04 09:35:01 UTC
Hello,

Last comment to tell you the build passed from stage1 to stage3 with ~amd64 and unmodified last portage snapshot.

Thank you!