Benches Uncategorized

5

Unknown required load command

apple Verified

Imported from the Apple Support Forums via the Wayback Machine 🔗

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

5 replies

Sign in or join Beachball Help to reply.

  1. 0

    etresoft

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    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

    ?

  2. 0

    Brian Postow

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    etresoft wrote:

    Which is particularly interesting because I had it compiled with

    ?

    D'oh. I compiled without shared libraries. Although I've since seen that the -dynamic flag was still in there for some reason...

    I think The problem is that i'm using old compiled libraries. I need to start compiling from scratch...

  3. 0

    Brian Postow

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    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.

  4. 0

    Brian Postow

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    The solution: There is a dynamic load function (0x22) that got added at 10.5.6. The system that I was testing on was 10.5.5. I upgraded to 10.5.8, and the problem magically went away.

  5. 0

    Brian Postow

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    So, it turns out that maybe I was wrong. I now have another 10.5.8 system, I'm running the same software, and I'm getting the same 0x80000022 error... has anyone come up with a better solution in the months since I asked this question?