Pages: [1]   Go Down
Author Topic: Large installation on Mac OS X  (Read 909 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Full Member
***
Karma: 0
Posts: 203
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Forum Administrator
Cambridge, MA
Offline Offline
Faraday Member
*****
Karma: 11
Posts: 3538
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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?
Logged

0
Offline Offline
Full Member
***
Karma: 0
Posts: 203
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I'll check the build process tonight. I haven't built from source yet.
« Last Edit: March 22, 2007, 03:08:30 pm by jims » Logged

0
Offline Offline
Faraday Member
**
Karma: 8
Posts: 2526
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Code:
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.

-j
Logged

Forum Administrator
Cambridge, MA
Offline Offline
Faraday Member
*****
Karma: 11
Posts: 3538
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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?
Logged

0
Offline Offline
Faraday Member
**
Karma: 8
Posts: 2526
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.

-j
Logged

Forum Administrator
Cambridge, MA
Offline Offline
Faraday Member
*****
Karma: 11
Posts: 3538
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

0
Offline Offline
Full Member
***
Karma: 0
Posts: 203
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Stripping all the binaries works. Executables are found in...
Code:
tool/avr/avr/bin/
tools/avr/bin/
tools/avr/libexec/gcc/avr/
tools/avr/libexec/gcc/avr/4.0.2/install-tools/
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.
Logged

Forum Administrator
Cambridge, MA
Offline Offline
Faraday Member
*****
Karma: 11
Posts: 3538
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Pages: [1]   Go Up
Jump to: