Open jfikar opened 3 years ago
Getting the same error.
~~UPD: Looks like custom-cflags has no effect:
[ebuild NS ~] sys-devel/gcc-11.1.0-r1:11::gentoo [10.2.0-r5:10::gentoo] USE="(cxx) fortran graphite lto (multilib) nls nptl openmp pch (pie) sanitize ssp (-ada) -custom-cflags% -d -debug -doc (-fixed-point) -go (-hardened) -jit (-libssp) -objc -objc++ -objc-gc -pgo* -systemtap -test -valgrind% -vanilla -vtv* -zstd" 0 KiB
...but still~~
* CFLAGS='-march=native -O3 -fno-semantic-interposition -flto=3 -fno-plt -fgraphite-identity -floop-nest-optimize -fuse-linker-plugin -pipe -Wl,-O1 -Wl,--as-needed'
* CXXFLAGS='-march=native -O3 -fno-semantic-interposition -flto=3 -fno-plt -fgraphite-identity -floop-nest-optimize -fuse-linker-plugin -pipe -Wl,-O1 -Wl,--as-needed'
* FFLAGS='-march=native -O3 -fno-semantic-interposition -flto=3 -fno-plt -fgraphite-identity -floop-nest-optimize -fuse-linker-plugin -pipe -Wl,-O1 -Wl,--as-needed'
* FCFLAGS='-march=native -O3 -fno-semantic-interposition -flto=3 -fno-plt -fgraphite-identity -floop-nest-optimize -fuse-linker-plugin -pipe -Wl,-O1 -Wl,--as-needed'
* F77FLAGS='-march=native -O3 -fno-semantic-interposition -flto=3 -fno-plt -fgraphite-identity -floop-nest-optimize -fuse-linker-plugin -pipe -Wl,-O1 -Wl,--as-needed'
* LDFLAGS='-Wl,-O1 -Wl,--as-needed -march=native -O3 -fno-semantic-interposition -flto=3 -fno-plt -fgraphite-identity -floop-nest-optimize -fuse-linker-plugin -pipe'
* MAKEOPTS='-j3 -l3.5'~~
I was wrong: custom-cflags do work, just filters out the cflags later on.
Are you able to emerge it with just -O2 -march=native
?
Yes, as for me, I was able to bootstrap compiling with a simpler CFLAGS (can't recall what they were exactly, but pretty sure -O2 -march=native
will do)) After that gcc-11 compiles itself just fine. With -custom-cflags
I got the following:
sys-devel/gcc-11.1.0-r1::gentoo was built with the following:
USE="(cxx) fortran graphite lto (multilib) nls nptl openmp pch pgo (pie) sanitize ssp (-ada) -custom-cflags -d -debug -doc (-fixed-point) -go (-hardened) -jit (-libssp) -objc -objc++ -objc-gc -systemtap -test -valgrind -vanilla -vtv -zstd" ABI_X86="(64)"
CFLAGS="-march=native -pipe -Wl,-O1 -Wl,--as-needed -O2"
CXXFLAGS="-march=native -pipe -Wl,-O1 -Wl,--as-needed -O2"
FEATURES="qa-unresolved-soname-deps strict multilib-strict config-protect-if-modified news parallel-fetch xattr usersync unmerge-orphans assume-digests merge-sync protect-owned ipc-sandbox usersandbox sandbox preserve-libs network-sandbox binpkg-logs fixlafiles userpriv pid-sandbox userfetch binpkg-docompress sfperms ebuild-locks unknown-features-warn distlocks unmerge-logs binpkg-dostrip clean-logs"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -march=native -pipe"
Just to make sure I understand, after first building sys-devel/gcc
with -O2 -march=native
, you were able to build it with the GentooLTO defaults without any issues?
Nope, because I added -custom-cflags
to gcc build as suggested and this flag overrides CFLAGS gcc is built with. In my previous post I gave actual CFLAGS reported by emerge --info
.
I can confirm @kanyck. It is enough to comment the line source make.conf.lto
in /etc/portage/make.conf
and gcc emerges just fine. With the line enabled it fails as indicated in the first post. I tried several times, it does not depend on the previous successful build.
Hi, I have the same problem with gcc-11.2.0, is there any progress on this issue? Thanks ENx
I'm not able to emerge gcc-11. I have read about the custom-cflags and filtering -flto* for gcc-11, but it does not help.
It fails very late like this (I think it is after the measuring PGO run, so lto is enabled due to USE=lto?):
Manually invoking
build/gengtype -S /var/tmp/portage/sys-devel/gcc-11.1.0-r1/work/gcc-11.1.0/gcc -I gtyp-input.list -w tmp-gtype.state
in the right folder/var/tmp/portage/sys-devel/gcc-11.1.0-r1/work/build/gcc
gives the same error.strace shows the last open file was
/var/tmp/portage/sys-devel/gcc-11.1.0-r1/work/gcc-11.1.0/gcc/../libcpp/include/line-map.h
I think I already have seen something similar before, but I can't remember the solution anymore :(
Additional info: