Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Crash on G3: dyld incompatible cpu-subtype
wedaly Offline
Junior Member
**

Posts: 5
Joined: Jan 2008
Post: #1
Crash on G3: dyld incompatible cpu-subtype
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
2008.04.22 04:54 AM
Find all posts by this user Quote this message in a reply
wedaly Offline
Junior Member
**

Posts: 5
Joined: Jan 2008
Post: #2
Crash on G3: dyld incompatible cpu-subtype
Actually managed to figure it out myself Smile

So it turns out that the build settings I posted above don't cause this problem. The problem occurred with the build settings I'd used in a previous build.

In the problematic build settings, I hadn't specified anything for "Mac OS X Deployment Target", which meant that -mmacosx-version-min=10.4 wasn't getting passed to gcc. Apparently leaving this out changes the cpusubtype to 10, which makes the code incompatible with G3.

Still need to verify that this actually allows the code to run. But I'm pretty sure this should fix it.
2008.04.22 05:25 AM
Find all posts by this user Quote this message in a reply
gremar Offline
Newbie
*

Posts: 1
Joined: Feb 2013
Post: #3
RE: Crash on G3: dyld incompatible cpu-subtype
(2008.04.22 05:25 AM)wedaly Wrote:  Actually managed to figure it out myself Smile

So it turns out that the build settings I posted above don't cause this problem. The problem occurred with the build settings I'd used in a previous build.

In the problematic build settings, I hadn't specified anything for "Mac OS X Deployment Target", which meant that -mmacosx-version-min=10.4 wasn't getting passed to gcc. Apparently leaving this out changes the cpusubtype to 10, which makes the code incompatible with G3.

Still need to verify that this actually allows the code to run. But I'm pretty sure this should fix it.

5 years later your post helped me solve a problem with one of my customer's G3. Thanks you, your solution works. I tested on a PowerBook Pismo G3 running 10.4.11. ;-)
2013.02.06 12:49 PM
Find all posts by this user Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)