Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
failed to emerge gcc at configure phase on a broken system
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
Jackie Lin
Tux's lil' helper
Tux's lil' helper


Joined: 31 May 2017
Posts: 115

PostPosted: Sat Oct 13, 2018 12:17 am    Post subject: failed to emerge gcc at configure phase on a broken system Reply with quote

hello,there.
I have not update world for a long time. there is some package conflicts when I emerge -1 portage this time.
so I uninstalled some packages to solve the conflicts. but the system may be broken.
I failed to emerge gcc at configure phase. the info is below:
Code:

moonlight ~ # emerge -1 gcc

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

Calculating dependencies... done!
[ebuild  NS    ] sys-devel/gcc-7.3.0-r3 [6.4.0-r1] USE="cxx fortran (multilib) nls nptl openmp pch (pie) sanitize ssp vtv (-altivec) -cilk -debug -doc (-fixed-point) -go -graphite (-hardened) (-jit) (-libssp) -mpx -objc -objc++ -objc-gc -pgo -regression-test -vanilla"

Would you like to merge these packages? [Yes/No] y

>>> Verifying ebuild manifests
>>> Running pre-merge checks for sys-devel/gcc-7.3.0-r3

>>> Emerging (1 of 1) sys-devel/gcc-7.3.0-r3::gentoo
 * gcc-7.3.0.tar.xz BLAKE2B SHA512 size ;-) ...                                                                                                                                                               [ ok ]
 * gcc-7.3.0-patches-1.4.tar.bz2 BLAKE2B SHA512 size ;-) ...                                                                                                                                                  [ ok ]
>>> Unpacking source...
>>> Unpacking gcc-7.3.0.tar.xz to /var/tmp/portage/sys-devel/gcc-7.3.0-r3/work
>>> Unpacking gcc-7.3.0-patches-1.4.tar.bz2 to /var/tmp/portage/sys-devel/gcc-7.3.0-r3/work
>>> Source unpacked in /var/tmp/portage/sys-devel/gcc-7.3.0-r3/work
>>> Preparing source in /var/tmp/portage/sys-devel/gcc-7.3.0-r3/work/gcc-7.3.0 ...
 * Applying Gentoo patches ...
 *   10_all_default-fortify-source.patch ...                                                                                                                                                                  [ ok ]
 *   11_all_default-warn-format-security.patch ...                                                                                                                                                            [ ok ]
 *   12_all_default-warn-trampolines.patch ...                                                                                                                                                                [ ok ]
 *   13_all_default-ssp-fix.patch ...                                                                                                                                                                         [ ok ]
 *   25_all_alpha-mieee-default.patch ...                                                                                                                                                                     [ ok ]
 *   34_all_ia64_note.GNU-stack.patch ...                                                                                                                                                                     [ ok ]
 *   50_all_libiberty-asprintf.patch ...                                                                                                                                                                      [ ok ]
 *   51_all_libiberty-pic.patch ...                                                                                                                                                                           [ ok ]
 *   54_all_nopie-all-flags.patch ...                                                                                                                                                                         [ ok ]
 *   55_all_extra-options.patch ...                                                                                                                                                                           [ ok ]
 *   90_all_pr55930-dependency-tracking.patch ...                                                                                                                                                             [ ok ]
 *   91_all_bmi-i386-PR-target-81763.patch ...                                                                                                                                                                [ ok ]
 *   92_all_sh-drop-sysroot-suffix.patch ...                                                                                                                                                                  [ ok ]
 *   93_all_copy-constructible-fix.patch ...                                                                                                                                                                  [ ok ]
 * Done with patching
 * Updating gcc to use automatic PIE building ...
 * Updating gcc to use automatic SSP building ...
 * updating multilib directories to be: ../lib64 ../lib32
 * Running elibtoolize in: gcc-7.3.0/
 *   Applying portage/2.2 patch ...
 *   Applying sed/1.5.6 patch ...
 *   Applying as-needed/2.2.6 patch ...
 * Using GNU config files from /usr/share/gnuconfig
 *   Updating config.sub                                                                                                                                                                                      [ ok ]
 *   Updating config.guess                                                                                                                                                                                    [ ok ]
 * Fixing misc issues in configure files
 * Applying gcc-configure-texinfo.patch ...                                                                                                                                                                   [ ok ]
 * Touching generated files
>>> Source prepared.
>>> Configuring source in /var/tmp/portage/sys-devel/gcc-7.3.0-r3/work/gcc-7.3.0 ...
 * CFLAGS="-O2 -pipe"
 * CXXFLAGS="-O2 -pipe"
 * LDFLAGS="-Wl,-O1 -Wl,--as-needed"

 * PREFIX:          /usr
 * BINPATH:         /usr/x86_64-pc-linux-gnu/gcc-bin/7.3.0
 * LIBPATH:         /usr/lib/gcc/x86_64-pc-linux-gnu/7.3.0
 * DATAPATH:        /usr/share/gcc-data/x86_64-pc-linux-gnu/7.3.0
 * STDCXX_INCDIR:   /usr/lib/gcc/x86_64-pc-linux-gnu/7.3.0/include/g++-v7

 * Languages:       c,c++,fortran

 * Configuring GCC with:
 *      --host=x86_64-pc-linux-gnu
 *      --build=x86_64-pc-linux-gnu
 *      --prefix=/usr
 *      --bindir=/usr/x86_64-pc-linux-gnu/gcc-bin/7.3.0
 *      --includedir=/usr/lib/gcc/x86_64-pc-linux-gnu/7.3.0/include
 *      --datadir=/usr/share/gcc-data/x86_64-pc-linux-gnu/7.3.0
 *      --mandir=/usr/share/gcc-data/x86_64-pc-linux-gnu/7.3.0/man
 *      --infodir=/usr/share/gcc-data/x86_64-pc-linux-gnu/7.3.0/info
 *      --with-gxx-include-dir=/usr/lib/gcc/x86_64-pc-linux-gnu/7.3.0/include/g++-v7
 *      --with-python-dir=/share/gcc-data/x86_64-pc-linux-gnu/7.3.0/python
 *      --enable-languages=c,c++,fortran
 *      --enable-obsolete
 *      --enable-secureplt
 *      --disable-werror
 *      --with-system-zlib
 *      --enable-nls
 *      --without-included-gettext
 *      --enable-checking=release
 *      --with-bugurl=https://bugs.gentoo.org/
 *      --with-pkgversion=Gentoo 7.3.0-r3 p1.4
 *      --disable-esp
 *      --enable-libstdcxx-time
 *      --enable-shared
 *      --enable-threads=posix
 *      --enable-__cxa_atexit
 *      --enable-clocale=gnu
 *      --enable-multilib
 *      --with-multilib-list=m32,m64
 *      --disable-altivec
 *      --disable-fixed-point
 *      --enable-targets=all
 *      --enable-libgomp
 *      --disable-libmudflap
 *      --disable-libssp
 *      --disable-libcilkrts
 *      --disable-libmpx
 *      --enable-vtable-verify
 *      --enable-libvtv
 *      --enable-lto
 *      --without-isl
 *      --enable-libsanitizer
 *      --enable-default-pie
 *      --enable-default-ssp

/var/tmp/portage/sys-devel/gcc-7.3.0-r3/work/gcc-7.3.0/configure --host=x86_64-pc-linux-gnu --build=x86_64-pc-linux-gnu --prefix=/usr --bindir=/usr/x86_64-pc-linux-gnu/gcc-bin/7.3.0 --includedir=/usr/lib/gcc/x86_64-pc-linux-gnu/7.3.0/include --datadir=/usr/share/gcc-data/x86_64-pc-linux-gnu/7.3.0 --mandir=/usr/share/gcc-data/x86_64-pc-linux-gnu/7.3.0/man --infodir=/usr/share/gcc-data/x86_64-pc-linux-gnu/7.3.0/info --with-gxx-include-dir=/usr/lib/gcc/x86_64-pc-linux-gnu/7.3.0/include/g++-v7 --with-python-dir=/share/gcc-data/x86_64-pc-linux-gnu/7.3.0/python --enable-languages=c,c++,fortran --enable-obsolete --enable-secureplt --disable-werror --with-system-zlib --enable-nls --without-included-gettext --enable-checking=release --with-bugurl=https://bugs.gentoo.org/ --with-pkgversion=Gentoo 7.3.0-r3 p1.4 --disable-esp --enable-libstdcxx-time --enable-shared --enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu --enable-multilib --with-multilib-list=m32,m64 --disable-altivec --disable-fixed-point --enable-targets=all --enable-libgomp --disable-libmudflap --disable-libssp --disable-libcilkrts --disable-libmpx --enable-vtable-verify --enable-libvtv --enable-lto --without-isl --enable-libsanitizer --enable-default-pie --enable-default-ssp
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking target system type... x86_64-pc-linux-gnu
checking for a BSD-compatible install... /usr/lib/portage/python2.7/ebuild-helpers/xattr/install -c
checking whether ln works... yes
checking whether ln -s works... yes
checking for a sed that does not truncate output... /bin/sed
checking for gawk... gawk
checking for libatomic support... yes
checking for libitm support... yes
checking for libhsail-rt support... yes
checking for x86_64-pc-linux-gnu-gcc... x86_64-pc-linux-gnu-gcc
checking for C compiler default output file name...
configure: error: in `/var/tmp/portage/sys-devel/gcc-7.3.0-r3/work/build':
configure: error: C compiler cannot create executables
See `config.log' for more details.
 * ERROR: sys-devel/gcc-7.3.0-r3::gentoo failed (configure phase):
 *   failed to run configure
 *
 * Call stack:
 *     ebuild.sh, line  124:  Called src_configure
 *   environment, line 3413:  Called toolchain_src_configure
 *   environment, line 4677:  Called die
 * The specific snippet of code:
 *       CONFIG_SHELL="${EPREFIX}/bin/bash" bash "${S}"/configure "${confgcc[@]}" || die "failed to run configure";
 *
 * If you need support, post the output of `emerge --info '=sys-devel/gcc-7.3.0-r3::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=sys-devel/gcc-7.3.0-r3::gentoo'`.
 *
 * Please include /var/tmp/portage/sys-devel/gcc-7.3.0-r3/work/gcc-build-logs.tar.bz2 in your bug report.
 *
 * The complete build log is located at '/var/log/portage/sys-devel:gcc-7.3.0-r3:20181012-231928.log'.
 * For convenience, a symlink to the build log is located at '/var/tmp/portage/sys-devel/gcc-7.3.0-r3/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/sys-devel/gcc-7.3.0-r3/temp/environment'.
 * Working directory: '/var/tmp/portage/sys-devel/gcc-7.3.0-r3/work/build'
 * S: '/var/tmp/portage/sys-devel/gcc-7.3.0-r3/work/gcc-7.3.0'

>>> Failed to emerge sys-devel/gcc-7.3.0-r3, Log file:

>>>  '/var/log/portage/sys-devel:gcc-7.3.0-r3:20181012-231928.log'

 * Messages for package sys-devel/gcc-7.3.0-r3:
 * Log file: /var/log/portage/sys-devel:gcc-7.3.0-r3:20181012-231928.log

 * ERROR: sys-devel/gcc-7.3.0-r3::gentoo failed (configure phase):
 *   failed to run configure
 *
 * Call stack:
 *     ebuild.sh, line  124:  Called src_configure
 *   environment, line 3413:  Called toolchain_src_configure
 *   environment, line 4677:  Called die
 * The specific snippet of code:
 *       CONFIG_SHELL="${EPREFIX}/bin/bash" bash "${S}"/configure "${confgcc[@]}" || die "failed to run configure";
 *
 * If you need support, post the output of `emerge --info '=sys-devel/gcc-7.3.0-r3::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=sys-devel/gcc-7.3.0-r3::gentoo'`.
 *
 * Please include /var/tmp/portage/sys-devel/gcc-7.3.0-r3/work/gcc-build-logs.tar.bz2 in your bug report.
 *
 * The complete build log is located at '/var/log/portage/sys-devel:gcc-7.3.0-r3:20181012-231928.log'.
 * For convenience, a symlink to the build log is located at '/var/tmp/portage/sys-devel/gcc-7.3.0-r3/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/sys-devel/gcc-7.3.0-r3/temp/environment'.
 * Working directory: '/var/tmp/portage/sys-devel/gcc-7.3.0-r3/work/build'
 * S: '/var/tmp/portage/sys-devel/gcc-7.3.0-r3/work/gcc-7.3.0'
moonlight ~ # emerge --info '=sys-devel/gcc-7.3.0-r3::gentoo'
Portage 2.3.40 (python 2.7.14-final-0, default/linux/amd64/17.0/desktop/plasma, gcc-6.4.0, glibc-2.26-r7, 4.9.16-gentoo x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-4.9.16-gentoo-x86_64-Intel-R-_Core-TM-_i5-3470_CPU_@_3.20GHz-with-gentoo-2.4.1
KiB Mem:     3981968 total,   1620076 free
KiB Swap:    9437180 total,   9437180 free
Timestamp of repository gentoo: Fri, 12 Oct 2018 08:00:01 +0000
Head commit of repository gentoo: 473d4aa8ee4032857045d5ae37b8d2caef209eb7
sh bash 4.4_p12
app-shells/bash:          4.4_p12::gentoo
dev-lang/perl:            5.24.3::gentoo
dev-lang/python:          2.7.14-r1::gentoo, 3.4.5-r1::gentoo, 3.5.4-r1::gentoo, 3.6.3-r1::gentoo
dev-util/cmake:           3.9.6::gentoo
dev-util/pkgconfig:       0.29.2::gentoo
sys-apps/baselayout:      2.4.1-r2::gentoo
sys-apps/openrc:          0.34.11::gentoo
sys-apps/sandbox:         2.10-r4::gentoo
sys-devel/autoconf:       2.13::gentoo, 2.69-r4::gentoo
sys-devel/automake:       1.15.1-r1::gentoo
sys-devel/binutils:       2.30-r4::gentoo
sys-devel/gcc:            6.4.0-r1::gentoo
sys-devel/gcc-config:     1.8-r1::gentoo
sys-devel/libtool:        2.4.6-r3::gentoo
sys-devel/make:           4.2.1::gentoo
sys-kernel/linux-headers: 4.13::gentoo (virtual/os-headers)
sys-libs/glibc:           2.26-r7::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"
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/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -pipe"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--ask"
ENV_UNSET="DBUS_SESSION_BUS_ADDRESS DISPLAY 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"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync multilib-strict news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://mirrors.163.com/gentoo"
LANG="en_US.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="en zh"
MAKEOPTS="-j5"
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 a52 aac acl acpi activities alsa amd64 berkdb bluetooth branding bzip2 cairo cdda cdr cli consolekit crypt cups cxx dbus declarative dri dts dvd dvdr emboss encode exif fam flac fortran gdbm gif glamor gpm gtk iconv icu ipv6 jpeg kde kipi kwallet lcms ldap libnotify libtirpc mad mng mp3 mp4 mpeg multilib ncurses nls nptl ogg opengl openmp pam pango pcre pdf phonon plasma png policykit ppds qml qt5 readline sdl seccomp semantic-desktop spell ssl startup-notification svg tcpd tiff truetype udev udisks unicode upower usb vorbis widgets wxwidgets x264 xattr xcb xcomposite xml xv xvid zlib" ABI_X86="64" 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 plan sheets stage words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="mmx sse sse2 mmxext" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="evdev" KERNEL="linux" L10N="en zh" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-6 php7-1" POSTGRES_TARGETS="postgres9_5 postgres10" PYTHON_SINGLE_TARGET="python3_6" PYTHON_TARGETS="python2_7 python3_6" RUBY_TARGETS="ruby23" USERLAND="GNU" VIDEO_CARDS="amdgpu radeon radeonsi" 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, INSTALL_MASK, LC_ALL, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

moonlight ~ # emerge -pqv '=sys-devel/gcc-7.3.0-r3::gentoo'
[ebuild  NS   ] sys-devel/gcc-7.3.0-r3 [6.4.0-r1] USE="cxx fortran (multilib) nls nptl openmp pch (pie) sanitize ssp vtv (-altivec) -cilk -debug -doc (-fixed-point) -go -graphite (-hardened) (-jit) (-libssp) -mpx -objc -objc++ -objc-gc -pgo -regression-test -vanilla"

could anyone help me? and is there a conveninet way to fix the system? thanks!
_________________
peace, focus.
Back to top
View user's profile Send private message
Jaglover
Watchman
Watchman


Joined: 29 May 2005
Posts: 8291
Location: Saint Amant, Acadiana

PostPosted: Sat Oct 13, 2018 12:22 am    Post subject: Reply with quote

Quote:
so I uninstalled some packages to solve the conflicts

What packages.
_________________
My Gentoo installation notes.
Please learn how to denote units correctly!
Back to top
View user's profile Send private message
Jackie Lin
Tux's lil' helper
Tux's lil' helper


Joined: 31 May 2017
Posts: 115

PostPosted: Sat Oct 13, 2018 7:55 am    Post subject: Reply with quote

I forget them. binutils is one of them. but I installed binutils with emerge -K.
_________________
peace, focus.
Back to top
View user's profile Send private message
mir3x
Guru
Guru


Joined: 02 Jun 2012
Posts: 455

PostPosted: Sat Oct 13, 2018 9:48 am    Post subject: Reply with quote

Code:
configure: error: C compiler cannot create executables

Do u have working gcc ?
It could be error in CFLAGS, CXXFLAGS also but they looks ok.
_________________
Sent from Windows
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54236
Location: 56N 3W

PostPosted: Sat Oct 13, 2018 11:22 am    Post subject: Reply with quote

Jackie Lin,

The list of things you unmerged will be at the end of /var/log/emerge.log

Removing binutils breaks your toolchain. You can't build anything without that, including binutils itself.
On the bright side, binutils is slotted. You might only have removed your active binutils. Try
Code:
binutils-config -l


If you don't have binutils at all, you will need to fetch it from a binhost and install the binary.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Jackie Lin
Tux's lil' helper
Tux's lil' helper


Joined: 31 May 2017
Posts: 115

PostPosted: Mon Oct 15, 2018 12:29 pm    Post subject: Reply with quote

Thanks, it is the problem of binutils.
I did not set the current binutils with eselect. the problem is solved after it is set.
_________________
peace, focus.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming 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