Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 372377 - sys-devel/gcc[nls] fails to build
Summary: sys-devel/gcc[nls] fails to build
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Gentoo Toolchain Maintainers
Depends on:
Reported: 2011-06-20 15:34 UTC by Duncan Exon Smith
Modified: 2022-10-01 04:24 UTC (History)
3 users (show)

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

emerge --info (emerge-info.txt,4.91 KB, text/plain)
2011-06-20 15:34 UTC, Duncan Exon Smith
build.log (build.log.bz2,70.60 KB, text/plain)
2011-06-20 15:35 UTC, Duncan Exon Smith
More recent emerge --info. (emerge-info.txt,5.31 KB, text/plain)
2011-06-20 16:20 UTC, Duncan Exon Smith
More recent build.log. (build.log.bz2,69.33 KB, application/x-bzip)
2011-06-20 16:20 UTC, Duncan Exon Smith
Proposed fix (gentoo372377a.patch,1.51 KB, patch)
2011-09-19 18:21 UTC, Martin von Gagern
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Duncan Exon Smith 2011-06-20 15:34:34 UTC
As of March, gcc-4.1.2 fails to build with the "nls" use flag.  The failure occurs when building libstdc++.  At the time, adding "-nls" got gcc-4.1.2 compiling again.

I originally reported this as a comment in bug 287667, since the error was almost identical.

I will attach emerge --info as emerge-info.txt and my build.log zipped up into build.log.bz2.  For quick
 gcc-config -c: x86_64-pc-linux-gnu-4.4.5
 USE flags: doc fortran gtk mudflap (multilib) nls nptl
 CFLAGS="-O2 -march=nocona -pipe"

And here is the failure message:

Making all in po
make[5]: Entering directory
msgfmt -o
msgfmt: /var/tmp/portage/sys-devel/gcc-4.1.2/work/build/./gcc/
version `GCC_4.2.0' not found (required by
make[5]: *** [] Error 1

Reproducible: Always

Steps to Reproduce:
CFLAGS="-O2 -march=nocona -pipe"
emerge =sys-devel/gcc-4.1.2
Actual Results:  
Fails to compile.

Expected Results:  
Comment 1 Duncan Exon Smith 2011-06-20 15:34:59 UTC
Created attachment 277609 [details]
emerge --info
Comment 2 Duncan Exon Smith 2011-06-20 15:35:19 UTC
Created attachment 277611 [details]
Comment 3 Duncan Exon Smith 2011-06-20 16:20:12 UTC
Created attachment 277615 [details]
More recent emerge --info.
Comment 4 Duncan Exon Smith 2011-06-20 16:20:34 UTC
Created attachment 277617 [details]
More recent build.log.
Comment 5 Duncan Exon Smith 2011-06-20 16:23:11 UTC
The original attachments were from when I commented in bug 287667.

I just retried, and it still fails in the same place.  I just attached up-to-date emerge --info and build.log in attachment 277615 [details] and attachment 277617 [details].
Comment 6 SpanKY gentoo-dev 2011-06-21 01:44:57 UTC

*** This bug has been marked as a duplicate of bug 295480 ***
Comment 7 Martin von Gagern 2011-09-19 18:21:09 UTC
Created attachment 287037 [details, diff]
Proposed fix

This fix should address the msgfmt error described here, which I can reproduce on my ~amd64 system using gcc x86_64-pc-linux-gnu-4.5.3.

This issue here is about msgfmt printing an error message, whereas bug #295480 is about cc1 priting an almost identical error message, at least in original build log attached there. As the fix here specifically deals with the msgfmt case, I very much doubt that it will resolve any cc1 error messages. I therefore suggest that you un-dupe the bug, assign it to toolchain, apply the patch and close this report fixed.

Can't reproduce bug #295480 here out of the box.
Comment 8 Ryan Hill (RETIRED) gentoo-dev 2014-06-17 02:30:31 UTC
Fixed in 4.7.4 p1.0 so far.
Comment 9 Ted Tanberry 2014-12-03 22:03:31 UTC
would it be possible to get this fix into GCC 4.8 as well? Thanks
Comment 10 Anthony Basile gentoo-dev 2015-02-10 01:06:06 UTC
(In reply to Ted Tanberry from comment #9)
> would it be possible to get this fix into GCC 4.8 as well? Thanks

I have forward ported this to 4.8.4 (patch version 1.1) and 4.9.2 (also patch version 1.1).  I'll see about keeping this patch in all new bumps.
Comment 11 Martin von Gagern 2016-04-24 20:41:22 UTC
I've encountered the issue with gcc 4.6.4 today, after addressing bug 580414 first. It would be nice to see that one fixed as well, although personally I've got my user patch in place now.
Comment 12 Andreas K. Hüttel archtester gentoo-dev 2017-08-30 14:37:54 UTC
Last reports are from 4.7, 4.8, and 4.9.2. Tentatively assuming it's fixed now.

Please reopen with new logs if not.
Comment 13 Larry the Git Cow gentoo-dev 2022-10-01 04:24:05 UTC
The bug has been referenced in the following commit(s):

commit 6fb906ef2da01327d64cea263887ef34c97c1bbf
Author:     Alfredo Tupone <>
AuthorDate: 2022-09-18 07:15:53 +0000
Commit:     Sam James <>
CommitDate: 2022-09-30 00:13:22 +0000

    10.3.0: backport glibc 2.36, gettext/msgfmt patch from 10.4.0
    Signed-off-by: Sam James <>

 10.3.0/gentoo/36_all_msgfmt-libstdc++-link.patch | 39 ++++++++++++++
 10.3.0/gentoo/37_all_glibc_236.patch             | 68 ++++++++++++++++++++++++
 10.3.0/gentoo/README.history                     |  4 ++
 3 files changed, 111 insertions(+)