Go Back   The macosxhints Forums > OS X Help Requests > UNIX - General



Reply
 
Thread Tools Rate Thread Display Modes
Old 11-03-2006, 09:36 AM   #1
ummd
Prospect
 
Join Date: Sep 2005
Posts: 2
Problem Compiling with Gcc

I'm trying to compile Gambit, an open source game theory project and I'm receiveing the following error.
Any ideas on what this -lcrt1.o is? I admit inexperience in this sort of thing, but I have installed Apple's gcc compiler (Custom install of Developer Tools software and gcc 4).

Thanks in advance

gcc version 4.0.1 (Apple Computer, Inc. build 5367)
configure:2279: $? = 0
configure:2302: checking for C compiler default output file name
configure:2305: gcc conftest.c >&5
/usr/bin/ld: can't locate file for: -lcrt1.o
collect2: ld returned 1 exit status
configure:2308: $? = 1
configure: failed program was:
| /* confdefs.h. */
|
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE "gambit"
| #define VERSION "0.2006.01.20"
| /* end confdefs.h. */
|
| int
| main ()
| {
|
| ;
| return 0;
| }
configure:2347: error: C compiler cannot create executables
ummd is offline   Reply With Quote
Old 11-03-2006, 09:46 AM   #2
hayne
Site Admin
 
Join Date: Jan 2002
Location: Montreal
Posts: 31,938
Quote:
Originally Posted by ummd
Any ideas on what this -lcrt1.o is? I admit inexperience in this sort of thing, but I have installed Apple's gcc compiler (Custom install of Developer Tools software and gcc 4).

I strongly suspect that the "custom" install is what is causing the problem. Unless you are an expert, you want to use the default install for Xcode - or at least only add things to the install, not remove things.

The file that is missing is the C run-time library.
__________________
hayne.net/macosx.html
hayne is offline   Reply With Quote
Old 11-03-2006, 03:02 PM   #3
mhuehne
Prospect
 
Join Date: Nov 2006
Posts: 19
You are trying to like a static binary ...

Hi,

MacOSX does not seem to support true static linking.
I think -lcrt1.o is a missing part of object code which would allow the binary to be linked against a libc.a. Here the c code is just fine, but in the config script you might have chosen a default or option like ...

--link-static


Try something like

--link-dynamic

or

--link-static=no

typically "configure --help" will give a good overview about basic config options.

Best of luck, I think you'll take it from here alone.

Cheers,
Michael
mhuehne is offline   Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

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 On
HTML code is Off

Forum Jump



All times are GMT -5. The time now is 11:57 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2013, vBulletin Solutions, Inc.
Site design © IDG Consumer & SMB; individuals retain copyright of their postings
but consent to the possible use of their material in other areas of IDG Consumer & SMB.