Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
"C compiler cannot create executables" !??!
View unanswered posts
View posts from last 24 hours

Goto page Previous  1, 2, 3 ... 6, 7, 8 ... 10, 11, 12  Next  
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
handraill
n00b
n00b


Joined: 05 Aug 2007
Posts: 1

PostPosted: Sun Aug 05, 2007 4:51 pm    Post subject: same problem installing beryl. new to linux Reply with quote

Hello! I am new to linux and i'm trying 2 install beryl but i get this error :
Quote:
hdr@hdr-desktop:~/Desktop/beryl/beryl-manager-0.2.1$ ./configure
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking whether to enable maintainer-specific portions of Makefiles... no
checking for style of include used by make... GNU
checking for gcc... gcc
checking for C compiler default output file name...
configure: error: C compiler cannot create executables
i tried what some of the members said above but i don't really know how to use those commands . a step by step explanation will be really really nice :( thank you
Back to top
View user's profile Send private message
nellson
n00b
n00b


Joined: 24 Jun 2004
Posts: 54

PostPosted: Mon Sep 24, 2007 12:32 pm    Post subject: Reply with quote

I saw many possible things to try, but I am not having any luck with them. I think my perfectly working system was hosed by me, during an emerge --depclean when trying to dump this system back to just the OS from a web server with Xorg on it. Just when I thought I had it clean such that an emerge -uDavN world gave me 6 packages to update (GCC 4.2 being one of them) I thought I was home free.. and well.. this:

Code:
checking for gcc... gcc
checking whether the C compiler (gcc -O2 -march=pentium4 ) works... no
configure: error: installation or configuration problem: C compiler cannot create executables.
 *
 * ERROR: sys-devel/gcc-4.2.0 failed.
 * Call stack:
 *   ebuild.sh, line 1654:   Called dyn_compile
 *   ebuild.sh, line 990:   Called qa_call 'src_compile'
 *   ebuild.sh, line 44:   Called src_compile
 *   ebuild.sh, line 1334:   Called toolchain_src_compile
 *   toolchain.eclass, line 26:   Called gcc_src_compile
 *   toolchain.eclass, line 1537:   Called gcc_do_configure
 *   toolchain.eclass, line 1337:   Called die
 *
 * failed to run configure
 * If you need support, post the topmost build error, and the call stack if relevant.
 * A complete build log is located at '/var/tmp/portage/sys-devel/gcc-4.2.0/temp/build.log'.
 *


I have been on GCC-4.2 for a bit, no issues. Here are the tidbits that seem usefule:

Code:

Portage 2.1.3.9 (default-linux/x86/2007.0/desktop, gcc-4.2.0, glibc-2.6.1-r0, 2.6.22-gentoo-r6 i686)
=================================================================
System uname: 2.6.22-gentoo-r6 i686 Intel(R) Xeon(TM) CPU 3.00GHz
Timestamp of tree: Mon, 24 Sep 2007 09:30:01 +0000
app-shells/bash:     3.2_p17-r1
dev-lang/python:     2.3.6, 2.5.1-r2
sys-apps/baselayout: 1.12.10-r4
sys-apps/sandbox:    1.2.18.1
sys-devel/autoconf:  2.13, 2.61-r1
sys-devel/automake:  1.8.5-r3, 1.9.6-r2, 1.10
sys-devel/binutils:  2.18
sys-devel/gcc-config: 1.4.0-r2
sys-devel/libtool:   1.5.24
virtual/os-headers:  2.6.22-r2
ACCEPT_KEYWORDS="x86 ~x86"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=pentium4 -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /var/bind"
CONFIG_PROTECT_MASK="/etc/env.d /etc/gconf /etc/php/apache2-php4/ext-active/ /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php4/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php4/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-O2 -march=pentium4 -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="candy distlocks metadata-transfer parallelfetch sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://mirrors.tds.net/gentoo ftp://mirrors.tds.net/gentoo http://gentoo.ccccom.com"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --filter=H_**/files/digest-*"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="acl acpi alsa berkdb bitmap-fonts cairo cdr cli cracklib crypt dbus dmx dri dvd dvdr dvdread eds emboss encode evo fam firefox font-server fortran fuse gd gdbm gif gpm gstreamer gzip hal iconv ipv6 isdnlog ithreads jpeg kerberos ldap lm_sensors logrotate mad math mbox midi mikmod milter mmx mp3 mpeg mudflap ncurses nls nptl nptlonly ogg opengl openmp oss pam pcre pdf perl pic png ppds pppd pwdb python qt3 qt3support qt4 quicktime readline reflection sdl server session simplexml smp snmp spell spl ssl svg syslog tcpd tiff truetype truetype-fonts type1-fonts unicode vorbis win32codecs x86 xinetd xml xmlreader xmlrpc xmlwriter xorg xv zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" 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" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" USERLAND="GNU" VIDEO_CARDS="apm ark chips cirrus cyrix dummy fbdev glint i128 i740 i810 imstt mach64 mga neomagic nsc nv r128 radeon rendition s3 s3virge savage siliconmotion sis sisusb tdfx tga trident tseng v4l vesa vga via vmware voodoo"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, LINGUAS, MAKEOPTS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY


I am happy to try out any new tips, and report what gets this up again.. :)

Nick
Back to top
View user's profile Send private message
loki_val
Retired Dev
Retired Dev


Joined: 13 Nov 2006
Posts: 408
Location: Denmark

PostPosted: Mon Sep 24, 2007 1:37 pm    Post subject: Reply with quote

/var/tmp/portage/sys-devel/gcc-4.2.0/temp/build.log <-- ?
Back to top
View user's profile Send private message
nellson
n00b
n00b


Joined: 24 Jun 2004
Posts: 54

PostPosted: Mon Sep 24, 2007 1:51 pm    Post subject: Reply with quote

Here is the log, though the last few lines showing the errors looks a lot like the inline error I posted earlier. I hope I have not missed anything really obvious:

I tried gcc-config -l && gcc-config 1 (as I only have one entry) and env-update, source /etc/profile

Code:

poindexter ~ # cat /var/tmp/portage/sys-devel/gcc-4.2.0/temp/build.log
>>> Unpacking source...
>>> Unpacking gcc-4.2.0.tar.bz2 to /var/tmp/portage/sys-devel/gcc-4.2.0/work
>>> Unpacking gcc-4.2.0-patches-1.4.tar.bz2 to /var/tmp/portage/sys-devel/gcc-4.2.0/work
>>> Unpacking gcc-4.2.0-uclibc-patches-1.0.tar.bz2 to /var/tmp/portage/sys-devel/gcc-4.2.0/work
 * Applying Gentoo patches ...
 *   00_all_gcc-4.1-alpha-mieee-default.patch ...                                                                                       [ ok ]
 *   00_all_gcc-trampolinewarn.patch ...                                                                                                [ ok ]
 *   01_all_gcc4-ice-hack.patch ...                                                                                                     [ ok ]
 *   02_all_gcc4-ppc64-m32-m64-multilib-only.patch ...                                                                                  [ ok ]
 *   03_all_gcc4-java-nomulti.patch ...                                                                                                 [ ok ]
 *   06_all_gcc4-slow-pthread-self.patch ...                                                                                            [ ok ]
 *   08_all_gcc-4.1-cross-compile.patch ...                                                                                             [ ok ]
 *   10_all_gcc4-libltdl-multilib.patch ...                                                                                             [ ok ]
 *   11_all_gcc-netbsd-symbolic.patch ...                                                                                               [ ok ]
 *   20_all_cris-dont-force-limits-header.patch ...                                                                                     [ ok ]
 *   34_all_arm-bigendian.patch ...                                                                                                     [ ok ]
 *   40_all_gcc42-PR30052.patch ...                                                                                                     [ ok ]
 *   41_all_gcc42-PR32389.patch ...                                                                                                     [ ok ]
 *   42_all_gcc42-PR30252.patch ...                                                                                                     [ ok ]
 *   43_all_gcc42-PR32500.patch ...                                                                                                     [ ok ]
 *   51_all_gcc-3.4-libiberty-pic.patch ...                                                                                             [ ok ]
 *   53_all_gcc4-superh-default-multilib.patch ...                                                                                      [ ok ]
 *   54_all_300-libstdc++-pic.patch ...                                                                                                 [ ok ]
 *   61_all_gcc4-ia64-noteGNUstack.patch ...                                                                                            [ ok ]
 *   62_all_gcc4-noteGNUstack.patch ...                                                                                                 [ ok ]
 *   74_all_sh-pr24836.patch ...                                                                                                        [ ok ]
 *   85_all_gcc-ca-translation-typo.patch ...                                                                                           [ ok ]
 *   90_all_mips-add-march-r10k.patch ...                                                                                               [ ok ]
 *   91_all_mips-ip28_cache_barriers-v4.patch ...                                                                                       [ ok ]
 * Done with patching
 * Applying uClibc patches ...
 *   90_all_100-uclibc-conf.patch ...                                                                                                   [ ok ]
 *   90_all_103-uclibc-conf-noupstream.patch ...                                                                                        [ ok ]
 *   90_all_200-uclibc-locale.patch ...                                                                                                 [ ok ]
 *   90_all_203-uclibc-locale-no__x.patch ...                                                                                           [ ok ]
 *   90_all_204-uclibc-locale-wchar_fix.patch ...                                                                                       [ ok ]
 *   90_all_205-uclibc-locale-update.patch ...                                                                                          [ ok ]
 *   90_all_301-missing-execinfo_h.patch ...                                                                                            [ ok ]
 *   90_all_302-c99-snprintf.patch ...                                                                                                  [ ok ]
 *   90_all_303-c99-complex-ugly-hack.patch ...                                                                                         [ ok ]
 *   90_all_304-index_macro.patch ...                                                                                                   [ ok ]
 *   90_all_305-libmudflap-susv3-legacy.patch ...                                                                                       [ ok ]
 *   90_all_306-libstdc++-namespace.patch ...                                                                                           [ ok ]
 *   90_all_402-libbackend_dep_gcov-iov.h.patch ...                                                                                     [ ok ]
 * Done with patching
 * QA Notice: USE Flag 'elibc_FreeBSD' not in IUSE for sys-devel/gcc-4.2.0
 * Replacing obsolete head/tail with POSIX compliant ones
 *  - fixed contrib/test_summary
 *  - fixed boehm-gc/configure
 *  - fixed fixincludes/configure
 *  - fixed gcc/configure
 *  - fixed gnattools/configure
 *  - fixed intl/configure
 *  - fixed libada/configure
 *  - fixed libcpp/configure
 *  - fixed libdecnumber/configure
 *  - fixed libffi/configure
 *  - fixed libgfortran/configure
 *  - fixed libgomp/configure
 *  - fixed libiberty/configure
 *  - fixed libjava/configure
 *  - fixed libmudflap/configure
 *  - fixed libobjc/configure
 *  - fixed libssp/configure
 *  - fixed libstdc++-v3/configure
 *  - fixed zlib/configure
 *  - fixed ltcf-c.sh
 *  - fixed ltcf-cxx.sh
 *  - fixed ltcf-gcj.sh
 *  - fixed ltmain.sh
 *  - fixed boehm-gc/Makefile.in
 *  - fixed fixincludes/Makefile.in
 *  - fixed gcc/Makefile.in
 *  - fixed gnattools/Makefile.in
 *  - fixed intl/Makefile.in
 *  - fixed libada/Makefile.in
 *  - fixed libcpp/Makefile.in
 *  - fixed libdecnumber/Makefile.in
 *  - fixed libffi/Makefile.in
 *  - fixed libgfortran/Makefile.in
 *  - fixed libgomp/Makefile.in
 *  - fixed libiberty/Makefile.in
 *  - fixed libjava/Makefile.in
 *  - fixed libmudflap/Makefile.in
 *  - fixed libobjc/Makefile.in
 *  - fixed libssp/Makefile.in
 *  - fixed libstdc++-v3/Makefile.in
 *  - fixed zlib/Makefile.in
 * patching gcc version: 4.2.0 (Gentoo 4.2.0 p1.4)
 * Running elibtoolize in: gcc-4.2.0
 *   Applying install-sh-1.5.4.patch ...
 *   Applying ltmain-1.5.patch ...
 *   Applying portage-1.5.10.patch ...
 *   Applying sed-1.5.6.patch ...
 *   Applying test-1.4.1.patch ...
 *   Applying tmp-1.3.5.patch ...
 * Using GNU config files from /usr/share/gnuconfig
 *   Updating libjava/libltdl/config.sub                                                                                                [ ok ]
 *   Updating libjava/classpath/config.sub                                                                                              [ ok ]
 *   Updating config.sub                                                                                                                [ ok ]
 *   Updating libjava/libltdl/config.guess                                                                                              [ ok ]
 *   Updating libjava/classpath/config.guess                                                                                            [ ok ]
 *   Updating config.guess                                                                                                              [ ok ]
 * Fixing misc issues in configure files
 *   Updating configure ...                                                                                                             [ ok ]
 * Touching generated files
 *   Touching gcc/cstamp-h.in
 *   Touching gcc/config.in
 *   Touching libjava/aclocal.m4
 *   Touching libjava/Makefile.in
 *   Touching libjava/configure
 *   Touching libjava/libltdl/aclocal.m4
 *   Touching libjava/libltdl/Makefile.in
 *   Touching libjava/libltdl/configure
 *   Touching libjava/libltdl/config-h.in
 * Applying gcc-spec-env.patch ...                                                                                                      [ ok ]
>>> Source unpacked.
>>> Compiling source in /var/tmp/portage/sys-devel/gcc-4.2.0/work/gcc-4.2.0 ...
 * CFLAGS="-O2 -march=pentium4"
 * CXXFLAGS="-O2 -march=pentium4"
 * Configuring gcc ...
 * running gcc-compiler-configure
 * configuring for GCC_LANG: c,c++,fortran

 * PREFIX:                      /usr
 * BINPATH:                     /usr/i686-pc-linux-gnu/gcc-bin/4.2.0
 * LIBPATH:                     /usr/lib/gcc/i686-pc-linux-gnu/4.2.0
 * DATAPATH:            /usr/share/gcc-data/i686-pc-linux-gnu/4.2.0
 * STDCXX_INCDIR:       /usr/lib/gcc/i686-pc-linux-gnu/4.2.0/include/g++-v4

 * Configuring GCC with: 
        --prefix=/usr
        --bindir=/usr/i686-pc-linux-gnu/gcc-bin/4.2.0
        --includedir=/usr/lib/gcc/i686-pc-linux-gnu/4.2.0/include
        --datadir=/usr/share/gcc-data/i686-pc-linux-gnu/4.2.0
        --mandir=/usr/share/gcc-data/i686-pc-linux-gnu/4.2.0/man
        --infodir=/usr/share/gcc-data/i686-pc-linux-gnu/4.2.0/info
        --with-gxx-include-dir=/usr/lib/gcc/i686-pc-linux-gnu/4.2.0/include/g++-v4
        --host=i686-pc-linux-gnu
        --build=i686-pc-linux-gnu
        --disable-altivec
        --enable-nls
        --without-included-gettext
        --with-system-zlib
        --disable-checking
        --disable-werror
        --enable-secureplt
        --disable-libunwind-exceptions
        --disable-multilib
        --enable-libmudflap
        --disable-libssp
        --disable-libgcj
        --with-arch=i686
        --enable-languages=c,c++,fortran
        --enable-shared
        --enable-threads=posix
        --enable-__cxa_atexit
        --enable-clocale=gnu 

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... /usr/bin/install -c
checking whether ln works... yes
checking whether ln -s works... yes
checking for gcc... gcc
checking whether the C compiler (gcc -O2 -march=pentium4 ) works... no
configure: error: installation or configuration problem: C compiler cannot create executables.
 *
 * ERROR: sys-devel/gcc-4.2.0 failed.
 * Call stack:
 *   ebuild.sh, line 1654:   Called dyn_compile
 *   ebuild.sh, line 990:   Called qa_call 'src_compile'
 *   ebuild.sh, line 44:   Called src_compile
 *   ebuild.sh, line 1334:   Called toolchain_src_compile
 *   toolchain.eclass, line 26:   Called gcc_src_compile
 *   toolchain.eclass, line 1537:   Called gcc_do_configure
 *   toolchain.eclass, line 1337:   Called die
 *
 * failed to run configure
 * If you need support, post the topmost build error, and the call stack if relevant.
 * A complete build log is located at '/var/tmp/portage/sys-devel/gcc-4.2.0/temp/build.log'.
 *
Back to top
View user's profile Send private message
nellson
n00b
n00b


Joined: 24 Jun 2004
Posts: 54

PostPosted: Mon Sep 24, 2007 6:05 pm    Post subject: SOLVED for me Reply with quote

A gentoo-dev buddy of mine slapped me and had me do this:

1. Repeat the phrase "I will not muck with my compiler, I am not worthy."
2. rm /etc/env.d/05compiler (was still referencing some old 4.1ish compiler)
3. gcc-config 1 ; env-update ; source /etc/profile
4. tried compiling, failed again, he had me pull versions on 'gcc' and 'ld', of which ld was NOT FOUND.
5. binutils-config 1 ; env-update ; source /etc/profile
6. ld now found, compiler all better :)

Now, as promised: "I will not muck with my compiler, I am not worthy.."

Thanks all!
Back to top
View user's profile Send private message
ianw1974
Guru
Guru


Joined: 18 Oct 2006
Posts: 377
Location: UK and Poland

PostPosted: Mon Nov 26, 2007 12:51 pm    Post subject: Reply with quote

I've tried everything, and it still isn't working for me.

I'm trying to build a new system after downloading the stage3 and portage-latest, and the damn thing won't work. Never, ever had this before. I'm guessing the stage3 is borked.
Back to top
View user's profile Send private message
OmSai
l33t
l33t


Joined: 30 Sep 2007
Posts: 604
Location: Manchester, CT, USA

PostPosted: Mon Nov 26, 2007 2:31 pm    Post subject: Reply with quote

ianw1974 wrote:
I've tried everything, and it still isn't working for me.
Could you please be a little more descriptive as to what you've tried?
Also it helps to post your error info :wink:


I'd give these options a shot if you haven't already:
  1. Download and use the gcc binary from a BINHOST server.
  2. Alternatively, quickpkg the gcc binary from a LiveCD
Back to top
View user's profile Send private message
ianw1974
Guru
Guru


Joined: 18 Oct 2006
Posts: 377
Location: UK and Poland

PostPosted: Wed Nov 28, 2007 11:25 am    Post subject: Reply with quote

I meant everything suggested here :)

Anyway, I re-downloaded the stage3, and this was where the problem lied. Obviously it didn't download properly the first time, which was why I ended up with the failure. When I extracted the second one I downloaded, it allowed me to continue normally with the system.

However, I then came across another problem, since I was building it inside a vmware machine on an AMD Athlon 64 X2, and it kept complaining of NFS errors when trying to mount root, and my kernel was compiled correctly. I gave up on this in the end, as it was taking too much of my time up. Even the backup of the old system to the new, with recompiled kernel was failing. The vmware was using a PCI-X Fusion, and I had PCI-X and the Fusion driver compiled into the kernel. I was using 32 bit, not 64 bit in the vm, and the machine I was migrating.
Back to top
View user's profile Send private message
talbotdeg4
n00b
n00b


Joined: 23 Dec 2004
Posts: 6

PostPosted: Mon Dec 31, 2007 5:37 pm    Post subject: Reply with quote

Here's my make.conf. It's worked for years. I thought at one point that I needed a newer version of gcc. I tried emerging it and it failed. Then I found out that my proc didn't support gcc4.1.2 (well, according to the forum I was on).

glacier talbot # cat /etc/make.conf
# These settings were set by the catalyst build script that automatically built this stage
# Please consult /etc/make.conf.example for a more detailed example
CFLAGS="-O2 -march=pentium3 -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
CXXFLAGS="${CFLAGS}"
MAKEOPTS="-j2"
ALSA_CARDS="ens1371"
USE="apache2"
USE="-qt -kde gtk gnome hal howl"
USE="net"
USE="oscar"
USE="tk"
GENTOO_MIRRORS="http://gentoo.mirrors.pair.com/ http://gentoo.chem.wisc.edu/gentoo/ http://cudlug.cudenver.edu/gentoo/ "

gcc version:

glacier log # gcc-config -l
[1] i686-pc-linux-gnu-3.3.4 *
_________________
"We are moving toward a dictatorship of relativism, which does not recognize anything as for certain and which has as its highest goal one's own ego and one's own desires."
- Pope Benedict XVI
Back to top
View user's profile Send private message
OmSai
l33t
l33t


Joined: 30 Sep 2007
Posts: 604
Location: Manchester, CT, USA

PostPosted: Mon Dec 31, 2007 7:36 pm    Post subject: Reply with quote

talbotdeg4 wrote:
It's worked for years. I thought at one point that I needed a newer version of gcc. I tried emerging it and it failed. Then I found out that my proc didn't support gcc4.1.2 (well, according to the forum I was on)
...
gcc version:

glacier log # gcc-config -l
[1] i686-pc-linux-gnu-3.3.4 *
You need to at least upgrade gcc to 3.4.x since portage no longer supports <3.3.x.
Then emerge libstdc++-v3 for gcc-3.3.x support.

Neddy explains it in: can't compile gcc-3.3.6-r1
_________________
Gentoo is the stick-shift of Linux.
You work it manually, it has somewhat better performance, but it's really for the fun of it.
Back to top
View user's profile Send private message
Thunrida
n00b
n00b


Joined: 14 Jul 2004
Posts: 24

PostPosted: Wed Jan 02, 2008 1:54 pm    Post subject: Reply with quote

Hi.

I cannot emerge anything anymore, tried basically everything, last attempt was as dc46and2 suggested, dl stage3, build system in chroot and then emerge -aek system. I had to build some additional packages in chroot for this to work, but in the end it emerged whole system from prebuild packages in chroot.

But still nothing is changed. No matter what I build, I get die "econf failed", and in log there are different types of errors:

Code:

LESS
>>> Compiling source in /var/tmp/portage/sys-apps/less-416/work/less-416 ...
./configure --prefix=/usr --host=i686-pc-linux-gnu --mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc --localstatedir=/var/lib --build=i686-pc-linux-gnu
checking for i686-pc-linux-gnu-gcc... i686-pc-linux-gnu-gcc
checking for C compiler default output file name...
configure: error: C compiler cannot create executables
See `config.log' for more details.

// did not include config.log, cause i don't see any additional error, except configure:2144: error: C compiler cannot create executables
//See `config.log' for more details.



BASELAYOUT
make: Entering directory `/var/tmp/portage/sys-apps/baselayout-1.12.10-r5/work/baselayout-1.12.10/src'
i686-pc-linux-gnu-gcc -O2 -march=i686 -pipe -DLIBDIR=\"lib\"    consoletype.c   -o consoletype
/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/../../../../i686-pc-linux-gnu/bin/ld: cannot find -lgcc_s
collect2: ld returned 1 exit status

KATE
checking for C compiler default output file name...
configure: error: C compiler cannot create executables
See `config.log' for more details.

DHCPCD
i686-pc-linux-gnu-gcc  arp.o client.o common.o configure.o dhcp.o dhcpcd.o duid.o info.o interface.o ipv4ll.o logger.o signals.o socket.o  -o dhcpcd
/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/../../../../i686-pc-linux-gnu/bin/ld: cannot find -lgcc_s
collect2: ld returned 1 exit status


My make.conf:
Code:

CFLAGS="-O2 -march=i686 -pipe"
CHOST="i686-pc-linux-gnu"
CXXFLAGS="${CFLAGS}"
MAKEOPTS="-j3"
USE="-xmms -gtk -gnome opengl xinerama xv qt3 kde hal dvd alsa cdr samba truetype cups gimpprint ppds foomaticdb apache2 ssl php postgres xml xml2 pam unicode nptl nptlonly"

INPUT_DEVICES="keyboard mouse"
VIDEO_CARDS="nvidia"


gcc looks fine:

# gcc-config -c
i686-pc-linux-gnu-4.1.2

Any help much appreciated, have no idea what else to try.
Back to top
View user's profile Send private message
BrummBrumm
n00b
n00b


Joined: 04 Jan 2008
Posts: 58

PostPosted: Fri Jan 04, 2008 11:57 pm    Post subject: Reply with quote

Hi.

i got quite the same problem as Thunrida but with gcc-version 3.4.6, the hardened-profile and -march set to pentium-m. I also do not know what else to try.

After reading some logfiles i found this in /etc/log/emerge.log

Quote:

1199012685: Started emerge on: Dec 30, 2007 12:04:45
1199012685: *** emerge --newuse --deep --update world
1199012686: >>> emerge (1 of 5) sys-libs/ncurses-5.6-r2 to /
1199012686: === (1 of 5) Cleaning (sys-libs/ncurses-5.6-r2::/usr/portage/sys-libs/ncurses/ncurses-5.6-r2.ebuild)
1199012687: === (1 of 5) Compiling/Merging (sys-libs/ncurses-5.6-r2::/usr/portage/sys-libs/ncurses/ncurses-5.6-r2.ebuild)
1199012860: >>> AUTOCLEAN: sys-libs/ncurses
1199012860: === Unmerging... (sys-libs/ncurses-5.6-r1)
1199012867: >>> unmerge success: sys-libs/ncurses-5.6-r1
1199012867: === (1 of 5) Post-Build Cleaning (sys-libs/ncurses-5.6-r2::/usr/portage/sys-libs/ncurses/ncurses-5.6-r2.ebuild)
1199012867: ::: completed emerge (1 of 5) sys-libs/ncurses-5.6-r2 to /
1199012867: >>> emerge (2 of 5) sys-devel/gcc-config-1.4.0-r4 to /
1199012867: === (2 of 5) Cleaning (sys-devel/gcc-config-1.4.0-r4::/usr/portage/sys-devel/gcc-config/gcc-config-1.4.0-r4.ebuild)
1199012867: === (2 of 5) Compiling/Merging (sys-devel/gcc-config-1.4.0-r4::/usr/portage/sys-devel/gcc-config/gcc-config-1.4.0-r4.ebuild)
1199012873: >>> AUTOCLEAN: sys-devel/gcc-config
1199012873: === Unmerging... (sys-devel/gcc-config-1.3.16)
1199012874: >>> unmerge success: sys-devel/gcc-config-1.3.16
1199012874: === (2 of 5) Post-Build Cleaning (sys-devel/gcc-config-1.4.0-r4::/usr/portage/sys-devel/gcc-config/gcc-config-1.4.0-r4.ebuild)
1199012874: ::: completed emerge (2 of 5) sys-devel/gcc-config-1.4.0-r4 to /
1199012874: >>> emerge (3 of 5) app-shells/bash-3.2_p17-r1 to /
1199012875: === (3 of 5) Cleaning (app-shells/bash-3.2_p17-r1::/usr/portage/app-shells/bash/bash-3.2_p17-r1.ebuild)
1199012875: === (3 of 5) Compiling/Merging (app-shells/bash-3.2_p17-r1::/usr/portage/app-shells/bash/bash-3.2_p17-r1.ebuild)
1199012878: *** exiting unsuccessfully with status '1'.
1199012878: *** terminating.

It seems to got something to do with the update of gcc-config while after that update nothing could be compiled anymore.
Downgrading to the prior version does not work as i can't compile anything ...
Back to top
View user's profile Send private message
mardicas
Tux's lil' helper
Tux's lil' helper


Joined: 07 Jan 2008
Posts: 112
Location: Tallinn

PostPosted: Mon Jan 07, 2008 12:06 am    Post subject: Reply with quote

Tryed every *fast* solution mentioned here...no good :-(

One thing i noticed is that almost all of you seem to get this situation during a large update , after emerging gcc or binutils or only for a certain package.
But i simply reemerged some bluez utils and librarys...many times...and at one point gcc just gave me the sick error that tells me absolutley nothing...
I realy have no idea how this happend...i did not change make.conf, i did not emerge any sort of system package, i have only(no 3. something) gcc 4.1.2 installed....very confusing...
Doublechecked that all the paths in env.d/05.. are there and are the only options at all...

It seems that reinstalling stage3 from a chroot seems the most tempting way at the moment...since i just finished configuring and compiling my laptop :evil:
_________________
http://mardicas.dyndns.org
Back to top
View user's profile Send private message
OmSai
l33t
l33t


Joined: 30 Sep 2007
Posts: 604
Location: Manchester, CT, USA

PostPosted: Mon Jan 07, 2008 2:18 am    Post subject: Reply with quote

BrummBrumm wrote:
i got quite the same problem as Thunrida but with gcc-version 3.4.6, the hardened-profile and -march set to pentium-m. I also do not know what else to try.

After reading some logfiles i found this in /etc/log/emerge.log
Quote:
1199012685: Started emerge on: Dec 30, 2007 12:04:45
1199012685: *** emerge --newuse --deep --update world
1199012686: >>> emerge (1 of 5) sys-libs/ncurses-5.6-r2 to /
1199012686: === (1 of 5) Cleaning (sys-libs/ncurses-5.6-r2::/usr/portage/sys-libs/ncurses/ncurses-5.6-r2.ebuild)
1199012687: === (1 of 5) Compiling/Merging (sys-libs/ncurses-5.6-r2::/usr/portage/sys-libs/ncurses/ncurses-5.6-r2.ebuild)
1199012860: >>> AUTOCLEAN: sys-libs/ncurses
1199012860: === Unmerging... (sys-libs/ncurses-5.6-r1)
1199012867: >>> unmerge success: sys-libs/ncurses-5.6-r1
1199012867: === (1 of 5) Post-Build Cleaning (sys-libs/ncurses-5.6-r2::/usr/portage/sys-libs/ncurses/ncurses-5.6-r2.ebuild)
1199012867: ::: completed emerge (1 of 5) sys-libs/ncurses-5.6-r2 to /
1199012867: >>> emerge (2 of 5) sys-devel/gcc-config-1.4.0-r4 to /
1199012867: === (2 of 5) Cleaning (sys-devel/gcc-config-1.4.0-r4::/usr/portage/sys-devel/gcc-config/gcc-config-1.4.0-r4.ebuild)
1199012867: === (2 of 5) Compiling/Merging (sys-devel/gcc-config-1.4.0-r4::/usr/portage/sys-devel/gcc-config/gcc-config-1.4.0-r4.ebuild)
1199012873: >>> AUTOCLEAN: sys-devel/gcc-config
1199012873: === Unmerging... (sys-devel/gcc-config-1.3.16)
1199012874: >>> unmerge success: sys-devel/gcc-config-1.3.16
1199012874: === (2 of 5) Post-Build Cleaning (sys-devel/gcc-config-1.4.0-r4::/usr/portage/sys-devel/gcc-config/gcc-config-1.4.0-r4.ebuild)
1199012874: ::: completed emerge (2 of 5) sys-devel/gcc-config-1.4.0-r4 to /
1199012874: >>> emerge (3 of 5) app-shells/bash-3.2_p17-r1 to /
1199012875: === (3 of 5) Cleaning (app-shells/bash-3.2_p17-r1::/usr/portage/app-shells/bash/bash-3.2_p17-r1.ebuild)
1199012875: === (3 of 5) Compiling/Merging (app-shells/bash-3.2_p17-r1::/usr/portage/app-shells/bash/bash-3.2_p17-r1.ebuild)
1199012878: *** exiting unsuccessfully with status '1'.
1199012878: *** terminating.

It seems to got something to do with the update of gcc-config while after that update nothing could be compiled anymore.
Downgrading to the prior version does not work as i can't compile anything ...
Yes, the log makes a compelling case for a gcc-config bug

Try forcing the config files to be regenerated and see it that fixes it for you.
Code:
gcc-config -f
That command worked for a vaguely similar gcc-config bug 203869
_________________
Gentoo is the stick-shift of Linux.
You work it manually, it has somewhat better performance, but it's really for the fun of it.
Back to top
View user's profile Send private message
mardicas
Tux's lil' helper
Tux's lil' helper


Joined: 07 Jan 2008
Posts: 112
Location: Tallinn

PostPosted: Mon Jan 07, 2008 9:41 am    Post subject: Reply with quote

Okay, here is something new to try for you guys.
My error is slightly different:
"configure: error: C++ compiler cannot create executables"
it is the C++ that is complaining

When i just ran cpp program then it gave me an error like this
Code:

cpp

"cc1: error: /usr/local/include: not a directory"

If he does not like a file then i shall give him a folder!!! :twisted:

Code:

mv /usr/local/include /usr/local/include.bu
mkdir /usr/local/include


So far everything seems to be working
_________________
http://mardicas.dyndns.org
Back to top
View user's profile Send private message
OmSai
l33t
l33t


Joined: 30 Sep 2007
Posts: 604
Location: Manchester, CT, USA

PostPosted: Mon Jan 07, 2008 11:54 am    Post subject: Reply with quote

mardicas wrote:
Okay, here is something new to try for you guys.
My error is slightly different:
"configure: error: C++ compiler cannot create executables"
it is the C++ that is complaining
What were you trying to do when you got that error?
_________________
Gentoo is the stick-shift of Linux.
You work it manually, it has somewhat better performance, but it's really for the fun of it.
Back to top
View user's profile Send private message
mardicas
Tux's lil' helper
Tux's lil' helper


Joined: 07 Jan 2008
Posts: 112
Location: Tallinn

PostPosted: Mon Jan 07, 2008 2:28 pm    Post subject: Reply with quote

om wrote:
mardicas wrote:
Okay, here is something new to try for you guys.
My error is slightly different:
"configure: error: C++ compiler cannot create executables"
it is the C++ that is complaining
What were you trying to do when you got that error?


When i tryed to emerge anything that required C++ or maybe C too...
_________________
http://mardicas.dyndns.org
Back to top
View user's profile Send private message
Maedhros
Bodhisattva
Bodhisattva


Joined: 14 Apr 2004
Posts: 5511
Location: Durham, UK

PostPosted: Mon Jan 07, 2008 6:12 pm    Post subject: Reply with quote

mardicas wrote:
When i just ran cpp program then it gave me an error like this
Code:
cpp

"cc1: error: /usr/local/include: not a directory"

If he does not like a file then i shall give him a folder!!! :twisted:

[...]

So far everything seems to be working

It should always have been a directory - what was it instead?
_________________
No-one's more important than the earthworm.
Back to top
View user's profile Send private message
mardicas
Tux's lil' helper
Tux's lil' helper


Joined: 07 Jan 2008
Posts: 112
Location: Tallinn

PostPosted: Mon Jan 07, 2008 7:45 pm    Post subject: Reply with quote

http://mardicas.mine.nu/include.bu

this :-)

This is a smartcard readers drivers work.
I have installed this reader earlyer too, but it did not screw up anything so i did not suspect it.
Funny....why would it do such a thing :-S
_________________
http://mardicas.dyndns.org
Back to top
View user's profile Send private message
BrummBrumm
n00b
n00b


Joined: 04 Jan 2008
Posts: 58

PostPosted: Wed Jan 09, 2008 1:09 pm    Post subject: Reply with quote

well.. i think i got it...

the solution with the "gcc-config -f"-command does not worked for me first...

i deleted/moved the config-* files in /etc/env.d/gcc and done "gcc-config -f" again...
it seems to work now... thank you om :)

well.. in fact i don't know if that helped... i played around much at /etc/env.d/ before it really worked again... but i think that this are the relevant steps i did (i hope).
Back to top
View user's profile Send private message
drescherjm
Advocate
Advocate


Joined: 05 Jun 2004
Posts: 2769
Location: Pittsburgh, PA, USA

PostPosted: Thu Feb 21, 2008 6:03 pm    Post subject: Re: No ccache Reply with quote

sylum wrote:
Alas, there is no ccache on my system.
The directory /usr/lib/ccache is simply not there. Thanks for the insight anyhow.

Any other theories? :cry:


I know this is 13 months late but I just had this problem See: http://www.niftiestsoftware.com/?p=19

when emerging db and it turned out to be /usr/lib64/distcc/bin/x86_64-pc-linux-gnu-cc causing the problem with gcc 4.2.3 after an upgrade from gcc-3.4.

The solution was

Code:
rm /usr/lib64/distcc/bin/x86_64-pc-linux-gnu-cc

_________________
John

My gentoo overlay
Instructons for overlay
Back to top
View user's profile Send private message
lineagle
n00b
n00b


Joined: 23 Dec 2007
Posts: 3

PostPosted: Thu Feb 21, 2008 9:39 pm    Post subject: Re: SOLVED for me Reply with quote

nellson wrote:
A gentoo-dev buddy of mine slapped me and had me do this:

1. Repeat the phrase "I will not muck with my compiler, I am not worthy."
2. rm /etc/env.d/05compiler (was still referencing some old 4.1ish compiler)
3. gcc-config 1 ; env-update ; source /etc/profile
4. tried compiling, failed again, he had me pull versions on 'gcc' and 'ld', of which ld was NOT FOUND.
5. binutils-config 1 ; env-update ; source /etc/profile
6. ld now found, compiler all better :)

Now, as promised: "I will not muck with my compiler, I am not worthy.."

Thanks all!

Step 5 here fixed the issue for me after I screwed everything up with an emerge --depclean. GCC is now able to recompile, and is doing so as I type this in a chroot :) .Thank you.
Back to top
View user's profile Send private message
quikchaos
Tux's lil' helper
Tux's lil' helper


Joined: 29 Jan 2003
Posts: 107
Location: Indianapolis, IN

PostPosted: Thu Mar 06, 2008 12:52 pm    Post subject: binutils 2.17 to 2.18 broke "as" symlink Reply with quote

Just an FYI that after trying several things in this 7 page topic to no avail, I found that my /usr/i686-pc-linux-gnu/bin/ directory was full of broken symlinks, which explained why gcc was complaining about not finding "as":

Code:
# ls -Al /usr/i686-pc-linux-gnu/bin/
lrwxrwxrwx 1 root root   50 Aug  8  2007 addr2line -> /usr/i686-pc-linux-gnu/binutils-bin/2.17/addr2line
lrwxrwxrwx 1 root root   43 Aug  8  2007 ar -> /usr/i686-pc-linux-gnu/binutils-bin/2.17/ar
lrwxrwxrwx 1 root root   43 Aug  8  2007 as -> /usr/i686-pc-linux-gnu/binutils-bin/2.17/as
lrwxrwxrwx 1 root root   48 Aug  8  2007 c++filt -> /usr/i686-pc-linux-gnu/binutils-bin/2.17/c++filt
lrwxrwxrwx 1 root root   46 Aug  8  2007 gprof -> /usr/i686-pc-linux-gnu/binutils-bin/2.17/gprof
lrwxrwxrwx 1 root root   43 Aug  8  2007 ld -> /usr/i686-pc-linux-gnu/binutils-bin/2.17/ld
lrwxrwxrwx 1 root root   43 Aug  8  2007 nm -> /usr/i686-pc-linux-gnu/binutils-bin/2.17/nm
lrwxrwxrwx 1 root root   48 Aug  8  2007 objcopy -> /usr/i686-pc-linux-gnu/binutils-bin/2.17/objcopy
lrwxrwxrwx 1 root root   48 Aug  8  2007 objdump -> /usr/i686-pc-linux-gnu/binutils-bin/2.17/objdump
lrwxrwxrwx 1 root root   47 Aug  8  2007 ranlib -> /usr/i686-pc-linux-gnu/binutils-bin/2.17/ranlib
lrwxrwxrwx 1 root root   48 Aug  8  2007 readelf -> /usr/i686-pc-linux-gnu/binutils-bin/2.17/readelf
lrwxrwxrwx 1 root root   45 Aug  8  2007 size -> /usr/i686-pc-linux-gnu/binutils-bin/2.17/size
lrwxrwxrwx 1 root root   48 Aug  8  2007 strings -> /usr/i686-pc-linux-gnu/binutils-bin/2.17/strings
lrwxrwxrwx 1 root root   46 Aug  8  2007 strip -> /usr/i686-pc-linux-gnu/binutils-bin/2.17/strip


Code:
 # ls -Al /usr/i686-pc-linux-gnu/binutils-bin/
drwxr-xr-x 2 root root 4096 Mar  6 07:47 2.18


That 2.17 directory didn't exist since I had upgraded to 2.18. Not sure why the symlinks didn't get updated, but regardless, I made a symlink from the 2.18 directory to the 2.17 directory and re-emerged binutils 2.18. It seems to have updated the symlinks properly this time, so I could then safely remove the /usr/i686-pc-linux-gnu/binutils-bin/2.17/ symlink.

Code:
ln -s /usr/i686-pc-linux-gnu/binutils-bin/2.18 /usr/i686-pc-linux-gnu/binutils-bin/2.17


Hope this helps someone!
_________________
"Whether you think you can or you think you can't... you're right." -- Henry Ford
Back to top
View user's profile Send private message
anest
n00b
n00b


Joined: 12 Mar 2007
Posts: 31

PostPosted: Fri Mar 14, 2008 2:14 am    Post subject: Reply with quote

solution from google:
Quote:
> Check your /usr/bin/as link.
>
> $ ls -l /usr/bin/as
> lrwxrwxrwx 1 root root 20 May 25 03:18 /usr/bin/as -> i686-pc-linux-gnu-as

help to me, its was broken symlinks, i did maked temporary symlinks:
Quote:
/usr/lib/binutils/i686-pc-linux-gnu/2.16.1 -> 2.18
/usr/i686-pc-linux-gnu/binutils-bin/2.16.1 -> 2.18

and recompile/update GCC.
Back to top
View user's profile Send private message
andreac
n00b
n00b


Joined: 03 Aug 2004
Posts: 14
Location: Mergo

PostPosted: Tue May 06, 2008 4:00 pm    Post subject: Reply with quote

Only for another version of this ambiguous error that I solved and may help someone.

I just installed a base gentoo system on a Via C3 mini-itx board, using the 2008.0 beta2 minimal x86 cd.
After the first boot and configuring the new system I changed CFLAGS and CHOST to best adapt to my board, but I mistyped some letters, so during
Code:
# emerge -1v binutils gcc glibc

emerge stopped at gcc compile with the error in subject. The problem was that I rebuild binutils with wrong CFLAGS and gcc was no more able to compile because binutils was corrupted. Without gcc working, it is not possible to rebuild binutils, so the only solution I found (other than reinstall) was to recover the original files from the stage used for installation and manually change the links to the correct programs under /usr/bin.

In my case the files to recover are those related to binutils package under
Code:
/usr/i486-pc-linux-gnu/
/usr/share/binutils-data/i486-pc-linux-gnu/
/usr/lib/binutils/i486-pc-linux-gnu/
/etc/env.d/binutils

_________________
Andrea
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
Goto page Previous  1, 2, 3 ... 6, 7, 8 ... 10, 11, 12  Next
Page 7 of 12

 
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