image
image

Go Back   macosx.com > Mac Help Forums > Mac OS X System & Mac Software

Reply
 
Thread Tools
  #1  
Old April 29th, 2008, 06:49 PM
Registered User
 
Join Date: Jan 2006
Posts: 121
Thanks: 0
Thanked 0 Times in 0 Posts
Moptop is on a distinguished road
/usr/bin/ld trouble..

So whenever I try to compile something, I get to the step

Code:
checking for gcc... gcc
checking for C compiler default output file name... 
configure: error: C compiler cannot create executables
See `config.log' for more details.
And looking at the log, my problem is...

Code:
/usr/bin/ld: /usr/bin/ld: cannot execute binary file
Which... Is bad. Yes, I've tried chmodding it +x. I've also tried logging in as root and trying to run it, no luck.

What's wrong? =/

Would asking someone else with an iMac G5 to send me theirs, fix it?
Reply With Quote
  #2  
Old April 30th, 2008, 01:14 PM
Registered User
 
Join Date: Mar 2005
Posts: 209
Thanks: 0
Thanked 2 Times in 2 Posts
artov is on a distinguished road
gcc comes with XCode, so you might need to (re)install it. XCode comes with OS X, either on same disk as the main system or on separate. You can also download it from Apple's website.
Reply With Quote
  #3  
Old April 30th, 2008, 03:24 PM
Registered User
 
Join Date: Jan 2006
Posts: 121
Thanks: 0
Thanked 0 Times in 0 Posts
Moptop is on a distinguished road
GCC is fine, its ld that's the problem.
Reply With Quote
  #4  
Old April 30th, 2008, 04:17 PM
lurk's Avatar
Mitä?
 
Join Date: Mar 2002
Location: Land o' skeeterz
Posts: 2,076
Thanks: 0
Thanked 0 Times in 0 Posts
lurk is on a distinguished road
I think ld is installed as part of gcc so that is probably what suggested the question. But as a first step what do you get from the following two commands:
Code:
elohopea:~ eric$ file /usr/bin/ld
/usr/bin/ld: Mach-O universal binary with 2 architectures
/usr/bin/ld (for architecture i386):	Mach-O executable i386
/usr/bin/ld (for architecture ppc7400):	Mach-O executable ppc
elohopea:~ eric$ ls -la /usr/bin/ld
-r-xr-xr-x  1 root  wheel  2098528 Sep 23  2007 /usr/bin/ld
I have included the output from my MacBook Pro for comparison. I am just wondering if you don't have an incorrect or stripped version of ld for some reason.
__________________
Wenn ist das Nunstruck git und Slotermeyer? Ja!...
Beiherhund das Oder die Flipperwaldt gersput!
Reply With Quote
  #5  
Old April 30th, 2008, 04:47 PM
Registered User
 
Join Date: Jan 2006
Posts: 121
Thanks: 0
Thanked 0 Times in 0 Posts
Moptop is on a distinguished road
I got...

Code:
iMac:~ Dave$ file /usr/bin/ld
/usr/bin/ld: Mach-O executable i386
Reply With Quote
  #6  
Old May 1st, 2008, 11:19 AM
lurk's Avatar
Mitä?
 
Join Date: Mar 2002
Location: Land o' skeeterz
Posts: 2,076
Thanks: 0
Thanked 0 Times in 0 Posts
lurk is on a distinguished road
Well that is your problem right there, your ld is only for intel and you are running on a G5. Now, how you got into this configuration is really a good question. Is there some weird history this particular install? Did you try to install Gcc or Bintools by hand at some point or try to run one of the architecture strippers on you installation?

Curiosity aside, you need to basically reinstall your gcc tool chain and the related bintools stuff. But what you have really should not happen and so I wonder what else might be messed up on your box at this time. So if you can't track down the source of your missing architectures I would just do a reformat and reinstall.
__________________
Wenn ist das Nunstruck git und Slotermeyer? Ja!...
Beiherhund das Oder die Flipperwaldt gersput!
Reply With Quote
  #7  
Old May 3rd, 2008, 11:51 AM
Registered User
 
Join Date: Jan 2006
Posts: 121
Thanks: 0
Thanked 0 Times in 0 Posts
Moptop is on a distinguished road
Well I reinstalled XCode and it works now Thanks for the help, everyone.
Reply With Quote
Reply

Thread Tools

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
Trackbacks are Off
Pingbacks are Off
Refbacks are Off
Forum Jump


All times are GMT -5. The time now is 06:41 PM.


Mac Support® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0
Copyright 2000-2008 DigitalCrowd, Inc.