Go Down

Topic: Large installation on Mac OS X (Read 1 time) previous topic - next topic


The arduino-0007 installer for mac os x has unstripped avr development tools and duplicates of many of the tools in tools/avr/avr/bin. That could be slimmed down by about a factor of four by stripping and eliminating duplicates.


Sounds like a good idea.  

So the binaries in tools/avr/avr/bin are just duplicates of the ones in tools/avr/bin but without the "avr-" extension?  If so, do you know why does the build process for the avr toolchain create both?  

How does one go about stripping the binaries?  What does it do?


Mar 22, 2007, 08:58 pm Last Edit: Mar 22, 2007, 09:08 pm by jims Reason: 1
I'll check the build process tonight. I haven't built from source yet.


How does one go about stripping the binaries?  What does it do?

Code: [Select]
bash$ strip exefile

It removes symbol information (useful for debugging and profiling, but can make executables much larger).

The whole installed directory is only 91Mb on my system, IMO negligible in terms of disk usage.



Yea, 91 MB isn't too bad on todays (dozens of gigabytes) harddrives, but the download (~30 MB) can be annoying for those with a slow internet connection.  So if there's an easy way to reduce the size (e.g. stripping the executables or removing duplicates), I think it's probably worthwhile.

Any idea if those binaries are really duplicates?


The binaries in tools/avr/avr/bin are a subset of those in tools/avr/bin; those present are exact duplicates except for the fact that those in tools/avr/bin have "avr-" prefixed to the name.

On the other hand,  tools/avr/lib seems almost empty, while tools/avr/avr/lib has the required stuff, like the .o version of the C runtime for the various AVR processors.

tools/avr/include is empty, while tools/avr/avr/include contains the necessary files.

So, not exact duplicates, but some can be eliminated with work.  A 23Mb savings can be realized by stripping executables in tools/avr/bin, and another 17Mb can be saved by eliminating duplicates between tools/avr/bin and tools/avr/avr/bin (or, save about 14Mb by just stripping everything in tools/avr/avr/bin).

I don't see true duplication such that you could eliminate a single subdirectory tree because it was duplicated elsewhere.

I haven't tried stripping all the binaries to see what happens - I'm in the middle of a project and don't want to screw up my installation just now. (:  I suspect it will all work just fine.



Excellent.  Thanks for doing this research.  I'll give it a shot and hopefully Arduino 0008 will be a good bit slimmer than Arduino 0007.


Stripping all the binaries works. Executables are found in...
Code: [Select]

It is safe to just do a "strip *" in those directories. It is smart enough to not butcher the handful of scripts that are in there.


Cool.  Has anyone tried deleting the redundant binaries (in tools/avr/avr/bin)?

Go Up

Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

via Egeo 16
Torino, 10131