When I try to emerge binutils-2.15.92.0.2-r2, configure fails with the following error: checking whether the C compiler (gcc -O2 -march=athlon-xp -pipe ) works... no configure: error: installation or configuration problem: C compiler cannot create executables. I've tried emerging with various CFLAGS options to no effect. Thanks for any help. Reproducible: Always Steps to Reproduce: 1.emerge -u binutils 2.Watch configure fail 3.Twiddle thumbs Actual Results: Emerge bailed out. Expected Results: Upgraded binutils. Portage 2.0.51-r8 (default-linux/x86/2004.3, gcc-3.4.3, glibc-2.3.4.20041102-r0, 2.6.8-gentoo-r10 i686) ================================================================= System uname: 2.6.8-gentoo-r10 i686 AMD Athlon(tm) XP 2200+ Gentoo Base System version 1.6.8 Python: dev-lang/python-2.3.4 [2.3.4 (#1, Sep 5 2004, 16:46:59)] distcc 2.18.3 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled] dev-lang/python: 2.3.4 sys-devel/autoconf: 2.13, 2.59-r6 sys-devel/automake: 1.8.5-r2, 1.5, 1.9.3, 1.6.3, 1.7.9, 1.4_p6 sys-devel/binutils: 2.15.92.0.2-r1 sys-devel/libtool: 1.5.10-r2 virtual/os-headers: 2.4.22 ACCEPT_KEYWORDS="x86 ~x86" AUTOCLEAN="yes" CFLAGS="-O2 -march=athlon-xp -pipe -fomit-frame-pointer" CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3.2/share/config /usr/kde/3.3/env /usr/kde/3.3/share/config /usr/kde/3.3/shutdown /usr/kde/3/share/config /usr/share/config /usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/ /var/bind /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d" CXXFLAGS="-O2 -march=athlon-xp -pipe -fomit-frame-pointer" DISTDIR="/usr/portage/distfiles" FEATURES="autoaddcvs autoconfig ccache distlocks sandbox sfperms" GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/Linux/distributions/gentoo" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="3dnow X Xaw3d aalib acpi aim alsa apm arts audiofile avi berkdb bidi bindist bitmap-fonts bonobo bzlib calendar cdr crypt cscope ctype cups curl curlwrappers dba dedicated dga dio directfb divx4linux doc dvd dvdr encode esd f77 fam fastcgi fbcon fdftk fftw flac flash flatfile foomaticdb fortran ftp gb gd gdbm ggi gif gimpprint gmp gnome gphoto2 gpm gstreamer gtk gtk2 gtkhtml guile iconv icq imagemagick imap imlib jabber jack java jikes jpeg junit kde ladcca lcms ldap libg++ libwww mad mbox mcal mikmod mime ming mmap mmx mng motif mozilla mpeg nas ncurses nls nocd offensive oggvorbis openal opengl oscar oss pam pcntl pcre pda pdflib perl php pie plotutils png posix postgres python qt quicktime readline sasl scanner sdl session shared slang sockets speex spell spl ssl svga sysvipc szip tcltk tcpd tetex theora tidy tiff truetype unicode usb videos wmf wxwindows x86 xine xinerama xml xml2 xmms xpm xsl xv xvid yahoo zlib"
can you compile a simple test-program like #include <stdio.h> int main(int argc, char *argv[]) { printf("Hello world\n"); return 0; } without any warnings using your CFLAGS and gcc?
Yup. Works fine.
post the config.log from the build directory as an attachment
Created attachment 46323 [details] config.log Here ya go.
Where should I look for confdefs.h?
If I run configure by hand in /var/tmp/portage/binutils-2.15.92-r2/work/ if builds fine. Something emerge is doing is goofing it up. Perhaps something in my /etc/make.conf or environment variables? Something in the ebuild?
In case it's of use, I have the same problem. I haven't run ebuild manually (don't like too, don't understand it enough :-) My config.log is pretty much the same as Robert's, but my arch is i686 (it's a Nehemiah, if it makes any difference). Other packages emerge just fine, so it's with binutils for some reason. It appears to be creating conftest in a different directory, and thus it can't find confdefs.h.
re-run `gcc-config`
Been there. Got the same problem as the others. Done that. Reran gcc-config And amazingly enough, I can get binutils to compile when I change my gcc to 3.3.4, but 3.4.3 has the "can't create executables" problrm.
Thanks! Worked for me (with gcc-3.4.3. What's your config.log file looks like, Creede?
Sorted it for me too. Thanks.