Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Portage & Programming
  • Search

"C compiler cannot create executables" !??!

Problems with emerge or ebuilds? Have a basic programming question about C, PHP, Perl, BASH or something else?
Post Reply
Advanced search
282 posts
  • Page 1 of 12
    • Jump to page:
  • 1
  • 2
  • 3
  • 4
  • 5
  • …
  • 12
  • Next
Author
Message
idl
Retired Dev
Retired Dev
User avatar
Posts: 1728
Joined: Tue Dec 24, 2002 8:02 pm
Location: Nottingham, UK

"C compiler cannot create executables" !??!

  • Quote

Post by idl » Wed Dec 25, 2002 12:02 pm

I'm just trying to configure mozila using http://forums.gentoo.org/viewtopic.php?t=20942 but i get the error:

checking for gcc... gcc
checking whether the C compiler (gcc m4 ) works... no
configure: error: installation or configuration problem: C compiler cannot create executables.

i'm sure i saw someone talking about this before on the forums but i cannot find it!

Thankyou!
Top
idl
Retired Dev
Retired Dev
User avatar
Posts: 1728
Joined: Tue Dec 24, 2002 8:02 pm
Location: Nottingham, UK

  • Quote

Post by idl » Wed Dec 25, 2002 12:05 pm

fixed it :)
Top
ebrostig
Bodhisattva
Bodhisattva
User avatar
Posts: 3152
Joined: Sat Jul 20, 2002 12:44 am
Location: Orlando, Fl

  • Quote

Post by ebrostig » Thu Dec 26, 2002 9:40 pm

port001 wrote:fixed it :)
Good for you!

Now, in the spirit of Christmas, maybe you feel warm and fuzzy enough to share the solution with the rest of us?

If you do, maybe the next person hitting the same problems can solve them by doing a forum search and use your solution.

Erik
'Yes, Firefox is indeed greater than women. Can women block pops up for you? No. Can Firefox show you naked women? Yes.'
Top
idl
Retired Dev
Retired Dev
User avatar
Posts: 1728
Joined: Tue Dec 24, 2002 8:02 pm
Location: Nottingham, UK

  • Quote

Post by idl » Fri Dec 27, 2002 10:42 am

sure :)

I had exported my CFLAGS wrong somehow.. you need to make sure its the correct syntax

Code: Select all

export CFLAGS="blah blah"
Top
ebrostig
Bodhisattva
Bodhisattva
User avatar
Posts: 3152
Joined: Sat Jul 20, 2002 12:44 am
Location: Orlando, Fl

  • Quote

Post by ebrostig » Fri Dec 27, 2002 11:22 pm

port001 wrote:sure :)

I had exported my CFLAGS wrong somehow.. you need to make sure its the correct syntax

Code: Select all

export CFLAGS="blah blah"
Thank you!

Now others who see the same issue and searches the forums, will be able to fix it themselves. :)

Erik
'Yes, Firefox is indeed greater than women. Can women block pops up for you? No. Can Firefox show you naked women? Yes.'
Top
rjenks
n00b
n00b
Posts: 4
Joined: Tue Dec 23, 2003 2:23 am
Location: Dallas
Contact:
Contact rjenks
Website

  • Quote

Post by rjenks » Wed Aug 18, 2004 2:37 am

I had a similar problem when doing an upgrade via "emerge -u portage". When it tried to compile a pre-requisite package (in this case Gawk), I got the same error message.

I found that apparently it had updated the C++ libraries and my paths (specifically in /etc/ld.so.conf), were now wrong. In order to fix it I had to:

1) edit /etc/ld.so.conf to fix the gcc-lib path (in my case it went from 3.2.3 to 3.3.3.

2) run "ldconfig" to set the proper library path

3) edit /etc/env.d/05gcc and change all the paths to the new version.

If you don't do steps 1 and 2 you won't be able to run emerge again. If you don't do step 3, it will undo your changes from step 1 when you run emerge again.

Hope this helps...
-Robert
Top
blackphiber
Tux's lil' helper
Tux's lil' helper
Posts: 86
Joined: Thu Sep 11, 2003 9:37 pm
Location: IL
Contact:
Contact blackphiber
Website

  • Quote

Post by blackphiber » Fri Oct 15, 2004 10:16 pm

Thank you Rob, that helped me one heck of a lot!
Top
runlevel0
n00b
n00b
User avatar
Posts: 67
Joined: Thu Sep 09, 2004 9:35 pm
Location: Mountains of Noord-Holland
Contact:
Contact runlevel0
Website

  • Quote

Post by runlevel0 » Wed Oct 27, 2004 1:14 am

rjenks wrote:I had a similar problem when doing an upgrade via "emerge -u portage".
Same problem after an emerge prune.

It seems that those files where still pointing to gcc 3.3 and this was de gcc version I was indeed using after it was updated to 3.4.2.

I was wondering how this happend. As it seems gcc upgrading is still a bit buggy.

Thanks a lot for the tip.
--
]:O <-[Mooooooooooo!]
Top
neiras
n00b
n00b
User avatar
Posts: 18
Joined: Sat May 25, 2002 3:27 am
Location: Vancouver, BC

  • Quote

Post by neiras » Tue Nov 23, 2004 9:07 pm

This is usually caused by doing an emerge world that includes a gcc upgrade. What happens is, the new gcc is compiled, but the ebuild fails to switch your system to the new compiler. Before trying any of the solutions above, try doing:

Code: Select all

# gcc-config
You should be presented with a list of GCC versions that are available on your machine. Each version has a number next to it. Find the latest version of gcc's number, (for example, 1), and type:

Code: Select all

# gcc-config 1


...to switch to the new compiler. Then,

Code: Select all

# source /etc/profile
... and continue emerging or whatever you were doing.
Top
imbiea
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 95
Joined: Tue Nov 23, 2004 11:26 pm
Location: Colorado Rockies

C compiler cannot create executables

  • Quote

Post by imbiea » Tue Nov 23, 2004 11:32 pm

As continuation of this forum... :-(

brand new box. stage3 tarball, 2004.3

I get to the end of my build and runto this:

C compiler cannot create executables, for my install of the latest grub..

in looking at my config.log ...

here is a snippit

configure:2384: getCC -fno-pic -nopie -V </dev/null >&5
./configure: line 1: getCC: command not found
configure:2387: $? = 127
configure:2410: checking for C compiler default output file name
configure:2413: getCC -fno-pic -nopie -DNDEBUG -minline-all-stringops conftes
t.c >&5
./configure: line 1: getCC: command not found
configure:2416: $? = 127
configure: failed program was:
| /* confdefs.h. */
|
| #define PACKAGE_NAME "GRUB"
| #define PACKAGE_TARNAME "grub"
| #define PACKAGE_VERSION "0.95"
| #define PACKAGE_STRING "GRUB 0.95"
| #define PACKAGE_BUGREPORT "bug-grub@gnu.org"
| #define PACKAGE "grub"
| #define VERSION "0.95"
| /* end confdefs.h. */
|
| int
| main ()
| {
|
| ;
| return 0;
| }
configure:2455: error: C compiler cannot create executables
See `config.log' for more details.

## ---------------- ##
## Cache variables. ##
## ---------------- ##
Top
ChopChopMasterOnion
n00b
n00b
User avatar
Posts: 70
Joined: Wed Mar 19, 2003 6:20 am
Location: North Texas
Contact:
Contact ChopChopMasterOnion
Website

Re: C compiler cannot create executables

  • Quote

Post by ChopChopMasterOnion » Wed Nov 24, 2004 2:53 am

Had the same exact problem as imbiea. I ended up just installing sys-boot/grub-0.94-r2 instead. Seems to be an issue with the 0.95 grub, but I need to get this laptop going too much to take the time to find out exactly what the culprit is. Seems to be a package-specific issue.
----------------------------------------
There are 10 types of people in this world;
those who understand binary and those who don't.
Top
imbiea
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 95
Joined: Tue Nov 23, 2004 11:26 pm
Location: Colorado Rockies

  • Quote

Post by imbiea » Wed Nov 24, 2004 4:18 pm

Agreed. I figure it's a package issue, but I dont' recall having this issue two weeks ago with the same version of grub and using stage3 2004.2 tarballs. So I figure it's something different in the complier.

I'm going to try to stage a box today, and use the 2004.2 tarball... I'll post it back here.
Top
runlevel0
n00b
n00b
User avatar
Posts: 67
Joined: Thu Sep 09, 2004 9:35 pm
Location: Mountains of Noord-Holland
Contact:
Contact runlevel0
Website

  • Quote

Post by runlevel0 » Wed Nov 24, 2004 6:22 pm

neiras wrote:[...]. Before trying any of the solutions above, try doing:

Code: Select all

# gcc-config
Hey, thanks a lot!

I solved the problem using fix_libtool_files.sh,

But it happens, that I was trying to find out how to use different versions of GCC for a new project.

As we say in Spain "it came like waters in May", Telepatie? ;)

Thanks a lot again
Last edited by runlevel0 on Fri Nov 26, 2004 4:36 pm, edited 1 time in total.
--
]:O <-[Mooooooooooo!]
Top
fourth
n00b
n00b
Posts: 48
Joined: Fri Nov 26, 2004 3:11 am

  • Quote

Post by fourth » Fri Nov 26, 2004 3:30 am

I'm going to be trying this out tonight I have a similar problem with the 2004.3 GRP. I ran my first gentoo install last night (So I was assuming I'm the problem) and got this error message on the emerge of all three possible sysloggers. That said the install of grub worked fine.

I held my breath, hoped that the syslogger wasn't necessary for boot, configured grub and rebooted. ... and found that it booted fine.

I'll be trying out some of these suggestions above tonight but I find it odd that a newbie following the doc(Edit: Maybe not) to the letter would hit a major bug like this.

Non standard things I did:
-Downloaded Kernel 2.6.8.1, a EPIA premade .config and the matching epia1 patch
-Set the march to C3-2 (+ other normal looking options)
Top
runlevel0
n00b
n00b
User avatar
Posts: 67
Joined: Thu Sep 09, 2004 9:35 pm
Location: Mountains of Noord-Holland
Contact:
Contact runlevel0
Website

Sticky ???

  • Quote

Post by runlevel0 » Fri Nov 26, 2004 4:24 pm

I had the problem again, but I was aware of the cause:
I was trying to test if a given env variable would work if declared inside make.conf (CCACHE_DIR) instead of /etc/profile.

IMHO in many cases these weird errors are caused by syntax errors in make.conf, so before trying anything else checking make.conf would be a good idea.

As this seems to be a recursive topic setting this thread as 'sticky' would perhaps be a good idea, we could also list all solutions:


  • 1) Check make.conf for errors / weirdness
    2) sh make.conf
    3) "gcc-config -l " and if necessary change with "gcc-config N"
    4) fix_libtool_files.sh OLD_GCC_VERSION (this is not the same case, but it's related, and if GCC is wrong libtool can also fail)
    5) if everything fails comment: $CC, $FEATURES, $CFLAGS, $MAKEOPTS
--
]:O <-[Mooooooooooo!]
Top
sf_alpha
Tux's lil' helper
Tux's lil' helper
Posts: 136
Joined: Thu Sep 19, 2002 1:10 pm
Location: Bangkok, TH
Contact:
Contact sf_alpha
Website

  • Quote

Post by sf_alpha » Sat Nov 27, 2004 5:23 pm

try 'unset GCC_SPEC' or something (I didn't remember) It cause gcc not work correctly after switched to new gcc

try export to see that environment variable.
Gentoo Mirrors in Thailand (and AP)
http://gentoo.in.th
Top
runlevel0
n00b
n00b
User avatar
Posts: 67
Joined: Thu Sep 09, 2004 9:35 pm
Location: Mountains of Noord-Holland
Contact:
Contact runlevel0
Website

¿Are you answering me?

  • Quote

Post by runlevel0 » Sat Nov 27, 2004 11:50 pm

sf_alpha wrote:try 'unset GCC_SPEC' or something (I didn't remember) It cause gcc not work correctly after switched to new gcc

try export to see that environment variable.
OK, I will add it to my list...

Also, I myself have no problem whatsoever in neither of my gentoo boxes, but THX for another trick.

I should perhaps post the list to 'tips & tricks' or so... a pity that this is not a wiki forum, this would be the right kind of thread where we sum our experiences toghether...

Thanks a lot ;)

P.D.: Perhaps the gentoo wiki would be a nice and handy place to post such collaborative trick lists.
--
]:O <-[Mooooooooooo!]
Top
nixphoeni
Retired Dev
Retired Dev
User avatar
Posts: 11
Joined: Sat Oct 23, 2004 11:07 pm
Contact:
Contact nixphoeni
Website

  • Quote

Post by nixphoeni » Sun Nov 28, 2004 3:08 am

i noticed that in the gcc 3.4.3 ebuild, there was an issue with running fix_libtool_files.sh, so after merging it i ran

Code: Select all

/sbin/fix_libtool_files.sh 3.4.2
instead of

Code: Select all

/sbin/fix_libtool_files.sh 3.3.4
(i thought i was upgrading from 3.4.2 - silly me). so all i did then was do a

Code: Select all

ln -s /usr/lib/gcc-lib/i686-pc-linux-gnu/3.4.3 /usr/lib/gcc-lib/i686-pc-linux-gnu/3.4.2
and it's back to compiling again. note that it does not work if i link the 3.4.2 directory to the 3.3.4 directory.

also note that if you run into the same problem, you will likely only need to run the second command (with your old version number substituted).
Top
fourth
n00b
n00b
Posts: 48
Joined: Fri Nov 26, 2004 3:11 am

  • Quote

Post by fourth » Sun Nov 28, 2004 9:26 pm

I solved the problem that I had. I was using the EpiaWiki recommended march of c3-2 which seemed to be causing me issues. They specified a minimum gcc version which I met. I have switched back to the next nearest value for my C3 processor (686) and it now works fine.

Though an emerge kde took 2 days to compile, I guess that’s fine :)
Top
Woolong
n00b
n00b
User avatar
Posts: 62
Joined: Tue Feb 03, 2004 9:54 am
Location: Hong Kong
Contact:
Contact Woolong
Website

emerge mod_php

  • Quote

Post by Woolong » Mon Nov 29, 2004 4:15 am

Hi,

Code: Select all

checking whether the C++ compiler (g++ -march=athlon-tbird -O2 -pipe -fomit-frame-pointer -L/usr/lib -ldb-4.1  -ltiff -L/usr/lib -Wl,-rpath,/opt/sun-jdk-1.4.2.06/jre/lib/i386/server -L/opt/sun-jdk-1.4.2.06/jre/lib/i386/server -Wl,-rpath,/opt/sun-jdk-1.4.2.06/jre/lib/i386/native_threads -L/opt/sun-jdk-1.4.2.06/jre/lib/i386/native_threads -Wl,-rpath,/opt/sun-jdk-1.4.2.06/jre/lib/i386 -L/opt/sun-jdk-1.4.2.06/jre/lib/i386 -Wl,-rpath,/usr/qt/3/lib -L/usr/qt/3/lib) works... no
configure: error: installation or configuration problem: C++ compiler cannot create executables.

!!! ERROR: dev-php/mod_php-4.3.9 failed.
!!! Function econf, Line 449, Exitcode 1
!!! econf failed
!!! If you need support, post the topmost build error, NOT this status message.

Code: Select all

#gcc -v
Reading specs from /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.4/specs
Configured with: /var/tmp/portage/gcc-3.3.4-r1/work/gcc-3.3.4/configure --prefix=/usr --bindir=/usr/i686-pc-linux-gnu/gcc-bin/3.3 --includedir=/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.4/include --datadir=/usr/share/gcc-data/i686-pc-linux-gnu/3.3 --mandir=/usr/share/gcc-data/i686-pc-linux-gnu/3.3/man --infodir=/usr/share/gcc-data/i686-pc-linux-gnu/3.3/info --enable-shared --host=i686-pc-linux-gnu --target=i686-pc-linux-gnu --with-system-zlib --enable-languages=c,c++ --enable-threads=posix --enable-long-long --disable-checking --disable-libunwind-exceptions --enable-cstdio=stdio --enable-version-specific-runtime-libs --with-gxx-include-dir=/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.4/include/g++-v3 --with-local-prefix=/usr/local --enable-shared --enable-nls --without-included-gettext --disable-multilib --enable-__cxa_atexit --enable-clocale=generic
Thread model: posix
gcc version 3.3.4 20040623 (Gentoo Hardened Linux 3.3.4-r1, ssp-3.3.2-2, pie-8.7.6)

Code: Select all

# gcc-config -l
[1] i686-pc-linux-gnu-3.3.4 *
I have recompiled gcc and glibc, but it doesn't help either. :-(
[edit] I found a thread that describes the exact problem I encountered. http://forums.gentoo.org/viewtopic.php? ... xecutables
Top
pjp
Administrator
Administrator
User avatar
Posts: 20668
Joined: Tue Apr 16, 2002 10:35 pm

  • Quote

Post by pjp » Mon Nov 29, 2004 4:13 pm

Moved from Other Things Gentoo.
Quis separabit? Quo animo?
Top
andyjeffries
Apprentice
Apprentice
User avatar
Posts: 196
Joined: Wed Apr 14, 2004 6:46 pm
Location: Stevenage, Herts, UK
Contact:
Contact andyjeffries
Website

  • Quote

Post by andyjeffries » Thu Dec 02, 2004 9:15 am

ebrostig wrote:
port001 wrote:I had exported my CFLAGS wrong somehow.. you need to make sure its the correct syntax
Thank you!

Now others who see the same issue and searches the forums, will be able to fix it themselves.
From one such user - thanks a lot to port001 for posting the fix and ebrostig for nudging him to post the fix! ;-)


Andy
Developer of gPHPEdit
A8N-SLI/AMD X2 4800+/2GB Dual Channel/GF 7900GT OC
Top
Dragonlord
Guru
Guru
User avatar
Posts: 447
Joined: Sun Aug 22, 2004 11:57 am
Location: Switzerland

  • Quote

Post by Dragonlord » Fri Dec 17, 2004 12:40 am

similar problem here... but during bootstrapping process.

using the livecd and aa current stage1 image i can get till bootstrapping but just after launching it the entire thing breakes with an error (i can't post from that pc so i need to somehow describe what it is).

the thing tells me that 'gcc can not create executables' and this happens in the gettext package, the first package compiled (furst is linux headers but they are just unpacked).

i looked through the posts and all but have no idea what can happen. i also reformatted and tried all but to no avail. i installed gentoo a couple of times thus it's not a noobie problem. it must be something with the latest 2004.3 image (as i think the last one i did was with the 2004.2 image).

is this a confirmed problem or am i shitty unlucky?
DragonDreams: Leader and Head Programmer
Top
KayoPs
n00b
n00b
Posts: 3
Joined: Wed Dec 15, 2004 9:00 am
Location: slocate KayoPs

  • Quote

Post by KayoPs » Fri Dec 17, 2004 7:54 pm

Dragonlord wrote:similar problem here... but during bootstrapping process.

using the livecd and aa current stage1 image i can get till bootstrapping but just after launching it the entire thing breakes with an error (i can't post from that pc so i need to somehow describe what it is).

the thing tells me that 'gcc can not create executables' and this happens in the gettext package, the first package compiled (furst is linux headers but they are just unpacked).

i looked through the posts and all but have no idea what can happen. i also reformatted and tried all but to no avail. i installed gentoo a couple of times thus it's not a noobie problem. it must be something with the latest 2004.3 image (as i think the last one i did was with the 2004.2 image).

is this a confirmed problem or am i shitty unlucky?
I've exactly the same problem ... this isn't my first install of gentoo linux either, and the most strange is that a couple of days ago I installed gentoo on my laptop and I had no problems... If anyone nows how to fix this problem... just post here plz !!!!
You are an imperfect being created by an imperfect being... Finding your weakness is only a matter of time !
Top
KayoPs
n00b
n00b
Posts: 3
Joined: Wed Dec 15, 2004 9:00 am
Location: slocate KayoPs

  • Quote

Post by KayoPs » Fri Dec 17, 2004 8:46 pm

KayoPs wrote:
Dragonlord wrote:similar problem here... but during bootstrapping process.

using the livecd and aa current stage1 image i can get till bootstrapping but just after launching it the entire thing breakes with an error (i can't post from that pc so i need to somehow describe what it is).

the thing tells me that 'gcc can not create executables' and this happens in the gettext package, the first package compiled (furst is linux headers but they are just unpacked).

i looked through the posts and all but have no idea what can happen. i also reformatted and tried all but to no avail. i installed gentoo a couple of times thus it's not a noobie problem. it must be something with the latest 2004.3 image (as i think the last one i did was with the 2004.2 image).

is this a confirmed problem or am i shitty unlucky?
I've exactly the same problem ... this isn't my first install of gentoo linux either, and the most strange is that a couple of days ago I installed gentoo on my laptop and I had no problems... If anyone nows how to fix this problem... just post here plz !!!!
Problem fixed ...

My problem was that when I installed gentoo on my laptop, while emerging "ebulids" the system warned me that the use of -mcpu was deprecated and that I should use -mtune instead. So I did.
It never occurs to me that -mtune is a flag that we should use only after bootrsapping.
Well ... I don't know if this was the only reason ... but on the moment I removed -mtune from make.conf ... the bootstrap did his work properlly !
You are an imperfect being created by an imperfect being... Finding your weakness is only a matter of time !
Top
Post Reply

282 posts
  • Page 1 of 12
    • Jump to page:
  • 1
  • 2
  • 3
  • 4
  • 5
  • …
  • 12
  • Next

Return to “Portage & Programming”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy