Hi,
I've had a user complain that my program crashes on his G3 running 10.4.11. The crash log says: "Link (dyld) error: incompatible cpu-subtype" and not much else. The program runs fine on my G4 10.5. It also works for other users using G4 10.4.9 and above. So I think the problem is the processor rather than the operating system.
Someone reported a similar problem in this thread:
http://www.cocoabuilder.com/archive/mess.../4/17/5681
But it didn't seem like they managed to resolve it.
Running otool -h on my program yields the following:
* cputype: 18
* cpusubtype: 0
In "machine.h", I found:
#define CPU_SUBTYPE_POWERPC_ALL ((cpu_subtype_t) 0)
So I think the cpu subtype is correct.
Running otool -L on my program shows that the program links to:
/System/Library/Frameworks/Cocoa.framework/Versions/A/Cocoa (compatibility version 1.0.0, current version 11.0.0)
/System/Library/Frameworks/CoreAudio.framework/Versions/A/CoreAudio (compatibility version 1.0.0, current version 1.0.0)
/System/Library/Frameworks/CoreMIDI.framework/Versions/A/CoreMIDI (compatibility version 1.0.0, current version 42.0.0)
/System/Library/Frameworks/AudioToolbox.framework/Versions/A/AudioToolbox (compatibility version 1.0.0, current version 1.0.0)
/System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL (compatibility version 1.0.0, current version 1.0.0)
/usr/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.3)
/System/Library/Frameworks/AudioUnit.framework/Versions/A/AudioUnit (compatibility version 1.0.0, current version 1.0.0)
@executable_path/../Frameworks/Sparkle.framework/Versions/A/Sparkle (compatibility version 1.0.0, current version 1.0.0)
/usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 7.4.0)
/usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 1.0.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 88.3.6)
/System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices (compatibility version 1.0.0, current version 18.0.0)
/usr/lib/libobjc.A.dylib (compatibility version 1.0.0, current version 227.0.0)
/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 150.0.0, current version 368.28.0)
/System/Library/Frameworks/AppKit.framework/Versions/C/AppKit (compatibility version 45.0.0, current version 824.42.0)
/System/Library/Frameworks/Foundation.framework/Versions/C/Foundation (compatibility version 300.0.0, current version 567.29.0)
All of these are Apple libraries, except for Sparkle. When I run otool -L on Sparkle, it says:
* cputype: 18
* cpusubtype: 0
Here are the arguments I'm passing to gcc:
/Developer/usr/bin/gcc-4.0 -x objective-c -arch ppc -pipe -Wno-trigraphs -fpascal-strings -fasm-blocks -Os -mdynamic-no-pic -Wreturn-type -Wunused-variable -fmessage-length=0 -mtune=G5 -fvisibility=hidden -mmacosx-version-min=10.4 -I/Users/wedaly/Desktop/trunk/build/hip_cat.build/Release/Accompanist.build/Accompanist.hmap -F/Users/wedaly/Desktop/trunk/build/Release -F/Users/wedaly/Desktop/trunk/Libraries -I/Users/wedaly/Desktop/trunk/build/Release/include -I/Users/wedaly/Desktop/trunk/Libraries/FTGL/include -I/usr/local/include/freetype2 -I/Users/wedaly/Desktop/trunk/build/hip_cat.build/Release/Accompanist.build/DerivedSources -isysroot /Developer/SDKs/MacOSX10.4u.sdk -include /Library/Caches/com.apple.Xcode.501/SharedPrecompiledHeaders/hip_cat_Prefix-aykibdocjsqrovgqtpxanaibqvdp/hip_cat_Prefix.pch -c /Users/wedaly/Desktop/trunk/Sources/SongView.m -o /Users/wedaly/Desktop/trunk/build/hip_cat.build/Release/Accompanist.build/Objects-normal/ppc/SongView.o
FTGL and freetype both have the same cputype and cpusubtype as Sparkle and the application itself.
The notes for -mtune say that it should work for older processors.
Any ideas?
Best,
Will