Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 420443 - sys-devel/gcc-4.6.3 configure: error: C compiler cannot create executables
Summary: sys-devel/gcc-4.6.3 configure: error: C compiler cannot create executables
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Gentoo Linux bug wranglers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-06-09 21:34 UTC by Kamen Dokov
Modified: 2012-06-29 03:08 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
imagemagick-6.7.7.5:20120609-222102.log.gz (media-gfx:imagemagick-6.7.7.5:20120609-222102.log.gz,2.43 KB, application/gzip)
2012-06-09 22:24 UTC, Kamen Dokov
Details
nano-2.3.1-r1:20120609-223104.log.gz (app-editors:nano-2.3.1-r1:20120609-223104.log.gz,2.20 KB, application/gzip)
2012-06-09 22:33 UTC, Kamen Dokov
Details
nano-2.3.1-r1 config.log (config.log,10.55 KB, application/octet-stream)
2012-06-09 23:00 UTC, Kamen Dokov
Details
imagemagick-6.7.7.5 config.log (config.log,21.13 KB, text/plain)
2012-06-09 23:05 UTC, Kamen Dokov
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Kamen Dokov 2012-06-09 21:34:12 UTC
I have two Gentoo machines and I have this problem in both of them:

When i switch to gcc-4.6.3 with 

gcc-config -f 2                                                                      
 * Switching native-compiler to x86_64-pc-linux-gnu-4.6.3 ... 
>>> Regenerating /etc/ld.so.cache...                                                                                                                          [ ok ] 

 * If you intend to use the gcc from the new profile in an already 
 * running shell, please remember to do: 

 *   . /etc/profile 

$ . /etc/profile                                                                      
$ env-update 

every package fails with:

checking whether make supports nested variables... yes 
checking whether make supports nested variables... (cached) yes 
checking for style of include used by make... GNU 
checking for x86_64-pc-linux-gnu-gcc... x86_64-pc-linux-gnu-gcc 
checking whether the C compiler works... no 

configure: error: C compiler cannot create executables 

Reproducible: Always

Steps to Reproduce:
1.emerge =sys-devel/gcc-4.6.3
2.gcc-config -f gcc-config -f x86_64-pc-linux-gnu-4.6.3
3.. /etc/profile
4.emerge something
Actual Results:  
checking whether make supports nested variables... yes 
checking whether make supports nested variables... (cached) yes 
checking for style of include used by make... GNU 
checking for x86_64-pc-linux-gnu-gcc... x86_64-pc-linux-gnu-gcc 
checking whether the C compiler works... no 

configure: error: C compiler cannot create executables 

Expected Results:  
To build and install fine.

emerge -pv gcc             
                
[ebuild   R    ] sys-devel/gcc-4.6.3  USE="cxx fortran gtk mudflap (multilib) nls nptl openmp (-altivec) -bootstrap -build -doc (-fixed-point) -gcj -go -graphite (-hardened) (-libssp) -multislot -nocxx -nopie -nossp -objc -objc++ -objc-gc -test -vanilla"


emerge --info    
Portage 2.2.0_alpha90_p1 (default/linux/amd64/10.0/desktop/kde, gcc-4.5.3, glibc-2.15-r2, 3.3.8-gentoo x86_64)
=================================================================
System uname: Linux-3.3.8-gentoo-x86_64-AMD_Athlon-tm-_64_X2_Dual_Core_Processor_6000+-with-gentoo-2.1
Timestamp of tree: Fri, 08 Jun 2012 20:30:01 +0000
app-shells/bash:          4.2_p29
dev-java/java-config:     2.1.11-r3
dev-lang/python:          2.7.3-r2, 3.1.5, 3.2.3-r1
dev-util/cmake:           2.8.8-r2
dev-util/pkgconfig:       0.26
sys-apps/baselayout:      2.1-r1
sys-apps/openrc:          0.10.2
sys-apps/sandbox:         2.5
sys-devel/autoconf:       2.13, 2.69
sys-devel/automake:       1.9.6-r3, 1.11.5, 1.12.1
sys-devel/binutils:       2.22-r1
sys-devel/gcc:            4.5.3-r2, 4.6.3
sys-devel/gcc-config:     1.7.2
sys-devel/libtool:        2.4.2
sys-devel/make:           3.82-r3
sys-kernel/linux-headers: 3.4 (virtual/os-headers)
sys-libs/glibc:           2.15-r2
Repositories: gentoo kollin_local
Installed sets: @kde-4.8, @kde-telepathy
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O2 -pipe -fomit-frame-pointer -ftree-vectorize -ftree-loop-linear"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /etc/env.d /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/X11/xkb /usr/share/config /usr/share/config/kdm/ /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-march=native -O2 -pipe -fomit-frame-pointer -ftree-vectorize -ftree-loop-linear -fvisibility-inlines-hidden"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS=" --quiet-build=y"
FEATURES="assume-digests binpkg-logs candy clean-logs compress-build-logs distlocks ebuild-locks fail-clean fixlafiles news parallel-fetch parallel-install preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
FFLAGS=""
GENTOO_MIRRORS="http://gentoo.osuosl.org http://ftp.gentoo.bg/ ftp://mirrors.telepoint.bg/gentoo/"
LANG="en_GB.UTF-8"
LC_ALL="en_GB.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,-O1 -Wl,--enable-new-dtags"
LINGUAS="en"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_COMPRESS="bzip2"
PORTAGE_COMPRESS_FLAGS="-9"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp/"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="3dnow 3dnowext X a52 aac acl acpi alsa amd64 berkdb bluetooth branding btrfs bzip2 cairo cdda cdr cli consolekit cracklib crypt cups cxx dbus declarative dri dts dvd dvdr egl emboss encode exif fam firefox flac fortran g3dvl gdbm gif gles gles1 gles2 gpm gtk handbook iconv ipv6 jpeg kde kipi lcms ldap libnotify mad mmx mmxext mng modules mp3 mp4 mpeg mudflap multilib nautilus ncurses nls nptl ogg opengl openmp openvg pam pango pcre pdf phonon plasma png policykit ppds pppd pulseaudio qt3support qt4 readline sdl semantic-desktop session spell sse sse2 ssl startup-notification svg tcpd tiff truetype udev udisks unicode upower usb vaapi vdpau vorbis wxwidgets x264 xcb xcomposite xml xorg xscreensaver xulrunner xv xvid zlib" ALSA_CARDS="hda-nvidia" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="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="kexi words flow plan sheets stage tables krita karbon braindump" CAMERAS="ptp2 canon" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="aivdm ashtech clientdebug earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 navcom nmea ntrip oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar timing tnt tripmate tsip ubx" GRUB_PLATFORMS="pc" INPUT_DEVICES="evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="en" PHP_TARGETS="php5-3" PYTHON_TARGETS="python3_2 python2_7" RUBY_TARGETS="ruby18 ruby19" USERLAND="GNU" VIDEO_CARDS="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:  CPPFLAGS, CTARGET, INSTALL_MASK, PORTAGE_BUNZIP2_COMMAND, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON

cc -v 

Using built-in specs. 
COLLECT_GCC=/usr/x86_64-pc-linux-gnu/gcc-bin/4.6.3/gcc 
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-pc-linux-gnu/4.6.3/lto-wrapper 
Target: x86_64-pc-linux-gnu 
Configured with: /var/tmp/portage/sys-devel/gcc-4.6.3/work/gcc-4.6.3/configure --prefix=/usr --bindir=/usr/x86_64-pc-linux-gnu/gcc-bin/4.6.3 --includedir=/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.3/include --datadir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.6.3 --mandir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.6.3/man --infodir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.6.3/info --with-gxx-include-dir=/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.3/include/g++-v4 --host=x86_64-pc-linux-gnu --build=x86_64-pc-linux-gnu --disable-altivec --disable-fixed-point --without-ppl --without-cloog --enable-lto --enable-nls --without-included-gettext --with-system-zlib --disable-werror --enable-secureplt --enable-multilib --enable-libmudflap --disable-libssp --enable-libgomp --with-python-dir=/share/gcc-data/x86_64-pc-linux-gnu/4.6.3/python --enable-checking=release --disable-libgcj --enable-languages=c,c++,fortran --enable-shared --enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu --enable-targets=all --with-bugurl=http://bugs.gentoo.org/ --with-pkgversion='Gentoo 4.6.3 p1.3, pie-0.5.1' 
Thread model: posix 
gcc version 4.6.3 (Gentoo 4.6.3 p1.3, pie-0.5.1)
Comment 1 Chí-Thanh Christopher Nguyễn gentoo-dev 2012-06-09 21:45:57 UTC
Please attach config.log from one of the failed emerges.

Also don't expect anyone to care about your build or runtime failures with those CFLAGS/CXXFLAGS.
Comment 2 Kamen Dokov 2012-06-09 22:24:25 UTC
Created attachment 314821 [details]
imagemagick-6.7.7.5:20120609-222102.log.gz
Comment 3 Kamen Dokov 2012-06-09 22:33:11 UTC
Created attachment 314823 [details]
nano-2.3.1-r1:20120609-223104.log.gz
Comment 4 Mike Gilbert gentoo-dev 2012-06-09 22:38:58 UTC
We need to see config.log; the build log is not sufficient.
Comment 5 Kamen Dokov 2012-06-09 23:00:30 UTC
Created attachment 314825 [details]
nano-2.3.1-r1 config.log

Oops sorry for the build.logs ;)
Comment 6 Kamen Dokov 2012-06-09 23:05:34 UTC
Created attachment 314829 [details]
imagemagick-6.7.7.5 config.log
Comment 7 Kamen Dokov 2012-06-09 23:08:18 UTC
Strangely enough gcc-4.6.3 compiles fine with itself O_0
Comment 8 Chí-Thanh Christopher Nguyễn gentoo-dev 2012-06-09 23:46:34 UTC
conftest.c:1:0: sorry, unimplemented: Graphite loop optimizations cannot be used (-fgraphite, -fgraphite-identity, -floop-block, -floop-flatten, -floop-interchange, -floop-strip-mine, -floop-parallelize-all, and -ftree-loop-linear)

So it seems that you are trying to use graphite on a gcc that was compiled with USE="-graphite"

Reduce your compiler flags to sane values or enable the graphite flag. Reopen this bug if the problem still exists then.
Comment 9 Kamen Dokov 2012-06-09 23:56:22 UTC
(In reply to comment #8)
> conftest.c:1:0: sorry, unimplemented: Graphite loop optimizations cannot be
> used (-fgraphite, -fgraphite-identity, -floop-block, -floop-flatten,
> -floop-interchange, -floop-strip-mine, -floop-parallelize-all, and
> -ftree-loop-linear)
> 
> So it seems that you are trying to use graphite on a gcc that was compiled
> with USE="-graphite"
> 
> Reduce your compiler flags to sane values or enable the graphite flag.
> Reopen this bug if the problem still exists then.

I never used graphite on both of my systems!
And even after recompiling gcc-4.6.3 with itself everything fails with the same error :(
Comment 10 Kent Fredric (IRC: kent\n) (RETIRED) gentoo-dev 2012-06-29 03:08:51 UTC
(In reply to comment #9)
> (In reply to comment #8)
> > conftest.c:1:0: sorry, unimplemented: Graphite loop optimizations cannot be
> > used (-fgraphite, -fgraphite-identity, -floop-block, -floop-flatten,
> > -floop-interchange, -floop-strip-mine, -floop-parallelize-all, and
> > -ftree-loop-linear)
> > 
> > So it seems that you are trying to use graphite on a gcc that was compiled
> > with USE="-graphite"
> > 
> > Reduce your compiler flags to sane values or enable the graphite flag.
> > Reopen this bug if the problem still exists then.
> 
> I never used graphite on both of my systems!
> And even after recompiling gcc-4.6.3 with itself everything fails with the
> same error :(

From the output in emerge --info you pasted in your first message:

CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O2 -pipe -fomit-frame-pointer -ftree-vectorize -ftree-loop-linear"
CHOST="x86_64-pc-linux-gnu"

-ftree-loop-linear is a graphite optimisation, therefor you /have/ used a graphite option whether or no you intended to. 

GCC will of course still build with itself, as CFLAGS are entirely ignored while building GCC.