Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > C++ compilder cannot create executables

C++ compilder cannot create executables
Thread Tools
Fresh-Faced Recruit
Join Date: May 2001
Status: Offline
Reply With Quote
May 15, 2001, 03:12 PM
 
Hi all.

I'm running into an error when running ./configure (I can post the file if that helps) and getting the entertaining message:
checking for g++... g++
checking whether the C++ compiler (g++ -s) works... no
configure: error: installation or configuration problem: C++ compiler cannot create executables.

Do any of you have suggestions on what steps to take from here? I'm new to OSX, and have only limited development experience on Linux, so don't be afraid to get pedantic (I'd search the darwin lists, but Apple hasn't made them searchable yet, and I haven't found this in any other searches)

I copied the config.guess and .sub files over from /usr/libexec/, and have symlinked /usr/bin/cc to /usr/bin/gcc, and /usr/bin/c++ to /usr/bin/g++.

Finally, the config.log ends with the following:

configure:1180: checking how to run the C preprocessor
configure:1201: gcc -E conftest.c >/dev/null 2>conftest.out
configure:1197: undefined type, found `Syntax'
configure:1197: illegal external declaration, missing `;' after `Error'
cpp-precomp: warning: errors during smart preprocessing, retrying in basic mode
configure: failed program was:
#line 1195 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
configure:1218: gcc -E -traditional-cpp conftest.c >/dev/null 2>conftest.out
configure:1242: checking for a C++-Compiler
configure:1248: checking for g++
configure:1364: checking whether the C++ compiler (g++ -s) works
configure:1380: g++ -o conftest -s conftest.C 1>&5
/usr/bin/ld: can't use -s with input files containg indirect symbols (output fil
e must contain at least global symbols, for maximum stripping use -x)
configure: failed program was:

#line 1375 "configure"
#include "confdefs.h"

int main(){return(0);}


Just so you know, the software I'm trying to compile is a really impressive 3d skeleton animation program (http://prdownloads.sourceforge.net/cal3d/cal3d-0.5.tar.gz).

Here's the blurb from the developer's home page (www.beosil.com)
<blockquote>Cal3d is a skeletal based 3d character animation library written in C++ in a platform-/graphic API-independent way. Originally designed to be used in a 3d client for Worldforge, it evolved into a stand-alone product which can be used in many different kinds of projects.</blockquote>


Sincere thanks for your time,

anubis
     
Grizzled Veteran
Join Date: Apr 2001
Status: Offline
Reply With Quote
May 15, 2001, 10:03 PM
 
configure:1380: g++ -o conftest -s conftest.C 1>&5
/usr/bin/ld: can't use -s with input files containg indirect symbols (output fil
e must contain at least global symbols, for maximum stripping use -x)
configure: failed program was:
Look at line 1380 in configure and try removing the -s parameter.

Wade
     
anubis  (op)
Fresh-Faced Recruit
Join Date: May 2001
Status: Offline
Reply With Quote
May 16, 2001, 11:05 AM
 
Wade,

Thanks for the suggestion. I tried picking my way through the configure file, and might have successfully excised the -s flag for that test, but I didn't get things working. Configure files are notoriously opaque. I've set up an account for the developer to try poking around (OT: It is wonderful to be able to ssh to my mac and set up an account for another user to try building UNIX software. I don't know when I'll get over that pleasure).

I'll try to post a solution if I find one so others with the same problem might find help.

Thanks,

anubis

______________edit________________________________ _

It turns out there was a line setting LDFLAGS="-s" that was the culprit. With that removed, we could get on to other errors related to the portability of the code. Look for a MacOSX friendly version of Cal3d soon.

[This message has been edited by anubis (edited 05-16-2001).]
     
Addicted to MacNN
Join Date: Aug 2000
Location: Retired
Status: Offline
Reply With Quote
May 19, 2001, 01:10 PM
 
I am having a problem. I get this when I configure:

onfiguring for powerpc-apple-machten
checking for gcc... gcc
checking for g++... no
checking for ld... ld
checking for ar... ar
checking for ranlib... ranlib
checking for gcc... (cached) gcc
checking whether the C compiler (gcc -traditional-cpp ) works... yes
checking whether the C compiler (gcc -traditional-cpp ) is a cross-compiler... no
checking whether we are using GNU C... yes
checking whether gcc accepts -g... yes
checking for c++... :
checking whether the C++ compiler (: ) works... no
configure: error: installation or configuration problem: C++ compiler cannot create executables.

I checked -s flags and ld-s but found none..any ideas?
Power Macintosh Dual G4
SGI Indigo2 6.5.21f
     
Mac Enthusiast
Join Date: Sep 2000
Location: Cupertino, CA
Status: Offline
Reply With Quote
May 19, 2001, 02:36 PM
 
Originally posted by MacGorilla:
I am having a problem. I get this when I configure:

onfiguring for powerpc-apple-machten
checking for gcc... gcc
checking for g++... no
checking for ld... ld
checking for ar... ar
checking for ranlib... ranlib
checking for gcc... (cached) gcc
checking whether the C compiler (gcc -traditional-cpp ) works... yes
checking whether the C compiler (gcc -traditional-cpp ) is a cross-compiler... no
checking whether we are using GNU C... yes
checking whether gcc accepts -g... yes
checking for c++... :
checking whether the C++ compiler (: ) works... no
configure: error: installation or configuration problem: C++ compiler cannot create executables.

I checked -s flags and ld-s but found none..any ideas?
A couple of things. You want to be building for powerpc-apple-darwin1.3 not powerpc-apple-machten. If you copy the config.sub and config.guess from /usr/libexec over the ones in your prject it should help.

The default makefiles that come with OS X attempt to make fat (PPC i386) binaries of everything, but the compiler that comes with dev tools only outputs PPC, causing this to fail. Try editting the RC_ARCHS line in /Developer/Makefiles/CoreOS/ReleaseControl/Common.make

Louis

------------------
Louis Gerbarg
Darwin Developer
Louis Gerbarg
Darwin Developer
These are my views, and not the views of my employer.
     
Admin Emeritus
Join Date: Nov 2000
Location: New Yawk
Status: Offline
Reply With Quote
May 19, 2001, 05:50 PM
 
Louis, AFAIK the config.sub and config.guess were moved to /usr/share/libtool. Am I mistaken? They used to be in /usr/libexec but I think they were moved for GM release.

------------------
the oddball newsletter
------------------
it's only after you lose everything that you're free to do anything
"Do not be too positive about things. You may be in error." (C. F. Lawlor, The Mixicologist)
     
Mac Enthusiast
Join Date: Sep 2000
Location: Cupertino, CA
Status: Offline
Reply With Quote
May 19, 2001, 08:28 PM
 
Originally posted by gorgonzola:
Louis, AFAIK the config.sub and config.guess were moved to /usr/share/libtool. Am I mistaken? They used to be in /usr/libexec but I think they were moved for GM release.

I could believe that, but they are in /usr/libexec on my system. Then again, my system has some... oddities.

Louis

------------------
Louis Gerbarg
Darwin Developer
Louis Gerbarg
Darwin Developer
These are my views, and not the views of my employer.
     
Grizzled Veteran
Join Date: Apr 2001
Status: Offline
Reply With Quote
May 20, 2001, 12:36 AM
 
Nope, they're still in /usr/libexec.

Wade
     
   
Thread Tools
Forum Links
Forum 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
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 12:35 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2