The International Simutrans Forum

 

Author Topic: SF Simutrans Binary is a lot smaller than self Compiled Binary  (Read 304 times)

0 Members and 1 Guest are viewing this topic.

Offline NNW

  • *
  • Posts: 79
  • Languages: EN,DE,AT
SF Simutrans Binary is a lot smaller than self Compiled Binary
« on: February 09, 2020, 07:21:44 PM »
That from the Nightly Side is 4.5 MB and my's 56 MB. Why?

Offline Freahk

  • *
  • Posts: 625
  • Languages: DE, EN
Re: SF Simutrans Binary is a lot smaller than self Compiled Binary
« Reply #1 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.

Offline makie de

  • *
  • Posts: 131
    • Homepage PAK128-German
  • Languages: DE
Re: SF Simutrans Binary is a lot smaller than self Compiled Binary
« Reply #2 on: February 09, 2020, 07:34:28 PM »
DEBUG = 1 ?
make the file 60 mb big

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 9781
  • Languages: De,EN,JP
Re: SF Simutrans Binary is a lot smaller than self Compiled Binary
« Reply #3 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...) ).

Offline NNW

  • *
  • Posts: 79
  • Languages: EN,DE,AT
Re: SF Simutrans Binary is a lot smaller than self Compiled Binary
« Reply #4 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...

Offline Ters

  • Coder/patcher
  • Devotee
  • *
  • Posts: 5600
  • Languages: EN, NO
Re: SF Simutrans Binary is a lot smaller than self Compiled Binary
« Reply #5 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.

Offline NNW

  • *
  • Posts: 79
  • Languages: EN,DE,AT
Re: SF Simutrans Binary is a lot smaller than self Compiled Binary
« Reply #6 on: February 16, 2020, 05:14:52 PM »
Problem fixed. The Deb Repo is useable again :)
Thanks to Frank for his help