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 reference: 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 `/var/tmp/portage/sys-devel/gcc-4.1.2/work/build/x86_64-pc-linux-gnu/libstdc++-v3/po' msgfmt -o de.mo /var/tmp/portage/sys-devel/gcc-4.1.2/work/gcc-4.1.2/libstdc++-v3/po/de.po msgfmt: /var/tmp/portage/sys-devel/gcc-4.1.2/work/build/./gcc/libgcc_s.so.1: version `GCC_4.2.0' not found (required by /usr/lib/gcc/x86_64-pc-linux-gnu/4.4.5/libstdc++.so.6) make[5]: *** [de.mo] Error 1 Reproducible: Always Steps to Reproduce: 1. CFLAGS="-O2 -march=nocona -pipe" CXXFLAGS="$CFLAGS" emerge =sys-devel/gcc-4.1.2 2. 3. Actual Results: Fails to compile. Expected Results: Compiles.
Created attachment 277609 [details] emerge --info
Created attachment 277611 [details] build.log
Created attachment 277615 [details] More recent emerge --info.
Created attachment 277617 [details] More recent build.log.
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].
*** This bug has been marked as a duplicate of bug 295480 ***
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.
Fixed in 4.7.4 p1.0 so far.
would it be possible to get this fix into GCC 4.8 as well? Thanks
(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.
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.
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.
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=6fb906ef2da01327d64cea263887ef34c97c1bbf commit 6fb906ef2da01327d64cea263887ef34c97c1bbf Author: Alfredo Tupone <tupone@gentoo.org> AuthorDate: 2022-09-18 07:15:53 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2022-09-30 00:13:22 +0000 10.3.0: backport glibc 2.36, gettext/msgfmt patch from 10.4.0 Bug: https://bugs.gentoo.org/295480 Bug: https://bugs.gentoo.org/372377 Bug: https://bugs.gentoo.org/843119 Bug: https://bugs.gentoo.org/864717 Bug: https://bugs.gentoo.org/865879 Closes: https://github.com/gentoo/gcc-patches/pull/2 Signed-off-by: Sam James <sam@gentoo.org> 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(+)