Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 631976

Summary: sys-devel/gcc-5.3.0::gentoo_prefix: cannot bootstrap prefix with sys-devel/gcc-7.1.0-r1
Product: Gentoo/Alt Reporter: hanetzer
Component: Prefix SupportAssignee: Gentoo Prefix <prefix>
Status: RESOLVED FIXED    
Severity: normal    
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
URL: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69959
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 582084, 617524    
Attachments: a rebased version of https://gcc.gnu.org/viewcvs/gcc?view=revision&revision=233572
build.log for gcc-6.4.0
build.log for gcc-7.1.0

Description hanetzer 2017-09-25 05:54:38 UTC
also possibly a problem with sys-devel/gcc-6.*.0; the url listed explains the problem pretty well, but in brief there are some definitions which differ enough between the two to keep it from compiling.

cfns.gperf: In function ‘const char* libc_name_p(const char*, unsigned int)’:
cfns.gperf:101:1: error: ‘const char* libc_name_p(const char*, unsigned int)’ redeclared inline with ‘gnu_inline’ attribute
cfns.gperf:26:14: note: ‘const char* libc_name_p(const char*, unsigned int)’ previously declared here

Reproducible: Always

Steps to Reproduce:
1. ./bootstrap-prefix.sh
2. follow prompts
3. get to sys-devel/gcc-5.3.0::gentoo_prefix
4. fail
Actual Results:  
gcc compilation halts due to the above declaration issues.

Expected Results:  
gcc compilation to continue until completion, and then carrying on with the process of bootstrapping a prefix.

This is a fairly trivial fix; I will be attaching a patch that will fix it for gcc-5.3.0 as presented by ::gentoo_prefix, or barring that you can update gcc in the prefix overlay to at least sys-devel/gcc-5.4.0, which does not appear to require this patch based on my inspection.
Comment 1 hanetzer 2017-09-25 06:01:58 UTC
Created attachment 496336 [details, diff]
a rebased version of https://gcc.gnu.org/viewcvs/gcc?view=revision&revision=233572
Comment 2 hanetzer 2017-09-25 06:26:44 UTC
Created attachment 496338 [details]
build.log for gcc-6.4.0

Confirmed to affect building with gcc-6.4.0 as well.
Comment 3 hanetzer 2017-09-25 06:48:38 UTC
Created attachment 496340 [details]
build.log for gcc-7.1.0
Comment 4 Michael Haubenwallner gentoo-dev 2017-09-25 16:38:16 UTC
Well, this is the very reason I have gcc-4.9 still selected here...
Comment 5 Larry the Git Cow gentoo-dev 2017-09-25 16:39:31 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=aedebf46c4e5e9c88097e000e7fc9133a5e51c3b

commit aedebf46c4e5e9c88097e000e7fc9133a5e51c3b
Author:     Michael Haubenwallner <haubi@gentoo.org>
AuthorDate: 2017-09-25 16:39:25 +0000
Commit:     Michael Haubenwallner <haubi@gentoo.org>
CommitDate: 2017-09-25 16:39:25 +0000

    sys-devel/gcc: build 5.3.0 with 7.1.0 host
    
    Closes: https://bugs.gentoo.org/631976
    Package-Manager: Portage-2.3.10-prefix, Repoman-2.3.3
    RepoMan-Options: --force

 sys-devel/gcc/files/gcc-5.3.0-libc_name_p.patch | 111 ++++++++++++++++++++++++
 sys-devel/gcc/gcc-5.3.0.ebuild                  |   1 +
 2 files changed, 112 insertions(+)
Comment 6 Michael Haubenwallner gentoo-dev 2017-09-25 16:40:09 UTC
(In reply to hanetzer from comment #1)

Thanks a lot for the patch!