The International Simutrans Forum

Development => Technical Documentation => Topic started by: NNW on February 09, 2020, 07:21:44 PM

Title: SF Simutrans Binary is a lot smaller than self Compiled Binary
Post by: NNW on February 09, 2020, 07:21:44 PM
That from the Nightly Side is 4.5 MB and my's 56 MB. Why?
Title: Re: SF Simutrans Binary is a lot smaller than self Compiled Binary
Post by: Mariculous on February 09, 2020, 07:31:22 PM
That depends on how exactly you built the binary.
Optimisations can grow or shrink the size by a huge amount, debugsymbols will also grow it.
Further compiling and statically linking dependencies into the binary rather than compiling against the headers and dynamically linking these will drastically increase the size.
We cannot tell more as long as we don't know how exactly you have compiled the binary.
Title: Re: SF Simutrans Binary is a lot smaller than self Compiled Binary
Post by: makie on February 09, 2020, 07:34:28 PM
DEBUG = 1 ?
make the file 60 mb big
Title: Re: SF Simutrans Binary is a lot smaller than self Compiled Binary
Post by: prissi on February 10, 2020, 03:50:49 AM
This is the symbol code, you can "strip sim.exe" or "strip sim" and remove the symbols. But I also use libfreetype without libharfbuzz (self-compiled) and a self-compiled miniupnpc (since the distributed lib from mimgw64 uses the cmake file, which is broken and does not bother to fix is because miniupnpc should fix it, but nobodys bother there...) ).
Title: Re: SF Simutrans Binary is a lot smaller than self Compiled Binary
Post by: NNW on February 10, 2020, 08:23:39 AM
I have downloaded the Source from GitHub, because when I try the SF once I get an error from make: No target found blablabla..
Then I renamed the config.template to config.default, Set the Parameters for SDL2, OS-Type (Linux) FreeType etc. and started make.

My OS is Linux with Kernel 4.15.xx and my Distri is Linux Mint 19.3

This is only the second time I run a compiler to build a binary on my own because normally with a Debian based system you don't must compile anything from the source. But the ST Repo doesn't work because something has changed and I get an obscure error apt can't find a release file because this Repo is untrusted...
Title: Re: SF Simutrans Binary is a lot smaller than self Compiled Binary
Post by: Ters on February 10, 2020, 04:39:11 PM
60 MB? That is nothing. Mine is 86 MB. Used to be around 60, though, so I'm not quite sure what has changed. But, yeah, what others have said: builds with debugging symbols are huge.
Title: Re: SF Simutrans Binary is a lot smaller than self Compiled Binary
Post by: NNW on February 16, 2020, 05:14:52 PM
Problem fixed. The Deb Repo is useable again :)
Thanks to Frank for his help