[Xorp-users] Reducing Xorp binary setup size ?

saurabh saurabh.pandya at elitecore.com
Mon Mar 15 05:41:40 PDT 2010

Thanks Ben for illustrative msg...

Well I compile and installed code git, from your tree on 
my fedora-6 machine with "scons" and "scons install"

It generates total un-stripped size 198 MB, and stripped size 39 MB 
(not 18 MB) in /usr/local/xorp binary directory. 

I am using gcc 4.1.1 version on fedora-6. Some additional configuration 
Or patch you made for size reduction?

Un-stripped total package inside /usr/local/xorp
  (after socns and scons install)

[root at localhost xorp]# pwd

[root at localhost xorp]# ls
lib  sbin  share

[root at localhost xorp]# du -m   (Show size of each sub dir in MB)
152     ./lib/xorp/lib
8       ./lib/xorp/bin
25      ./lib/xorp/sbin
183     ./lib/xorp
183     ./lib
1       ./share/xorp/templates
1       ./share/xorp
1       ./share
16      ./sbin
198     .

After  strip -s <all binaries , and all shared libraries inside lib/xorp/>

[root at localhost xorp]# du -m  
34      ./lib/xorp/lib
1       ./lib/xorp/bin
3       ./lib/xorp/sbin
37      ./lib/xorp
37      ./lib
1       ./share/xorp/templates
1       ./share/xorp
1       ./share
3       ./sbin
39      .

-----Original Message-----
From: Ben Greear [mailto:greearb at candelatech.com] 
Sent: Saturday, March 13, 2010 10:07 AM
To: saurabh
Cc: xorp-users at xorp.org
Subject: Re: [Xorp-users] Reducing Xorp binary setup size ?

On 03/12/2010 10:36 AM, Ben Greear wrote:
> While getting xorp.ct to compile on BSD, I noticed that
> much of the Netlink logic is compiled in (and dummied out in places)
> even when the OS doesn't use netlink.
> Likely some space can be gained by completely #ifdef'ing out fea
> logic that is not used on a particular platform...
> I'll poke into that more a bit later...

I added patches to my xorp.ct tree that disables CLICK by default,
(scons enable_click=yes turns it back on).

I also compiled out the table/route get/set logic that wasn't being used
for particular platforms.

All together, this decreased on-disk size by about 300k.

I compile every protocol, and my entire tree is under 18MB, so I imagine you
can cut it down quite a bit.

We could probably do other patches to selectively disable the rest of the
to allow more options for building.


> Thanks,
> Ben

Ben Greear <greearb at candelatech.com>
Candela Technologies Inc  http://www.candelatech.com

More information about the Xorp-users mailing list