LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-15-2004, 03:58 PM   #1
pr3st0
LQ Newbie
 
Registered: Oct 2004
Posts: 5

Rep: Reputation: 0
C compiler cannot create executables -- deep problem


Hi there,

I use Gentoo and I'm having trouble to solve it...
Hope you can help me out!


Code:
 
~# emerge -a "<sys-devel/gcc-3.4.2-r2"

These are the packages that I would merge, in order:

Calculating dependencies ...done!
[ebuild N ] sys-devel/binutils-2.15.92.0.2-r1
[ebuild UD] sys-devel/gcc-3.4.1-r3 [3.4.2-r2]
.
.
.
checking for gcc... gcc
checking whether the C compiler (gcc -O2 -march=pentium4 -fprefetch-loop-arrays -pipe ) works... no
configure: error: installation or configuration problem: C compiler cannot create executables.

!!! ERROR: sys-devel/binutils-2.15.92.0.2-r1 failed.
tried to emerge gcc-config

[CODE]
~# emerge -a "<sys-devel/gcc-config-1.3.7"
>>> emerge (1 of 1) sys-devel/gcc-config-1.3.6-r3 to /
.
.
.
>>> Install gcc-config-1.3.6-r3 into /var/tmp/portage/gcc-config-1.3.6-r3/image/ category sys-devel
* Compiling wrapper...
gcc: installation problem, cannot exec `as': No such file or directory



trying gcc

Code:
 
~# emerge gcc

>>> emerge (1 of 3) sys-devel/binutils-2.15.92.0.2-r1 to /
>>> md5 src_uri ;-) binutils-2.15.92.0.2.tar.bz2
>>> md5 src_uri ;-) binutils-2.15.92.0.2-patches-1.1.tar.bz2
>>> Unpacking source...
>>> Unpacking binutils-2.15.92.0.2.tar.bz2 to /var/tmp/portage/binutils-2.15.92.0.2-r1/work

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 whether ln works... yes
checking whether ln -s works... yes
checking for gcc... gcc
checking whether the C compiler (gcc -O2 -march=pentium4 -fprefetch-loop-arrays -pipe ) works... no
configure: error: installation or configuration problem: C compiler cannot create executables.
How can I solve this compiler problem?
Thank you

Fernando
 
Old 10-15-2004, 04:21 PM   #2
Mara
Moderator
 
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,569

Rep: Reputation: 171Reputation: 171
Quote:
gcc: installation problem, cannot exec `as': No such file or directory
It looks it can't find as program. Are you able to run it from the command line?
as --version
 
Old 10-15-2004, 05:39 PM   #3
comprookie2000
Gentoo Developer
 
Registered: Feb 2004
Location: Fort Lauderdale FL.
Distribution: Gentoo
Posts: 3,291
Blog Entries: 5

Rep: Reputation: 56
Look at the instructions in /usr/portage/sys-apps/portage/files/README.RESCUE, and try using one of the portage rescue tarballs located in /usr/portage/sys-apps/portage/files/ to get portage working again.
see if this helps; http://forums.gentoo.org/viewtopic.p...&highlight=gcc

Last edited by comprookie2000; 10-15-2004 at 05:50 PM.
 
Old 10-16-2004, 12:27 AM   #4
pr3st0
LQ Newbie
 
Registered: Oct 2004
Posts: 5

Original Poster
Rep: Reputation: 0
I did follow the directions of RESCUE.README, but I'm still having the same problems:
Code:
files # emerge portage
Calculating dependencies ...done!
>>> emerge (1 of 1) sys-apps/portage-2.0.51_rc9 to /
>>> md5 src_uri ;-) portage-2.0.51_rc9.tar.bz2
>>> Unpacking source...
>>> Unpacking portage-2.0.51_rc9.tar.bz2 to /var/tmp/portage/portage-2.0.51_rc9/work
>>> Source unpacked.
gcc: installation problem, cannot exec `as': No such file or directory
tbz2tool.c:227: fatal error: error writing to -: Broken pipe
compilation terminated.
The bug is not reproducible, so it is likely a hardware or OS problem.
./create-localdecls
Checking truncate argument type... off_t
Checking libc version... gcc: installation problem, cannot exec `as': No such file or directory
ldd: ./libctest: No such file or directory

rm: cannot remove `libctest': No such file or directory

gcc -march=i386 -O1 -pipe  -D_GNU_SOURCE -DPIC -fPIC -D_REENTRANT -Wall -c libsandbox.c
gcc: installation problem, cannot exec `as': No such file or directory
libsandbox.c:1365: fatal error: error writing to -: Broken pipe
compilation terminated.
The bug is not reproducible, so it is likely a hardware or OS problem.
make: *** [libsandbox.o] Error 1

!!! ERROR: sys-apps/portage-2.0.51_rc9 failed.
!!! Function src_compile, Line 62, Exitcode 2
!!! (no error message)
trying to emerge gcc...

Code:
emerge gcc

Calculating dependencies ...done!
>>> emerge (1 of 3) sys-devel/binutils-2.15.92.0.2-r1 to /
>>> md5 src_uri ;-) binutils-2.15.92.0.2.tar.bz2
>>> md5 src_uri ;-) binutils-2.15.92.0.2-patches-1.1.tar.bz2
>>> Unpacking source...
>>> Unpacking binutils-2.15.92.0.2.tar.bz2 to /var/tmp/portage/binutils-2.15.92.0.2-r1/work
>>> Unpacking binutils-2.15.92.0.2-patches-1.1.tar.bz2 to /var/tmp/portage/binutils-2.15.92.0.2-r1/work
 * Applying various patches (bugfixes/updates)...
 *   02_all_binutils-2.15.92.0.2-ltconfig-multilib.patch.bz2...                           [ ok ]
 *   03_all_binutils-2.15.92.0.2-ppc64-pie.patch.bz2...                                   [ ok ]
 *   04_all_binutils-2.15.92.0.2-place-orphan.patch.bz2...                                [ ok ]
 *   05_all_binutils-2.15.92.0.2-relro-fix.patch.bz2...                                   [ ok ]
 *   06_all_binutils-2.15.92.0.2-ldsoconf.patch.bz2...                                    [ ok ]
 *   07_all_binutils-2.15.92.0.2-elfvsb-test.patch.bz2...                                 [ ok ]
 *   23_all_binutils-2.15.90.0.1.1-rev-variable-page-size-support.patch.bz2...            [ ok ]
 *   61_all_binutils-001_libiberty-nolimits.patch.bz2...                                  [ ok ]
 *   62_all_binutils-2.15.90.0.1-uclibc.patch.bz2...                                      [ ok ]
 *   63_all_binutils-2.15.91.0.2-pt-pax-flags-200410091215.patch.bz2...                   [ ok ]
 *   70_all_binutils_x86_64_testsuite.patch.bz2...                                        [ ok ]
 *   73_all_x86-64-gotpcrel.patch.bz2...                                                  [ ok ]
 *   76_all_use-new-ld-dtags.patch.bz2...                                                 [ ok ]
 *   91_all_libiberty-pic.patch.bz2...                                                    [ ok ]
 * Done with patching
 * Using GNU config files from /usr/share/libtool
 *  Updating config.sub                                                                   [ ok ]
 *  Updating config.guess                                                                 [ ok ]
>>> Source unpacked.
~x86
nls
 * Patching ${S}/ltmain.sh...
 *   Applying portage-1.4.1.patch...
 *   Applying relink-1.4.0a-GCC3.0-2.patch...
 *   Applying sed-1.4.3.patch...
 *   Applying tmp-1.3.5.patch...
 * Applying uClibc/libtool patches ...
 *  Fixing ${S}/ltconfig...                                                               [ ok ]
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 whether ln works... yes
checking whether ln -s works... yes
checking for gcc... gcc
checking whether the C compiler (gcc -O2 -march=pentium4 -fprefetch-loop-arrays -pipe ) works... no
configure: error: installation or configuration problem: C compiler cannot create executables.

!!! ERROR: sys-devel/binutils-2.15.92.0.2-r1 failed.
!!! Function src_compile, Line 78, Exitcode 1
!!! (no error message)
 
Old 10-16-2004, 05:11 AM   #5
comprookie2000
Gentoo Developer
 
Registered: Feb 2004
Location: Fort Lauderdale FL.
Distribution: Gentoo
Posts: 3,291
Blog Entries: 5

Rep: Reputation: 56
Most likely a typo on the CFLAGS or CXXFLAGS variable in /etc/make.conf. Can you please do the following:
1. Post the output of
Code:
emerge info

2. Delete the temp directories via
Code:
rm -rf /var/tmp/portage
rm -rf /var/tmp/portage-pkg

3. Try to re-emerge one of the offending packages, for example libsdl, and after it fails, post the content of the config.log file, which will be located in /var/tmp/portage/libsdl-1.2.7-r1/work/libsdl-1.2.7-r1/config.log (note that if your libsdl version is different the directory name will be different, adjust accordingly)
 
Old 10-16-2004, 11:02 AM   #6
pr3st0
LQ Newbie
 
Registered: Oct 2004
Posts: 5

Original Poster
Rep: Reputation: 0
Thank you...
I did that and i also copied binutils-2.14.90.0.8-r1.tbz2 to /usr/portage/packages/All.
and # emerge --usepkgonly binutils...


It's king of working now.... but I'm getting errors when updating binutils.... I guess
I'll stay with that version...

Any comments about this?
 
Old 10-16-2004, 12:34 PM   #7
comprookie2000
Gentoo Developer
 
Registered: Feb 2004
Location: Fort Lauderdale FL.
Distribution: Gentoo
Posts: 3,291
Blog Entries: 5

Rep: Reputation: 56
Post your CFLAGS and CXXFLAGS also try emerge -pu world see what it says,look closely at those flags and make sure the syntax is right -O2 the O is the letter not the number 0 I did that one time.
 
Old 10-16-2004, 02:11 PM   #8
pr3st0
LQ Newbie
 
Registered: Oct 2004
Posts: 5

Original Poster
Rep: Reputation: 0
solved problem with:
Code:
revdep-rebuild
thank you everyone.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Compiler cannot create executables? Oxyacetylene Linux - Software 4 11-25-2004 11:29 AM
My C compiler cannot create executables, help rbmako69 Linux - Software 15 06-16-2004 03:22 PM
C compiler cannot create executables inanna Linux - Newbie 1 05-01-2004 02:42 AM
C compiler cannot create executables JanDeMan Debian 7 04-20-2004 03:10 AM
C compiler cannot create executables londonboi Debian 2 09-23-2003 03:41 AM


All times are GMT -5. The time now is 10:13 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration