Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Unknown required load command

I'm getting the error:

dyld: unknown required load command 0x80000022
Trace/BPT trap


in a command line application that has worked before. Now, I compiled this on a 10.6 system, with gcc-4.0/c++-4.0, and I'm running on a 10.5 system. When I first upgraded I was getting a very similar error when I was using the 10.5 version of xcode to compile things, and it went away.

When I try running this on the 10.6 machine I get:


dyld: Library not loaded: /usr/X11R6/lib/libexpat.0.dylib
Referenced from: /Users/acordex/Documents/projects/t38modem.cpy/t38modem/objDarwin_x86r/t38modem
Reason: image not found
Trace/BPT trap


Which is particularly interesting because I had it compiled with

Mac Mini, Mac OS X (10.6)

Posted on Sep 9, 2009 1:49 PM

Reply
5 replies

Sep 10, 2009 9:53 AM in response to Brian Postow

Brian Postow wrote:
in a command line application that has worked before. Now, I compiled this on a 10.6 system, with gcc-4.0/c++-4.0, and I'm running on a 10.5 system. When I first upgraded I was getting a very similar error when I was using the 10.5 version of xcode to compile things, and it went away.


Did you use “-isysroot /Developer/SDKs/MacOSX10.5.sdk -mmacosx-version-min=10.5' on the build?


dyld: Library not loaded: /usr/X11R6/lib/libexpat.0.dylib
Referenced from: /Users/acordex/Documents/projects/t38modem.cpy/t38modem/objDarwin_x86r/t38modem
Reason: image not found
Trace/BPT trap


expat shouldn't live there. It sounds like you linked against a really old expat that was in the wrong place. If at all possible, you should use "install nametool" and bundle your applications so this sort of thing can't happen.

Which is particularly interesting because I had it compiled with


?

Sep 16, 2009 3:04 PM in response to Brian Postow

I love it when I do a google search to answer a question and I find MY OWN question on Apple Discussions...

Ok, update: I now (I think) am compiling it without dynamic libraries, there's no -dynamic in the gcc lines. I'm compiling with 4.0 compilers and
$CFLAGS = -isysroot /Developer/SDKs/MacOSX10.5.sdk -mmacosx-version-min=10.5

It now runs on the 10.6 machine, but on the 10.5 machine it still gives me the required load command error.

Unknown required load command

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.