• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Universal binary with x86_64 for 10.6 only
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Universal binary with x86_64 for 10.6 only


  • Subject: Universal binary with x86_64 for 10.6 only
  • From: BJ Homer <email@hidden>
  • Date: Wed, 20 Jan 2010 15:41:46 -0700

I'm building a command-line tool, and I want it to run 32-bit on Tiger and Leopard and 64-bit on Snow Leopard. I have set the Base SDK to be 10.4, with a conditional build setting on x86_64 for 10.6. I have done the same for the deployment target; 10.4 generally, 10.6 for x86_64.

When I run the binary on Snow Leopard, it works fine. When I run it on Leopard, I get the following error:

Dyld Error Message: unknown required load command 0x80000022
I've used otool to inspect the binary. It appears that the unknown required load command is LC_DYLD_INFO_ONLY. On the Leopard machine, `otool -lv -arch x86_64 <binary>` shows the unknown command. Running the same command on Snow Leopard shows LC_DYLD_INFO_ONLY in the same place. So I've verified that I can identify it. When I run it with -arch i386, the command isn't there. This is what I expected; the x86_64 build is targeted for 10.6 only, so it's fine if SL-only load commands are present there.

The problem: Running the binary from the command line on Leopard crashes. In the crash report it's apparent that it's attempting to run the x86_64 version, even though that one has a deployment target of 10.6.

I've found the LSMinimumSystemVersionByArchitecture key that can be put into an app bundle's Info.plist, but this is a flat file. I tried embedding the Info.plist inside the flat binary, but it didn't seem to make a difference.

Am I doing something wrong? I had thought that when running a universal binary, it would look through all the binaries and find the best choice that it can run. Since x86_64 is linked against the 10.6 SDK, I had thought it would pass over that and use the 10.5 SDK. Is this incorrect?

Any ideas?

-BJ Homer
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Universal binary with x86_64 for 10.6 only
      • From: Steve Christensen <email@hidden>
  • Prev by Date: Re: including xibs from another project
  • Next by Date: Re: Universal binary with x86_64 for 10.6 only
  • Previous by thread: how can I make a custom copy target produce a product?
  • Next by thread: Re: Universal binary with x86_64 for 10.6 only
  • Index(es):
    • Date
    • Thread