Stripping Universal Binaries of Intel or PowerPC code (#2): Simplified Terminal command, more information
Stripping Universal Binaries of Intel or PowerPC code (#2): Simplified Terminal command, more information
We previously noted that the presence of Intel code in Universal binaries can cause some troubleshooting issues. For instance, a problem we've been covering where the presence of iTunes 6.0.2 causes Disk Utility to be unable to run can be solved by stripping the application of its Intel-based code.
In our previous coverage, we noted an application called TrimTheFat -- a simple, silent drop-launch utility to strip the code for the architecture(s) you're not using from a Universal application. We also noted a Terminal command for stripping Intel-code from Universal applications.
We've since corresponded with the author of TrimTheFat, who offers a more succinct Terminal command for removing either Intel or PowerPC code:
- cd /Applications;sudo ditto --arch [architecture to be stripped] iTunes.app iTunes-thin.app
(where [architecture to be stripped] is either "ppc" or "i386")
In the above example, a new file called "iTunes-thin.app" will be created that is missing either PowerPC (ppc) or Intel (i386) code.
The author of TrimTheFat also notes that ditto apparently drops some file metadata:
"ditto does not preserve file flags (see chflags(1)) including uchg, which corresponds to 'locked' elsewhere in the system."
Feedback? Late-breakers@macfixit.com.
Previous coverage:
- Stripping Universal Binaries of Intel code -- a potential troubleshooting procedure for PowerPC Macs
Resources