The whole problem started up after emerging gcc-4.1.1 together with other packages due to an emerge --sync and emerge --update portage system and world . When trying to emerge different packages, lately I mostly get this configure error " C compiler cannot create executables", even though doing a manual "./configure" and a "make" and "make install" afterwards works perfectly, when going directly to the package dir itself. It doesn't matter which package I try, it's reproducable. Meanwhile, I've unmerged eselect and ccache , I've tried "gcc-config -f i686-pc-linux-gnu-4.1.1" successfully , to compile and use programs I need urgently I've worked around it as pointed out before and below, but that's no solution. What's the direct problem, I just can't figure it out. config.log is of no help to me, here comes the Data you may need: >>> Emerging (1 of 1) app-admin/testdisk-6.6 to / * testdisk-6.6.tar.bz2 MD5 ;-) ... [ ok ] * testdisk-6.6.tar.bz2 RMD160 ;-) ... [ ok ] * testdisk-6.6.tar.bz2 SHA1 ;-) ... [ ok ] * testdisk-6.6.tar.bz2 SHA256 ;-) ... [ ok ] * testdisk-6.6.tar.bz2 size ;-) ... [ ok ] * checking ebuild checksums ;-) ... [ ok ] * checking auxfile checksums ;-) ... [ ok ] * checking miscfile checksums ;-) ... [ ok ] * checking testdisk-6.6.tar.bz2 ;-) ... [ ok ] >>> Checking testdisk-6.6.tar.bz2's mtime... >>> WORKDIR is up-to-date, keeping... >>> Compiling source in /var/tmp/portage/testdisk-6.6/work/testdisk-6.6 ... * econf: updating testdisk-6.6/config/config.guess with /usr/share/gnuconfig/config.guess * econf: updating testdisk-6.6/config/config.sub with /usr/share/gnuconfig/config.sub ./configure --prefix=/usr --host=i686-pc-linux-gnu --mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc --localstatedir=/var/lib --without-ewf --without-reiserfs --without-ntfs --build=i686-pc-linux-gnu checking build system type... i686-pc-linux-gnu checking host system type... i686-pc-linux-gnu checking target system type... i686-pc-linux-gnu checking for a BSD-compatible install... /bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes 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. !!! Please attach the following file when filing a report to bugs.gentoo.org: !!! /var/tmp/portage/testdisk-6.6/work/testdisk-6.6/config.log !!! ERROR: app-admin/testdisk-6.6 failed. Call stack: ebuild.sh, line 1546: Called dyn_compile ebuild.sh, line 937: Called src_compile testdisk-6.6.ebuild, line 31: Called econf '--without-ewf' '--without-reiserfs' '--without-ntfs' ebuild.sh, line 540: Called die !!! econf failed !!! If you need support, post the topmost build error, and the call stack if relevant. emerge --info will follow as attachment. Reproducible: Always Steps to Reproduce: 1. emerge -v testdisk # reiserfsprogs and other programs have the same result I'll try to post my config.log file as attachment file. Actual Results: emerge -v testdisk # aborts after a few lines of configure script, see above # manual compilation workaround works: cd /var/tmp/portage/testdisk-6.6/work/testdisk-6.6 ./configure # runs through completely and successfully without errors make # compiles cleanly cd /var/tmp/portage/testdisk-6.6/ # or cd ../.. touch .compiled; mkdir image; chown portage:portage * emerge -v testdisk # installs the regular way as used to normal emerge process. Expected Results: testdisk emerged cleanly and successfully, like other programs as well. Also tested with reiserfsprogs, same errors. Furthermore, I had problems to complete my emerge -ve portage / system / world updates due to this error. cleanly run configure compile and make install without manual intervention. If you find any suspicious processes, please drop me a note here. ps axf will follow as attachment file. I have 1,5 gb RAM, so that shouldn't be a problem and plenty of hard disk capacity. Even though I report this problem from a machine with an AMD-Duron 800, I have been getting it on an AMD64, AMD-K6-430, Celeron PIII-500, Celeron PII-500 Laptop, Pentium 133 MMX and other platforms and none of the machines are overclocked to also rule out these error possibilities. Any clues what I can do to rule out other problems?
Created attachment 121206 [details] ps axf . If you find anything suspicious, please drop me a mail.
Created attachment 121207 [details] emerge --info please check if anything is wrong here. eselect, ccache and distcc are unmerged already.
Created attachment 121208 [details] config.log of testdisk-6.6 emerge failure, see optional comment Please take a look at line 87 in the config file: Another error I keep getting on various of my systems with different platforms is: /usr/lib/gcc/i686-pc-linux-gnu/4.1.1/../../../../i686-pc-linux-gnu/bin/ld: /usr/lib: No such file: File format not recognized collect2: ld returned 1 exit status Have tried to find a solution for this one but I admit I'm not very familiar with programming anymore. Something to do with linking? However, running make manually as reported in the bug report compiles and links cleanly, so wher is the error really? Any clues?
(In reply to comment #0) > Meanwhile, I've unmerged eselect You unmerged what? eselect-compiler?
Reopening to...
close as invalid. Your LDFLAGS setting, /usr/lib, doesn't make sense. LDFLAGS is supposed to be a set of flags that will be passed to gcc (and something you should generally not set at all), not a directory.
I took a closer look where this path was set, in the file /etc/env.d/10libx11 . I've never edited this file myself nor have I edited a config file that would set such a path. I don't know what to do with it. Should I unset the path setting or delete the file?