Stripping Universal Binaries of Intel code -- a potential troubleshooting procedure for PowerPC Macs
It seems 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.
This workaround may be especially applicable for Mac OS X 10.3.9 systems.
A new application called TrimTheFat is is a simple, silent drop-launch utility to strip the code for the architecture(s) you're not using from a Universal application
Meanwhile, MacFixIt reader Frank Kittie offers a terminal based series of commands, with iTunes as the example application:
- sudo ditto --rsrc /Applications/iTunes.app /tmp/iTunes.app
- sudo rm -rf /Applications/iTunes.app
- sudo ditto --arch ppc --rsrc /tmp/iTunes.app /Applications/iTunes.app
- sudo rm -rf /tmp/iTunes.app
Frank writes:
"This should replace the iTunes application with a copy of itself, the copy containing only PowerPC code. The "--arch ppc" strips all code for other architectures.
"For me the resulting application ran fine (in a quick cursory test) and a repair permissions no longer gave me the 'Disk Utility lost connection with Disk Management Tool and cannot continue.'
Feedback? Late-breakers@macfixit.com.
Resources


Is there any advantage of stripping the Intel code out?
Will my applications run faster, better? Will I save a lot of memory?
If my application(s) crash once in a while, should I try to strip the Intel code out?
Is there any DANGER of doing this?
"Will my applications run faster, better?"
Absolutely not. Only the PPC code is executing before you strip and only the
PPC code is executing after you strip. No difference.
"Will I save a lot of memory?"
The amount of RAM the application will take up while running? Absolutely no
difference. The small amount of disk space that the intel code takes in the
executable? Little more than a couple of MB for each application.
"If my application(s) crash once in a while, should I try to strip the Intel
code out?"
Absolutely not. It won't make any difference, as I mentioned before, only the
PPC code is executing before you strip and only the PPC code is executing
after you strip. No difference.
Applications directory has done in the past?
Just about any change has a chance of screwing up an updating process. I don't expect this one is particularly likely to cause problems, though, because I don't think most update creators are going to go to the effort of doing surgery on embedded files, opting instead to replace them with the fresh, now-updated, copy.
TTF 0.5 should be out in a couple of days and offer a non-destructive mode (it makes a stripped copy instead of working in-place).
- by Ilgaz January 22, 2006 2:56 AM PST
- Allume Spring Cleaning 8 does this with a HUGE warning that it _may_ create
- Like this Reply to this comment
-
(6 Comments)problems with future updates and software update.
It has a "backup" option while this workaround does not have.