Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 50211 - binutils-2.15.90.0.3-r1 failed C compiler cannot create executables.
Summary: binutils-2.15.90.0.3-r1 failed C compiler cannot create executables.
Status: RESOLVED DUPLICATE of bug 49363
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords:
: 49744 50441 50449 50454 50685 (view as bug list)
Depends on:
Blocks:
 
Reported: 2004-05-06 05:38 UTC by Quequero
Modified: 2005-07-17 13:06 UTC (History)
6 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Quequero 2004-05-06 05:38:11 UTC
Hello all, 
I'm trying to update my binutils package, but emerge stops at configure phase with this error:

creating cache ./config.cache
checking host system type... i686-pc-linux-gnu
checking target system type... i686-pc-linux-gnu
checking build system type... i686-pc-linux-gnu
checking for a BSD compatible install... /bin/install -c
checking for gcc... gcc
checking whether the C compiler (gcc -march=pentium2 -O3 -pipe ) works... no
configure: error: installation or configuration problem: C compiler cannot create executables.

!!! ERROR: sys-devel/binutils-2.15.90.0.3-r1 failed.
!!! Function src_compile, Line 86, Exitcode 1
!!! (no error message)


I'm using gcc: gcc version 3.3.3 20040412 (Gentoo Linux 3.3.3-r3, ssp-3.3-7, pie-8.5.3)

Thanx a lot :)

Que
Comment 1 Davy Van Nieuwenborgh 2004-05-06 06:27:20 UTC
hello,

I have the same problem and not only with this package, but also with file and qcad, ... It all started after a -u world :-(.

It turns out that compiling a simple C-program like

int main() {
	return 0;
}

fails with the following output:

rasto@medion test $ gcc conftest.c
/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.3/../../../../i686-pc-linux-gnu/bin/ld: unrecognized option '--as-needed'
/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.3/../../../../i686-pc-linux-gnu/bin/ld: use the --help option for usage information
collect2: ld returned 1 exit status

Best Regards,
Davy Van Nieuwenborgh
Comment 2 Quequero 2004-05-06 10:36:20 UTC
I don't have this problem with all programs.
I'm trying to update an old (really old) version 
of gentoo on an old pc I have :)... After compiling
30-40 packages, I started to get this problem, with
binutils, gcc, svgalibs but not with every package :(
If I do configure by hand, everything goes fine:

shatzy root # tar xjf /usr/portage/distfiles/binutils-2.15.90.0.3.tar.bz2 
shatzy root # cd binutils-2.15.90.0.3/
shatzy binutils-2.15.90.0.3 # ./configure
creating cache ./config.cache
checking host system type... i686-pc-linux-gnu
checking target system type... i686-pc-linux-gnu
checking build system type... i686-pc-linux-gnu
checking for a BSD compatible install... /bin/install -c
checking for gcc... gcc
checking whether the C compiler (gcc -g -O2 ) works... yes
checking whether the C compiler (gcc -g -O2 ) is a cross-compiler... no
.. snip .. snip ...
checking whether to enable maintainer-specific portions of Makefiles... no
updating cache ./config.cache
creating ./config.status
creating Makefile
shatzy binutils-2.15.90.0.3 # 

So this could be a portage problem? I don't know :/
Que
Comment 3 Daniel Weller 2004-05-06 21:44:04 UTC
I have the same problem, since I upgraded to binutils-2.14.90.0.8-r1, my gcc can't link executables. gcc -c test.c works, but gcc test.o doesn't. It seems to call ld with the option "-as-needed", but ld doesn't recognize that option and fails.

My emerge info:

Portage 2.0.50-r6 (default-x86-1.4, gcc-3.3.3, glibc-2.3.3_pre20040207-r0, 2.6.5-gentoo-r1)
=================================================================
System uname: 2.6.5-gentoo-r1 i686 AMD Athlon(tm) XP 2000+
Gentoo Base System version 1.4.3.13p1
distcc 2.13 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled]
Autoconf: sys-devel/autoconf-2.59-r3
Automake: sys-devel/automake-1.8.3
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CFLAGS="-march=athlon-xp -m3dnow -msse -mfpmath=sse -mmmx -O3 -pipe -fomit-frame-pointer -funroll-loops -frerun-cse-after-loop -frerun-loop-opt -falign-functions=4 -maccumulate-outgoing-args -ffast-math -fprefetch-loop-arrays"
CHOST="i686-pc-linux-gnu"
COMPILER="gcc3"
CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3.1/share/config /usr/kde/3.2/share/config /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/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-march=athlon-xp -m3dnow -msse -mfpmath=sse -mmmx -O3 -pipe -fomit-frame-pointer -funroll-loops -frerun-cse-after-loop -frerun-loop-opt -falign-functions=4 -maccumulate-outgoing-args -ffast-math -fprefetch-loop-arrays"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs ccache sandbox"
GENTOO_MIRRORS="ftp://ftp.snt.utwente.nl/pub/os/linux/gentoo ftp://ftp.tu-clausthal.de/pub/linux/gentoo/"
MAKEOPTS="-j4"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="3dnow X aalib acpi alsa apache2 avi crypt cups dga directfb dvd encode ethereal flash foomaticdb gd gdbm ggi ggz gif gphoto2 gtk gtk2 guile imap imlib java jikes joystick jpeg libg++ libwww mad matroska mikmod mmx motif mpeg mysql ncurses nls nvidia oav oggvorbis opengl pam pdflib perl pic plotutils png python qt qtmt quicktime readline samba sdl slang snmp socks5 spell sse ssl svga tcltk tcpd tetex tiff truetype usb video_cards_nvidia wmf x86 xml2 xmms xosd xv xvid zlib"
Comment 4 Daniel Weller 2004-05-06 22:06:16 UTC
Have a look at this thread:
http://forums.gentoo.org/viewtopic.php?t=166696

This problem obviously isn't new :)
Comment 5 Mr. Bones. (RETIRED) gentoo-dev 2004-05-09 19:50:37 UTC
*** Bug 50441 has been marked as a duplicate of this bug. ***
Comment 6 Mr. Bones. (RETIRED) gentoo-dev 2004-05-09 19:53:33 UTC
*** Bug 50454 has been marked as a duplicate of this bug. ***
Comment 7 SpanKY gentoo-dev 2004-05-10 15:42:02 UTC
*** Bug 50449 has been marked as a duplicate of this bug. ***
Comment 8 Mr. Bones. (RETIRED) gentoo-dev 2004-05-10 16:35:21 UTC
*** Bug 50685 has been marked as a duplicate of this bug. ***
Comment 9 Quequero 2004-05-16 04:55:22 UTC
Ok, i removed --as-needed from gcc config and now it works, btw in gcc ebuild there's a line:

sed -i -e s/HAVE_LD_AS_NEEDED/USE_LD_AS_NEEDED/g ${S}/gcc/config.in

Shouldn't be removed if it's generating so much problems? :p

Que
Comment 10 solar (RETIRED) gentoo-dev 2004-05-16 09:55:10 UTC
sed -i -e s/HAVE_LD_AS_NEEDED/USE_LD_AS_NEEDED/g ${S}/gcc/config.in

Is the fix... Not the problem.
Comment 11 Martin Holzer (RETIRED) gentoo-dev 2004-05-18 23:43:29 UTC
*** Bug 49744 has been marked as a duplicate of this bug. ***
Comment 12 SpanKY gentoo-dev 2004-05-30 22:58:42 UTC

*** This bug has been marked as a duplicate of 49363 ***