View previous topic :: View next topic |
Author |
Message |
jyoung Guru

Joined: 20 Mar 2007 Posts: 484
|
Posted: Sat Mar 01, 2025 2:04 am Post subject: |
|
|
Folks, I'm nearly through the profile migration, but I'm stuck on the final step of emerge --emptytree. For some reason, sys-devel/gcc-14.2.1_p20241221 is failing to compile. I'm copying the error below. This bug is different enough from the original topic of this thread that it might warrant forking off into a new thread, but perhaps someone can spot an obvious issue? I've previously migrated two other machines without issue, and it's weird that gcc of all things would fail to compile.
Code: | /var/tmp/portage/sys-devel/gcc-14.2.1_p20241221/temp/ccVhvw77.ltrans105.ltrans.o(.text+0x369bd): relocation R_X86_64_GOTPC32_TLSDESC against `cfun' must be used in LEA only
/usr/x86_64-pc-linux-gnu/bin/ld: failed to set dynamic section sizes: bad value
collect2: error: ld returned 1 exit status
make[3]: *** [/var/tmp/portage/sys-devel/gcc-14.2.1_p20241221/work/gcc-14-20241221/gcc/cp/Make-lang.in:145: cc1plus] Error 1
make[3]: *** Waiting for unfinished jobs....
rm gfdl.pod gcc.pod gfortran.pod gcov-dump.pod gcov-tool.pod fsf-funding.pod gpl.pod cpp.pod gcov.pod lto-dump.pod
make[2]: *** [Makefile:4876: all-stageprofile-gcc] Error 2
make[1]: *** [Makefile:24632: stageprofile-bubble] Error 2
make: *** [Makefile:24870: profiledbootstrap] Error 2
* ERROR: sys-devel/gcc-14.2.1_p20241221::gentoo failed (compile phase):
* emake failed
|
|
|
Back to top |
|
 |
logrusx Advocate


Joined: 22 Feb 2018 Posts: 2823
|
Posted: Sat Mar 01, 2025 5:45 am Post subject: |
|
|
First, I guess you didn't read the news item carefully. I'm guilty of that too.
Second, use the binhost. All that compilation and fixing the breakages is unnecessary. It also takes a lot of time. It took me nearly 6 hours and a half for ~1500 packages when more than 2/3 of them were binary. And I have decent hardware with enough RAM, good CPU and an SSD disk.
Best Regards,
Georgi
Last edited by logrusx on Sat Mar 01, 2025 12:29 pm; edited 1 time in total |
|
Back to top |
|
 |
NeddySeagoon Administrator


Joined: 05 Jul 2003 Posts: 55011 Location: 56N 3W
|
Posted: Sat Mar 01, 2025 11:08 am Post subject: |
|
|
jyoung,
When you build gcc it bootstraps itself. That means it builds three times.
1. gcc is built with any random C/C++ on the system. It need not be gcc
2. The gcc C/C++ compiler from 1. is used to build gcc C/++, so its now built with itself.
3. The gcc C/C++ from stage 2 builds gcc C/C++ again. This gcc C/C++ should be identical to the output from stage 2. If not the build fails.
Stage 3 continues by building all the languages you have asked for. This then gets installed.
When can see you have a linker error but not at which stage the build failed. For that we need the command that invoked the fail.
I'll infer its well into stage 3 from Code: | rm gfdl.pod gcc.pod gfortran.pod gcov-dump.pod gcov-tool.pod fsf-funding.pod gpl.pod cpp.pod gcov.pod lto-dump.pod | which mentions fortran.
Fortran is not built in the first two stages. Only C and C++, which is all that's needed to build gcc.
The entire build log would be good.
Hmm ...
Code: | make[2]: *** [Makefile:4876: all-stageprofile-gcc] Error 2
make[1]: *** [Makefile:24632: stageprofile-bubble] Error 2
make: *** [Makefile:24870: profiledbootstrap] Error 2 | Profile Guided Optiminisation?
Don't do that to gcc. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
 |
jyoung Guru

Joined: 20 Mar 2007 Posts: 484
|
Posted: Sat Mar 01, 2025 5:44 pm Post subject: |
|
|
Okay, it's likely passing through the first two stages okay, but getting stuck on the third. That make sense, since Fortran is just something that I need for work. I've copied below the output of emerge --info '=sys-devel/gcc-14.2.1_p20241221::gentoo'. I could also include /var/tmp/portage/sys-devel/gcc-14.2.1_p20241221/temp/build.log, although it is quite long. NeddySeagoon, I'm not sure what could have triggered profile guided optimization for gcc. I have tweaked the use flags, but just for items like enabling fortran. logrusx, by using the binhost do you mean in step 8? On my system the file /etc/portage/binrepos.conf doesn't exist. To clarify, this bug is showing up on step 16.
Code: |
Portage 3.0.67 (python 3.11.11-final-0, default/linux/amd64/23.0/split-usr/no-multilib, gcc-14, glibc-2.41, 6.8.7-gentoo x86_64)
=================================================================
System Settings
=================================================================
System uname: Linux-6.8.7-gentoo-x86_64-Intel-R-_Core-TM-_i5-7500_CPU_@_3.40GHz-with-glibc2.41
KiB Mem: 16223056 total, 1716140 free
KiB Swap: 1048572 total, 872680 free
Timestamp of repository gentoo: Tue, 18 Feb 2025 23:45:00 +0000
Head commit of repository gentoo: f164097c5036a41a2d1528bc8274f14f968a07c1
Timestamp of repository brave-overlay: Wed, 30 Aug 2023 14:16:44 +0000
Head commit of repository brave-overlay: 6633c093c271deda5b29101a4ed5a611810268e1
Timestamp of repository vifino-overlay: Sun, 16 Feb 2025 18:52:06 +0000
Head commit of repository vifino-overlay: bd01e8a5db08824a6d3debf73ec4bfdf38bbaefc
sh bash 5.2_p37
ld GNU ld (Gentoo 2.43 p3) 2.43.1
app-misc/pax-utils: 1.3.8::gentoo
app-shells/bash: 5.2_p37::gentoo
dev-build/autoconf: 2.13-r8::gentoo, 2.72-r1::gentoo
dev-build/automake: 1.16.5-r2::gentoo, 1.17-r1::gentoo
dev-build/cmake: 3.31.5::gentoo
dev-build/libtool: 2.5.4::gentoo
dev-build/make: 4.4.1-r100::gentoo
dev-build/meson: 1.7.0::gentoo
dev-java/java-config: 2.3.4::gentoo
dev-lang/perl: 5.40.0-r1::gentoo
dev-lang/python: 3.10.16_p1::gentoo, 3.11.11_p1::gentoo, 3.12.9::gentoo, 3.13.2::gentoo
dev-lang/rust-bin: 1.81.0-r101::gentoo, 1.83.0::gentoo, 1.84.1-r1::gentoo
llvm-core/clang: 18.1.8-r6::gentoo, 19.1.7::gentoo
llvm-core/llvm: 19.1.7::gentoo
sys-apps/baselayout: 2.17::gentoo
sys-apps/openrc: 0.56::gentoo
sys-apps/sandbox: 2.43::gentoo
sys-devel/binutils: 2.43-r2::gentoo, 2.44::gentoo
sys-devel/binutils-config: 5.5.2::gentoo
sys-devel/gcc: 14.2.1_p20241221::gentoo
sys-devel/gcc-config: 2.12.1::gentoo
sys-kernel/linux-headers: 6.13::gentoo (virtual/os-headers)
sys-libs/glibc: 2.41::gentoo
Repositories:
gentoo
location: /usr/portage
sync-type: rsync
sync-uri: rsync://rsync.gentoo.org/gentoo-portage
priority: -1000
volatile: True
sync-rsync-verify-jobs: 1
sync-rsync-extra-opts:
sync-rsync-verify-max-age: 3
sync-rsync-verify-metamanifest: yes
brave-overlay
location: /var/db/repos/brave-overlay
sync-type: git
sync-uri: https://github.com/gentoo-mirror/brave-overlay.git
masters: gentoo
volatile: False
libreoffice
location: /var/db/repos/libreoffice
masters: gentoo
volatile: False
libreoffice-rollback
location: /var/db/repos/libreoffice-rollback
masters: gentoo
volatile: False
libreoffice-rollback2
location: /var/db/repos/libreoffice-rollback2
masters: gentoo
volatile: False
libreoffice-rollback3
location: /var/db/repos/libreoffice-rollback3
masters: gentoo
volatile: False
libreoffice-rollback4
location: /var/db/repos/libreoffice-rollback4
masters: gentoo
volatile: False
libreoffice-rollback5
location: /var/db/repos/libreoffice-rollback5
masters: gentoo
volatile: False
local
location: /var/db/repos/local
masters: gentoo
volatile: False
vifino-overlay
location: /var/db/repos/vifino-overlay
sync-type: git
sync-uri: https://github.com/gentoo-mirror/vifino-overlay.git
masters: gentoo
volatile: False
crossdev
location: /usr/local/portage-crossdev
masters: gentoo
priority: 10
volatile: True
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -march=native"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-O2 -pipe"
DISTDIR="/usr/portage/distfiles"
ENV_UNSET="CARGO_HOME DBUS_SESSION_BUS_ADDRESS DISPLAY GDK_PIXBUF_MODULE_FILE GOBIN GOPATH PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR XDG_STATE_HOME"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs buildpkg-live config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync merge-wait multilib-strict network-sandbox news parallel-fetch pid-sandbox pkgdir-index-trusted preserve-libs protect-owned qa-unresolved-soname-deps sandbox splitdebug strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="https://gentoo.osuosl.org/ https://mirrors.rit.edu/gentoo/ https://mirror.servaxnet.com/gentoo/ http://gentoo-mirror.flux.utah.edu/"
LANG="en_US.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,-z,pack-relative-relocs"
LEX="flex"
MAKEOPTS="-j6"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
SHELL="/bin/bash"
USE="X acl alsa amd64 apulse bzip2 cdda cddb cdr cet crypt dvd elogind eselect-ldso f77 flac fortran gdbm glamor gtk iconv ipv6 libtirpc ncurses nls openmp pam pcre readline seccomp split-usr ssl test-rust tk unicode webp xattr zlib" ABI_X86="64" ADA_TARGET="gcc_13" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_anon authn_dbm authn_file authz_dbm authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir env expires ext_filter file_cache filter headers include info log_config logio mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="mmx mmxext sse sse2" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax navcom oceanserver oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 tsip tripmate tnt ublox" GRUB_PLATFORMS="efi-64" GUILE_SINGLE_TARGET="3-0" GUILE_TARGETS="3-0" INPUT_DEVICES="libinput" KERNEL="linux" LCD_DEVICES="bayrad cfontz glk hd44780 lb216 lcdm001 mtxorb text" LUA_SINGLE_TARGET="lua5-1" LUA_TARGETS="lua5-1" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php8-2" POSTGRES_TARGETS="postgres16" PYTHON_SINGLE_TARGET="python3_12" PYTHON_TARGETS="python3_10 python3_11" RUBY_TARGETS="ruby26" VIDEO_CARDS="intel i965 nvidia" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipp2p iface geoip fuzzy condition tarpit sysrq proto logmark ipmark dhcpmac delude chaos account"
Unset: ADDR2LINE, AR, ARFLAGS, AS, ASFLAGS, CC, CCLD, CONFIG_SHELL, CPP, CPPFLAGS, CTARGET, CXX, CXXFILT, ELFEDIT, EMERGE_DEFAULT_OPTS, EXTRA_ECONF, F77FLAGS, FC, GCOV, GPROF, INSTALL_MASK, LC_ALL, LD, LFLAGS, LIBTOOL, LINGUAS, MAKE, MAKEFLAGS, NM, OBJCOPY, OBJDUMP, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PYTHONPATH, RANLIB, READELF, RUSTFLAGS, SIZE, STRINGS, STRIP, YACC, YFLAGS
=================================================================
Package Settings
=================================================================
sys-devel/gcc-14.2.1_p20241221::gentoo was built with the following:
USE="cet (cxx) (default-stack-clash-protection) (default-znow) fortran graphite jit lto nls openmp pgo (pie) sanitize ssp valgrind zstd -ada (-custom-cflags) -d -debug -doc (-fixed-point) -go -hardened (-ieee-long-double) (-libssp) -modula2 (-multilib) -objc -objc++ -objc-gc (-pch) -rust -systemtap -test (-time64) -vanilla -vtv"
CFLAGS="-pipe -march=native -O2"
CXXFLAGS="-pipe -O2"
|
|
|
Back to top |
|
 |
logrusx Advocate


Joined: 22 Feb 2018 Posts: 2823
|
Posted: Sat Mar 01, 2025 5:54 pm Post subject: |
|
|
jyoung wrote: | logrusx, by using the binhost do you mean in step 8? On my system the file /etc/portage/binrepos.conf doesn't exist. To clarify, this bug is showing up on step 16. |
I don't remember the news item by heart, but I'm pretty certain you made a mistake somewhere in the first steps. Go back and read it very carefully and try to remember exactly what you did. Also there were threads at the time of transitioning to 23.0 for gcc breakages.
Yes, I mean setting up the binrepos.conf and this way using the binhost so you don't need to build all that stuff. And step 16 is pretty fat ahead, if not the last one. If you had problems with gcc you should have already hit them. Once again, did you read the news item carefully and did you follow it exactly?
EDIT:
I mean this particular step:
Code: | 9. Rebuild or reinstall from binary (if available) the following packages in
this order, with the same version as already active:
emerge --ask --oneshot sys-devel/binutils
(you may have to run binutils-config and re-select your binutils now)
emerge --ask --oneshot sys-devel/gcc |
Quote: | (IMPORTANT: If this command wants to rebuild glibc first, do *not* let it do
that; instead, abort and try again with --nodeps added to the command line.) |
Code: | (you may have to run gcc-config and re-select your gcc now)
and the C library, i.e. for glibc-based systems
emerge --ask --oneshot sys-libs/glibc
or for musl-based systems
emerge --ask --oneshot sys-libs/musl |
Did you follow the order exactly?
Best Regards,
Georgi |
|
Back to top |
|
 |
jyoung Guru

Joined: 20 Mar 2007 Posts: 484
|
Posted: Sat Mar 01, 2025 6:18 pm Post subject: |
|
|
logrusx, I'm happy to to go back if need be. I was pretty diligent the first time through, but, agreed, clearly there was some mistake. On step 9, I did catch that note about rebuilding gcc but not glibc, and I did have to use the --nodeps option. Concerning the two notes:
Code: |
(you may have to run binutils-config)
|
Code: | (you may have to run binutils-config) |
I didn't do either of these items, since there was no sign that I had to. Perhaps I should have? |
|
Back to top |
|
 |
logrusx Advocate


Joined: 22 Feb 2018 Posts: 2823
|
Posted: Sat Mar 01, 2025 6:22 pm Post subject: |
|
|
jyoung wrote: | Perhaps I should have? |
I can't tell. Why don't you setup the binhost already? It's THE ABSOLUTE EASIEST SOLUTION. At least for gcc/glibc/binutils. Then you can rebuild them if you want. But once --emptytree breaks, you start from the beginning, do you realize that?
At least start a new thread, I can assure you this is not attracting the attention of the right people.
p.s. or ask the moderators to split it.
Best Regards,
Georgi |
|
Back to top |
|
 |
jyoung Guru

Joined: 20 Mar 2007 Posts: 484
|
Posted: Thu Mar 13, 2025 1:04 am Post subject: |
|
|
Sorry it's been a while since I posted. As you suggested, I was about to start a new thread on the migration topic, but I thought to first isolate the error with
Code: | emerge gcc --oneshot |
That way, as folks chimed in to help, I wouldn't have to emerge world with --emptytree every time. But, that oneshot command succeeded, which seemed weird. So, I returned to the final step of the profile migration instructions
Code: | emerge --ask --emptytree @world |
And that worked this time. Any ideas why?
Since it would seem that the profile is now updated, I checked the status of libreoffice:
Copy/paste work, but operations need to be done twice. The first time, the item is copied as an image, even if it's a textbook or the like. |
|
Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|