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

 
Reply to topic    Gentoo Forums Forum Index Duplicate Threads
View previous topic :: View next topic  
Author Message
Robert
Tux's lil' helper
Tux's lil' helper


Joined: 19 Apr 2002
Posts: 103
Location: Syracuse, NY

PostPosted: Fri Dec 27, 2002 10:50 pm    Post subject: "C compiler cannot create executables" Reply with quote

Hello,
I am having a new problem when attempting to install apps from source. Installing ebuilds is working fine, but when installing tarballs I get the following error when running the configure script:

Code:

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


It's probably something simple, but I have never had this before.

Anyone?
Back to top
View user's profile Send private message
hhaamu
Apprentice
Apprentice


Joined: 23 Aug 2002
Posts: 253
Location: Finland

PostPosted: Fri Dec 27, 2002 10:57 pm    Post subject: Reply with quote

https://forums.gentoo.org/viewtopic.php?t=27486

Fix your CFLAGS...
Back to top
View user's profile Send private message
Robert
Tux's lil' helper
Tux's lil' helper


Joined: 19 Apr 2002
Posts: 103
Location: Syracuse, NY

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

hhaamu wrote:
https://forums.gentoo.org/viewtopic.php?t=27486

Fix your CFLAGS...


Hrmm.. strange that searching the forums I came up with a bunch of unrelated stuff, but did not find that thead ;(

..anyway my CFLAGS from make.conf:
CFLAGS="-march=athlon-xp -O3 -pipe -fomit-frame-pointer"

They are as I have had them set for a while now. I need to change them?
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: Sat Dec 28, 2002 12:07 am    Post subject: Reply with quote

your flags are fine, but your the CFLAGS environment variable must have gotten screwed up somehow do this:

Code:
sh /etc/make.conf
Back to top
View user's profile Send private message
pilla
Bodhisattva
Bodhisattva


Joined: 07 Aug 2002
Posts: 7729
Location: Underworld

PostPosted: Sat Dec 28, 2002 2:31 am    Post subject: Reply with quote

Installing ebuilds is working fine, but when installing tarballs...

Are you stating that emerging ebuilds work, but if you try to compile anything else it does not, right?

If you are not using an ebuild, the flags in /etc/make.conf do not get read. Therefore, they shouldn't be the problem.

try to compile the following code (save it as test.c):
Code:

#include <stdio.h>
void main(){
     printf("Hello world\n");
}


Use the following command line to do so
Code:

gcc test.c -o test
./test


to see if it works.

EDIT Almost forgot it, moving to Portage & Programming.
_________________
"I'm just very selective about the reality I choose to accept." -- Calvin
Back to top
View user's profile Send private message
pilla
Bodhisattva
Bodhisattva


Joined: 07 Aug 2002
Posts: 7729
Location: Underworld

PostPosted: Sat Dec 28, 2002 2:40 am    Post subject: Reply with quote

Well that one I forgot to ask, are you using gcc-3.2.1-rc6?
_________________
"I'm just very selective about the reality I choose to accept." -- Calvin
Back to top
View user's profile Send private message
Robert
Tux's lil' helper
Tux's lil' helper


Joined: 19 Apr 2002
Posts: 103
Location: Syracuse, NY

PostPosted: Sat Dec 28, 2002 4:32 am    Post subject: Reply with quote

Bloody Bastard wrote:
Well that one I forgot to ask, are you using gcc-3.2.1-rc6?


Yes, gcc-3.2.1-r6.
and for the test:
Code:

# /usr/i686-pc-linux-gnu/gcc-bin/3.2/gcc test.c -o test
test.c: In function `main':
test.c:2: warning: return type of `main' is not `int'
# ./test
Hello world


Hrmm... was there a link to gcc in my path that is no longer installed?
Back to top
View user's profile Send private message
pilla
Bodhisattva
Bodhisattva


Joined: 07 Aug 2002
Posts: 7729
Location: Underworld

PostPosted: Sat Dec 28, 2002 4:41 am    Post subject: Reply with quote

I'll tell you the same thing I've told to rommel:

Quote:

Yes, I've read here and there that this version may cause some problems and it is more a version for developers (it even puts an advisory about it when you emerge it).

I am running gcc-3.2.1 without problems, may I suggest you to try it? Maybe you'll need to download a tarball and copy the binaries of gcc if you aren't able to emerge it using your current version.


His thread is here.
_________________
"I'm just very selective about the reality I choose to accept." -- Calvin
Back to top
View user's profile Send private message
Robert
Tux's lil' helper
Tux's lil' helper


Joined: 19 Apr 2002
Posts: 103
Location: Syracuse, NY

PostPosted: Sat Dec 28, 2002 4:54 am    Post subject: Reply with quote

..Building now

will report back, thanks!
Back to top
View user's profile Send private message
Robert
Tux's lil' helper
Tux's lil' helper


Joined: 19 Apr 2002
Posts: 103
Location: Syracuse, NY

PostPosted: Sat Dec 28, 2002 6:03 am    Post subject: Reply with quote

3.2.1 is now working great, thanks!

Guess I need to read more carefully next time when emerging ;-p
Back to top
View user's profile Send private message
pilla
Bodhisattva
Bodhisattva


Joined: 07 Aug 2002
Posts: 7729
Location: Underworld

PostPosted: Sat Dec 28, 2002 3:49 pm    Post subject: Reply with quote

At least, in the UNSTABLE branch 8)

Robert wrote:
3.2.1 is now working great, thanks!

Guess I need to read more carefully next time when emerging ;-p

_________________
"I'm just very selective about the reality I choose to accept." -- Calvin
Back to top
View user's profile Send private message
pilla
Bodhisattva
Bodhisattva


Joined: 07 Aug 2002
Posts: 7729
Location: Underworld

PostPosted: Fri Jan 03, 2003 2:01 pm    Post subject: Reply with quote

Moving to Dups, please post follow-ups to this thread.
_________________
"I'm just very selective about the reality I choose to accept." -- Calvin
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Duplicate Threads All times are GMT
Page 1 of 1

 
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