InBetweenNames / gentooLTO

A Gentoo Portage configuration for building with -O3, Graphite, and LTO optimizations

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error emerging gcc

StefanSalewski opened this issue · comments

While all was working fine for a year, I get suddenly the error

{standard input}: Assembler messages:
{standard input}: Error: invalid attempt to declare external version name as default in symbol `__gttf2@@GCC_4.3.0'

when emerging new gcc.

Current gcc is

gcc version 12.2.1 20230304 (Gentoo 12.2.1_p20230304 p13)
emerge -pv gcc

These are the packages that would be merged, in order:

Calculating dependencies... done!
Dependency resolution took 2.49 s.

[ebuild     U  ] sys-devel/gcc-12.2.1_p20230428-r1:12::gentoo [12.2.1_p20230304:12::gentoo] USE="(cxx) graphite lto nls nptl openmp pgo (pie) sanitize ssp zstd -ada (-cet) (-custom-cflags) -d -debug -default-stack-clash-protection -default-znow -doc (-fixed-point) -fortran -go -hardened (-ieee-long-double) -jit (-libssp) (-multilib) -objc -objc++ -objc-gc (-pch) -systemtap -test -valgrind -vanilla -vtv" 0 KiB

It seems that no one else has this issue, I have found nothing with Google.

I already tried to emerge latest gcc 13 instead, but same error. I also disabled mold linker, just to be sure, but that makes no difference.

Well, that report was for my notebook, a 64-bit x86 AMD box. I spent nearly a whole day trying to fix it. Latest libtool, latest binutils, and some more, and a lot of Google searches. No progress. And no idea about the cause of the issue. Now, I am testing on my desktop box, recompiling gcc 13.1. That box is very similar to the notebook, and compiling seems to work but is not yet finished. So this issue is really strange. Well, the desktop has 64 GB, and the notebook has only 16 GB RAM. Can out-of-memory produce such an error message? I really do not think so. And I have watched RAM while compiling with the top command and even tried with -j2.

So I have to compare the two boxes very carefully, CFlags, installed packages, and versions, make.conf.

And now, suddenly, it seems to work again? Currently, I am compiling with gcc 13.1 without LTO a gcc 12.3.0 with LTO and PGO enabled, and it does not terminate early, as before. So I assume it works now.

I had emerged latest versions of

sys-devel/binutils
sys-libs/glibc
dev-util/cmake
sys-libs/binutils-libs
dev-libs/mpfr

yesterday, but without a reboot. Maybe reboot made it work?

Well, I am currently emerging directly in the main terminal, without Gnome Shell running. But I do not believe that this makes really a difference, as I have noticed no memory shortcomings.

Well, it works now, even with mold linker. I am not sure if perhaps I forgot to reemerge libtool after emerging a new gcc? But I think I initially emerged only new patch levels of gcc 12.1, so reemerging libtool should not be necessary?

As I have no real idea for the cause of this problem. I will close this issue.