I can't compile ANYTHING! :(

zakalwe

Registered
I have a brand new iBOOK G4-933 with Panther installed (and xcode tools installed) and updated to 10.3.5

Whenever I try to compile anything, even the most basic hello world c program, the ld command fails saying it can't find various .o files depending on what I try to compile.

eg. ld: can't locate file for: -lcrt1.o
ld: can't locate file for: -ldylib1.o

I've made a complete reinstall (and update) of OS X (and XCode) last night but the problem remains!

Since programming is 50% of what I wanted the iBook for this is a major setback!

Does anyone have the slightest idea why this is happening??
I just don't know enough about Darwin/OSX yet to work it out!
 
Viro said:
How are you trying to compile it, and what commands are you using?

I was using the standard gcc helloworld.c -o helloworld, I also tried using xcode to build a Hello World carbon application as described in the docs! that failed as well!!
The good news is I found out why! It turns out that four files in /usr/lib
bundle1.o, crt1.o, dylib1.o and gcrt1.o were installed by the OSX install disks on earlier versions up to 10.3.1 (I think) but versions after that DIDN'T install those files! The install for them was shifted to the XCode install disk! Trouble is if you (Like me) have a new version of Panther but an older XCode disk those important files end up not being installed at all. Worse the XCode Update (1.0 -> 1.1) Doesn't install those files either! So you end up not being able to compile at all!
Thanks for your reply though! I was really tearing my hair out over this one! :D
 
That doesn't make any sense at all. The install discs that come with Panther will install version 10.3.0 and unless you run software update or download and install a combo updater that's the version it will stay at. Xcode that comes with the CD is version 1.0 as well.

Did you update Panther first before installing XCode? Next time, you might want to download the XCode 1.5 CD from Apple since it comes with lots of improvements to the IDE.
 
Viro said:
That doesn't make any sense at all. The install discs that come with Panther will install version 10.3.0 and unless you run software update or download and install a combo updater that's the version it will stay at. Xcode that comes with the CD is version 1.0 as well.

Did you update Panther first before installing XCode? Next time, you might want to download the XCode 1.5 CD from Apple since it comes with lots of improvements to the IDE.

Well I hate to disagree with you but as I said this is a brand new iBook! The MacOSX install disks actually have printed on them "Mac OS version 10.3.2"
The XCode disk I used belongs to a friend who bought the original Panther release 10.3.0 so it's version is 1.0. If I'd used HIS Panther disks to install I'd never have had this problem. I DID do a complete system update to 10.3.5 and then xcode 1.1 and the problem persisted. What confused me was that every other MacOSX system I'd used (fully updated) DIDN'T have this problem, except for my new iBook. What I discovered was that those 4 files were present on all the other systems but not on mine. I found after further searching on the internet that others had had the same problem as me and that the problem was that Apple had decided to change the install system after 10.3.1 but didn't change the update system to check if those 4 files had been installed. After simply copying those 4 files to my iBook the problem vanished completely.
I did look at downloading XCode 1.5 ( I am a member of ADC!) and I'm assured that this issue is resolved in the new release but at 370MB+ download compared to copying 4 small files I decided on the latter!... and it worked like a charm :D

I also noted that my post has been moved to the "Unix and X11" forum! My problem has little to do with either Unix or X11! Just because it's a programming problem doesn't mean it's a BSD/Darwin problem by default. (Though I must admit it involves /usr/lib!) I couldn't compile a native OS-X executable (An XCode Full Carbon Framework App) either! :D But then again I guess It's not exactly an everyday sort of problem either so point taken...
:D :D
Thanks again Viro for taking an interest! It's been a learning curve for me and I hope it has enlightened you too!

Cheers mate
Zakalwe
 
Ah... the discs that came with your iBook. I mistakenly assumed you were referring to the retail discs.

That's enlightening. Ah well at least you've got your problem sorted.
 
Back
Top