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 1, 2, 3 ... 10, 11, 12  Next  
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
idl
Retired Dev
Retired Dev


Joined: 24 Dec 2002
Posts: 1728
Location: Nottingham, UK

PostPosted: Wed Dec 25, 2002 12:02 pm    Post subject: "C compiler cannot create executables" !??! Reply with quote

I'm just trying to configure mozila using https://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!
Back to top
View user's profile Send private message
idl
Retired Dev
Retired Dev


Joined: 24 Dec 2002
Posts: 1728
Location: Nottingham, UK

PostPosted: Wed Dec 25, 2002 12:05 pm    Post subject: Reply with quote

fixed it :)
Back to top
View user's profile Send private message
ebrostig
Bodhisattva
Bodhisattva


Joined: 20 Jul 2002
Posts: 3152
Location: Orlando, Fl

PostPosted: Thu Dec 26, 2002 9:40 pm    Post subject: Reply with quote

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.'
Back to top
View user's profile Send private message
idl
Retired Dev
Retired Dev


Joined: 24 Dec 2002
Posts: 1728
Location: Nottingham, UK

PostPosted: Fri Dec 27, 2002 10:42 am    Post subject: Reply with quote

sure :)

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

Code:
export CFLAGS="blah blah"
Back to top
View user's profile Send private message
ebrostig
Bodhisattva
Bodhisattva


Joined: 20 Jul 2002
Posts: 3152
Location: Orlando, Fl

PostPosted: Fri Dec 27, 2002 11:22 pm    Post subject: Reply with quote

port001 wrote:
sure :)

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

Code:
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.'
Back to top
View user's profile Send private message
rjenks
n00b
n00b


Joined: 23 Dec 2003
Posts: 4
Location: Dallas

PostPosted: Wed Aug 18, 2004 2:37 am    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
blackphiber
Tux's lil' helper
Tux's lil' helper


Joined: 11 Sep 2003
Posts: 86
Location: IL

PostPosted: Fri Oct 15, 2004 10:16 pm    Post subject: Reply with quote

Thank you Rob, that helped me one heck of a lot!
Back to top
View user's profile Send private message
runlevel0
n00b
n00b


Joined: 09 Sep 2004
Posts: 67
Location: Mountains of Noord-Holland

PostPosted: Wed Oct 27, 2004 1:14 am    Post subject: Reply with quote

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!]
Back to top
View user's profile Send private message
neiras
n00b
n00b


Joined: 25 May 2002
Posts: 18
Location: Vancouver, BC

PostPosted: Tue Nov 23, 2004 9:07 pm    Post subject: Reply with quote

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:
# 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:
# gcc-config 1


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

Code:
# source /etc/profile


... and continue emerging or whatever you were doing.
Back to top
View user's profile Send private message
imbiea
Tux's lil' helper
Tux's lil' helper


Joined: 23 Nov 2004
Posts: 95
Location: Colorado Rockies

PostPosted: Tue Nov 23, 2004 11:32 pm    Post subject: C compiler cannot create executables Reply with quote

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. ##
## ---------------- ##
Back to top
View user's profile Send private message
ChopChopMasterOnion
n00b
n00b


Joined: 19 Mar 2003
Posts: 70
Location: North Texas

PostPosted: Wed Nov 24, 2004 2:53 am    Post subject: Re: C compiler cannot create executables Reply with quote

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.
Back to top
View user's profile Send private message
imbiea
Tux's lil' helper
Tux's lil' helper


Joined: 23 Nov 2004
Posts: 95
Location: Colorado Rockies

PostPosted: Wed Nov 24, 2004 4:18 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
runlevel0
n00b
n00b


Joined: 09 Sep 2004
Posts: 67
Location: Mountains of Noord-Holland

PostPosted: Wed Nov 24, 2004 6:22 pm    Post subject: Reply with quote

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

Code:
# 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
_________________
--
]:O <-[Mooooooooooo!]


Last edited by runlevel0 on Fri Nov 26, 2004 4:36 pm; edited 1 time in total
Back to top
View user's profile Send private message
fourth
n00b
n00b


Joined: 26 Nov 2004
Posts: 48

PostPosted: Fri Nov 26, 2004 3:30 am    Post subject: Reply with quote

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)
Back to top
View user's profile Send private message
runlevel0
n00b
n00b


Joined: 09 Sep 2004
Posts: 67
Location: Mountains of Noord-Holland

PostPosted: Fri Nov 26, 2004 4:24 pm    Post subject: Sticky ??? Reply with quote

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!]
Back to top
View user's profile Send private message
sf_alpha
Tux's lil' helper
Tux's lil' helper


Joined: 19 Sep 2002
Posts: 136
Location: Bangkok, TH

PostPosted: Sat Nov 27, 2004 5:23 pm    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
runlevel0
n00b
n00b


Joined: 09 Sep 2004
Posts: 67
Location: Mountains of Noord-Holland

PostPosted: Sat Nov 27, 2004 11:50 pm    Post subject: ¿Are you answering me? Reply with quote

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!]
Back to top
View user's profile Send private message
nixphoeni
Retired Dev
Retired Dev


Joined: 23 Oct 2004
Posts: 11

PostPosted: Sun Nov 28, 2004 3:08 am    Post subject: Reply with quote

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:
/sbin/fix_libtool_files.sh 3.4.2
instead of
Code:
/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:
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).
Back to top
View user's profile Send private message
fourth
n00b
n00b


Joined: 26 Nov 2004
Posts: 48

PostPosted: Sun Nov 28, 2004 9:26 pm    Post subject: Reply with quote

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 :)
Back to top
View user's profile Send private message
Woolong
n00b
n00b


Joined: 03 Feb 2004
Posts: 62
Location: Hong Kong

PostPosted: Mon Nov 29, 2004 4:15 am    Post subject: emerge mod_php Reply with quote

Hi,

Code:

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:

#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:

# 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. https://forums.gentoo.org/viewtopic.php?t=253327&highlight=executables
Back to top
View user's profile Send private message
pjp
Administrator
Administrator


Joined: 16 Apr 2002
Posts: 20048

PostPosted: Mon Nov 29, 2004 4:13 pm    Post subject: Reply with quote

Moved from Other Things Gentoo.
_________________
Quis separabit? Quo animo?
Back to top
View user's profile Send private message
andyjeffries
Apprentice
Apprentice


Joined: 14 Apr 2004
Posts: 196
Location: Stevenage, Herts, UK

PostPosted: Thu Dec 02, 2004 9:15 am    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
Dragonlord
Guru
Guru


Joined: 22 Aug 2004
Posts: 446
Location: Switzerland

PostPosted: Fri Dec 17, 2004 12:40 am    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
KayoPs
n00b
n00b


Joined: 15 Dec 2004
Posts: 3
Location: slocate KayoPs

PostPosted: Fri Dec 17, 2004 7:54 pm    Post subject: Reply with quote

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 !
Back to top
View user's profile Send private message
KayoPs
n00b
n00b


Joined: 15 Dec 2004
Posts: 3
Location: slocate KayoPs

PostPosted: Fri Dec 17, 2004 8:46 pm    Post subject: Reply with quote

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 !
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 1, 2, 3 ... 10, 11, 12  Next
Page 1 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