[Xastir] Executable sizes, internal/external Shapelib

Tom Russo russo at bogodyn.org
Mon Nov 13 10:54:56 EST 2006


On Mon, Nov 13, 2006 at 07:29:00AM -0800, we recorded a bogon-computron collision of the <archer at eskimo.com> flavor, containing:
> 
>          Shapelib  Shapelib  Shapelib-Int  Shapelib-Ext
>          Internal  External      Stripped      Stripped
> xastir:   2404899   2404943       1101020       1101020
> testawk:    53536     53600         19128         19160
> 
> These sizes are with all regular options plus rtree support compiled
> in, on OpenSuSE10.0 Linux.
> 
> So...  The size of the Xastir executable doesn't change at all
> except for the embedded debug information, which goes away if you
> strip the executable.

Yep.  Now that you point that out I'm seeing pretty much the same thing on 
FreeBSD.  In fact, I also see the same thing you're seeing in that the 
dynamically linked version is slightly larger than the static-linked version.

This is a little strange, as one of the points of shared libraries is to 
reduce executable size.  But I guess that shapelib functions are just so 
small that the overhead for handling the shared libraries is big enough
to erase the savings.

I still stand by the points I made about bloating the code base and statically 
linking too many libraries (especially big ones).  But perhaps it is OK to
use the static linked shapelib unless you need shapelib for something other 
than xastir (e.g. GPSMAN/gpsmanshp), at which point you need to install 
shapelib as a shared library anyway.  

-- 
Tom Russo    KM5VY   SAR502   DM64ux          http://www.swcp.com/~russo/
Tijeras, NM  QRPL#1592 K2#398  SOC#236 AHTB#1 http://kevan.org/brain.cgi?DDTNM
"And, isn't sanity really just a one-trick pony anyway? I mean all you get is
 one trick, rational thinking, but when you're good and crazy, oooh, oooh,
 oooh, the sky is the limit!"  --- The Tick



More information about the Xastir mailing list