Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[Solved] gcc-9.2.0-r2 fails to compile
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
gfaccin
Tux's lil' helper
Tux's lil' helper


Joined: 20 Aug 2004
Posts: 117

PostPosted: Sun Jan 05, 2020 4:40 pm    Post subject: [Solved] gcc-9.2.0-r2 fails to compile Reply with quote

Dear all,

I'm trying to upgrade from gcc-8.3.0-r1 to the newer 9.2.0.

However, I'm getting this error:

Code:

/var/tmp/portage/sys-devel/gcc-9.2.0-r2/work/build/./gcc/xgcc -B/var/tmp/portage/sys-devel/gcc-9.2.0-r2/work/build/./gcc/ -B/usr/x86_64-pc-linux-gnu/bin/ -B/usr/x86_64-pc-linux-gnu/lib/ -isystem /usr/x86_64-pc-linux-gnu/include -isystem /usr/x86_64-pc-linux-gnu/sys-include   -fno-checking -g -O2 -pipe -march=native -O2  -g -O2 -pipe -march=native -DIN_GCC    -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wno-format -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition  -isystem ./include   -fpic -mlong-double-80 -DUSE_ELF_SYMVER  -g -DIN_LIBGCC2 -fbuilding-libgcc -fno-stack-protector -fno-stack-clash-protection   -fpic -mlong-double-80 -DUSE_ELF_SYMVER  -I. -I. -I../.././gcc -I/var/tmp/portage/sys-devel/gcc-9.2.0-r2/work/gcc-9.2.0/libgcc -I/var/tmp/portage/sys-devel/gcc-9.2.0-r2/work/gcc-9.2.0/libgcc/. -I/var/tmp/portage/sys-devel/gcc-9.2.0-r2/work/gcc-9.2.0/libgcc/../gcc -I/var/tmp/portage/sys-devel/gcc-9.2.0-r2/work/gcc-9.2.0/libgcc/../include -I/var/tmp/portage/sys-devel/gcc-9.2.0-r2/work/gcc-9.2.0/libgcc/config/libbid -DENABLE_DECIMAL_BID_FORMAT -DHAVE_CC_TLS  -DUSE_TLS -o _mul_sd.o -MT _mul_sd.o -MD -MP -MF _mul_sd.dep -DFINE_GRAINED_LIBRARIES -DL_mul_sd -DWIDTH=32 -c /var/tmp/portage/sys-devel/gcc-9.2.0-r2/work/gcc-9.2.0/libgcc/config/libbid/_mul_sd.c
/usr/x86_64-pc-linux-gnu/bin/ld: cannot find /lib32/libc.so.6
/usr/x86_64-pc-linux-gnu/bin/ld: cannot find /usr/lib32/libc_nonshared.a
/usr/x86_64-pc-linux-gnu/bin/ld: cannot find /lib32/ld-linux.so.2
collect2: error: ld returned 1 exit status


Any idea on how to fix this?

Below is my emerge --info:

Code:

Portage 2.3.79 (python 2.7.15-final-0, default/linux/amd64/17.1, gcc-8.3.0, glibc-2.29-r2, 4.19.27-gentoo-r1 x86_64)
=================================================================
System uname: Linux-4.19.27-gentoo-r1-x86_64-Intel-R-_Core-TM-_i5-7200U_CPU_@_2.50GHz-with-gentoo-2.6
KiB Mem:     8038548 total,   3774236 free
KiB Swap:   16777212 total,  16777212 free
Timestamp of repository gentoo: Sun, 05 Jan 2020 15:30:01 +0000
Head commit of repository gentoo: 22019e10d1689be0a807884ffaa7fed9148875a0
sh bash 4.4_p23-r1
ld GNU ld (Gentoo 2.31.1 p5) 2.31.1
app-shells/bash:          4.4_p23-r1::gentoo
dev-java/java-config:     2.2.0-r4::gentoo
dev-lang/perl:            5.28.2-r1::gentoo
dev-lang/python:          2.7.15::gentoo, 3.6.5::gentoo
dev-util/cmake:           3.14.3::gentoo
sys-apps/baselayout:      2.6-r1::gentoo
sys-apps/openrc:          0.41.2::gentoo
sys-apps/sandbox:         2.13::gentoo
sys-devel/autoconf:       2.13-r1::gentoo, 2.69-r4::gentoo
sys-devel/automake:       1.16.1-r1::gentoo
sys-devel/binutils:       2.31.1-r4::gentoo, 2.32-r1::gentoo
sys-devel/gcc:            8.3.0-r1::gentoo
sys-devel/gcc-config:     2.0::gentoo
sys-devel/libtool:        2.4.6-r3::gentoo
sys-devel/make:           4.2.1-r4::gentoo
sys-kernel/linux-headers: 4.14-r1::gentoo (virtual/os-headers)
sys-libs/glibc:           2.29-r2::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: -1000
    sync-rsync-verify-jobs: 1
    sync-rsync-verify-metamanifest: yes
    sync-rsync-extra-opts:
    sync-rsync-verify-max-age: 24

ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -march=native -fomit-frame-pointer"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /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 -march=native -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
ENV_UNSET="DBUS_SESSION_BUS_ADDRESS DISPLAY GOBIN PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR"
FCFLAGS="-O2 -pipe -march=native -fomit-frame-pointer"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch pid-sandbox preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe -march=native -fomit-frame-pointer"
GENTOO_MIRRORS="http://mirrors.evowise.com/gentoo/ http://gentoo.c3sl.ufpr.br/ https://mirrors.evowise.com/gentoo/"
LANG="en_US.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j4"
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"
USE="X acl alsa amd64 berkdb bzip2 cli crypt cxx dri fortran gdbm gtk3 iconv ipv6 jpeg libtirpc multilib ncurses nls nptl openmp pam pcre png pulseaudio readline seccomp split-usr ssl tcpd unicode xattr zlib" ABI_X86="64" ADA_TARGET="gnat_2018" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache 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 mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" GRUB_PLATFORMS="efi-64" INPUT_DEVICES="keyboard mouse synaptics libinput" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" NETBEANS_MODULES="apisupport cnd groovy gsf harness ide identity j2ee java mobility nb php profiler soa visualweb webcommon websvccommon xml" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php7-2" POSTGRES_TARGETS="postgres10 postgres11" PYTHON_SINGLE_TARGET="python3_6" PYTHON_TARGETS="python2_7 python3_6" RUBY_TARGETS="ruby24 ruby25" USERLAND="GNU" VIDEO_CARDS="intel nvidia" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CC, CPPFLAGS, CTARGET, CXX, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, LINGUAS, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS




Thanks!


Last edited by gfaccin on Sun Jan 05, 2020 8:33 pm; edited 2 times in total
Back to top
View user's profile Send private message
fturco
Veteran
Veteran


Joined: 08 Dec 2010
Posts: 1038
Location: Italy

PostPosted: Sun Jan 05, 2020 4:52 pm    Post subject: Reply with quote

Do the following files exist on your system?
  • /lib32/libc.so.6
  • /usr/lib32/libc_nonshared.a
  • /lib32/ld-linux.so.2
Back to top
View user's profile Send private message
gfaccin
Tux's lil' helper
Tux's lil' helper


Joined: 20 Aug 2004
Posts: 117

PostPosted: Sun Jan 05, 2020 4:55 pm    Post subject: Reply with quote

fturco wrote:
Do the following files exist on your system?
  • /lib32/libc.so.6
  • /usr/lib32/libc_nonshared.a
  • /lib32/ld-linux.so.2


Nope. I don't even have a /lib32 folder.
Back to top
View user's profile Send private message
gfaccin
Tux's lil' helper
Tux's lil' helper


Joined: 20 Aug 2004
Posts: 117

PostPosted: Sun Jan 05, 2020 6:40 pm    Post subject: Reply with quote

Done some extra digging.

I've got two computers, a desktop and a notebook. Both running Gentoo.

I've just upgraded gcc on the desktop and it worked out of the box. While on the notebook, there's the discussed issue.

Looking for the three files on both systems, this is where they are installed:

Code:

/lib/libc.so.6 -> libc-2.29.so
/lib/ld-linux.so.2 -> ld-2.29.so
/usr/lib/libc_nonshared.a


On the notebook, gcc compilation looks for them in /lib32 folder, which does not exist. This is happening only on the notebook.

Looking for differences between both computers, just figured out that they are running different profiles. The one where it works is the default/linux/amd64/17.1/desktop (stable) profile, while on the default/linux/amd64/17.1 (stable) profile it is not working.

So I switched the notebook to the same profile as the desktop, hoping it could fix the problem. However, it did not.

Still looking for a reason why this would happen in one computer while not on the other.
Back to top
View user's profile Send private message
fedeliallalinea
Bodhisattva
Bodhisattva


Joined: 08 Mar 2003
Posts: 24022
Location: here

PostPosted: Sun Jan 05, 2020 6:43 pm    Post subject: Reply with quote

When you changed profile from 17.0 to 17.1 you follow instructions?
/lib32/ or /usr/lib32/ are directory from old 17.0 profile
_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
gfaccin
Tux's lil' helper
Tux's lil' helper


Joined: 20 Aug 2004
Posts: 117

PostPosted: Sun Jan 05, 2020 6:47 pm    Post subject: Reply with quote

I believe I did.

I've just found out that the app-portage/unsymlink-lib is on version 17. Had version 16 installed. Done the upgrade, just in case.

Running it shows:

Code:

jacare /usr/lib # unsymlink-lib --migrate --pretend
/lib is a real directory! was the migration done already?
Back to top
View user's profile Send private message
gfaccin
Tux's lil' helper
Tux's lil' helper


Joined: 20 Aug 2004
Posts: 117

PostPosted: Sun Jan 05, 2020 7:03 pm    Post subject: Reply with quote

Just tried to recompile the older gcc on the notebook and it fails with the same error.

I'm starting to believe that the profile migration did not go all that well back then.

Is there a way to manually fix this?
Back to top
View user's profile Send private message
gfaccin
Tux's lil' helper
Tux's lil' helper


Joined: 20 Aug 2004
Posts: 117

PostPosted: Sun Jan 05, 2020 8:32 pm    Post subject: Reply with quote

Fixed it!

Seens that during the profile upgrade, I forgot to:

Code:

emerge -1v sys-libs/glibc


Now the gcc-9.2 is compiled on the notebook.

Marking thread as resolved.

Thank you!
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
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