Post New Topic  Post A Reply
my profile | register | search | faq | forum home
  next oldest topic   next newest topic
» MacOSX - forked.net   » Compile Problems   » C compiler cannot create executables.

UBBFriend: Email this page to someone!    
Author Topic: C compiler cannot create executables.
Dan
Member
Member # 106

posted October 11, 2001 03:49 AM      Profile for Dan     Send New Private Message      Edit/Delete Post  Reply With Quote 
In my attempts to compile _anything_ on darwin, configure always squawks at me with this - for example:

code:
 $ ./configure
loading cache ./config.cache
configuring for GNU Wget 1.7
checking host system type... powerpc-apple-darwin1.4
checking whether make sets ${MAKE}... yes
checking for a BSD compatible install... /usr/bin/install -c
checking build system type... powerpc-apple-darwin1.4
checking for ranlib... ranlib
checking for gcc... gcc
checking whether the C compiler (gcc ) works... no
configure: error: installation or configuration problem: C compiler cannot create executables.

I can give more info however I presume this is an easy one for you all. If this isn't a common problem, I'll gladly list more details about my system. Thanks for any help


Posts: 27 | Registered: Sep 2001  |  IP: Logged
apex
Administrator
Member # 1

posted October 11, 2001 12:40 PM      Profile for apex   Email apex   Send New Private Message      Edit/Delete Post  Reply With Quote 
From previous post by Jasont:
[code]
Make sure you have the directories:
/usr/local/bin
Check with ls /usr/local and ls /usr/local/bin
If not you want to create them with:
mkdir /usr/local
mkdir /usr/local/bin

Make symbolic links
ln -s /usr/bin/cc /usr/bin/gcc
ln -s /usr/bin/c++ /usr/bin/g++
ln -s /usr/bin/cc /usr/local/bin/gcc
ln -s /usr/bin/c++ /usr/local/bin/g++
[code]

*you may want to do this as root*


Posts: 307 | From: Alaska | Registered: Aug 2001  |  IP: Logged
apex
Administrator
Member # 1

posted October 11, 2001 12:42 PM      Profile for apex   Email apex   Send New Private Message      Edit/Delete Post  Reply With Quote 
You may also want to take a look at config.log. It should show you exactly what is produicing the error.
Posts: 307 | From: Alaska | Registered: Aug 2001  |  IP: Logged
Dan
Member
Member # 106

posted October 11, 2001 01:50 PM      Profile for Dan     Send New Private Message      Edit/Delete Post  Reply With Quote 
I suppose if I'm gonna run 10.1, I should also install the appropriate 10.1 dev tools hehe

That's what solved it - upgrading the tools. Thanks for your help apex!

I'm up and running again -

I get all kinds of good errors now

code:
 ...gcc -I. -I.    -DHAVE_CONFIG_H -DSYSTEM_WGETRC=\"/usr/local/etc/wgetrc\" -DLOCALEDIR=\"/usr/local/share/locale\" -g -O2 -c html-parse.c
html-parse.c: In function `advance_declaration':
html-parse.c:449: character constant too long
html-parse.c:449: parse error before character constant
html-parse.c:449: stray '\' in program
html-parse.c:454: character constant too long
html-parse.c:461: character constant too long
html-parse.c:472: character constant too long
html-parse.c:481: character constant too long
html-parse.c:481: character constant too long
html-parse.c:481: stray '\' in program
html-parse.c:773: Unterminated string constant
make[1]: *** [html-parse.o] Error 1
make: *** [src] Error 2

I'll attempt to figure these out for awhile ... I'm just happy I'm getting some decent errors heh

[ October 11, 2001: Message edited by: Dan ]


Posts: 27 | Registered: Sep 2001  |  IP: Logged
eikay
Junior Member
Member # 346

posted March 01, 2002 03:20 AM      Profile for eikay        Edit/Delete Post  Reply With Quote 
Hi, there.

I just had the same problem, but it'll work if you set the proper argument for the C compiler. In my case, the following worked.

When you execute ./configure, make it like this:
env CC=cc ./configure

Hope it'll help...


Posts: 2 | Registered: Mar 2002  |  IP: Logged
<stevensm@earthlink.net>
unregistered

posted February 22, 2003 09:19 PM           Edit/Delete Post  Reply With Quote 
I just had this same error -- so frustrating!

My problem turned out to be that I lacked execute permission for /usr/bin/gcc and /usr/bin/g++ (or whatever they linked to).

I logged in as root and did a few commands like
chmod 755 /usr/bin/gcc
That fixed it (for now, at least).

To find out exactly where these gcc executables were, I typed
whereis gcc
whereis g++

Good Luck,
Mac


IP: Logged

All times are Pacific Time  

Post New Topic  Post A Reply Close Topic    Move Topic    Delete Topic next oldest topic   next newest topic
Hop To:

Contact Us | macosx.forked.net

Powered by Infopop Corporation
Ultimate Bulletin BoardTM 6.1.0.2