after a little discussion with Geoff the Medio and having some problems when building a statically linked version of FreeOrion for Linux, I tried to figure some things out. I think the actual situation does not allow most linux-users to run FreeOrion, as it is to complicated to build it.
Firstly, i took a look at the binaries. Dependencies of the binary after beeing compiled by scons are:
freerion 72 libs
freeriond 72 libs
freerionca 72 libs
So I played around with gcc-options, and after adding -Wl,--as-needed to the command-line, there were only left:
freerion 67 libs
freeriond 35 libs
freerionca 38 libsSo, my first suggestion
: add the parameter -Wl,--as-needed
But this is still too much in my opinion! Somewhere deep inside the code there must be references to some libs, that are not needed at all but linked into the object at build-time. That causes problems, for it is almost impossible to run these binaries on any other system.
I know that this is related to some problems the Linker on unix-systems has, as it will not allow a binary to run without ALL dependecies fullfilled. I think some code would never be called or even some libs would be completely ignored, but I was not able to find out how to skip these dependencies for now.
The statically-linked binaries I produce with a script do not have that much dependencies:
freerion 18 libs
freeriond 4 libs
freerionca 8 libs (Python2.4 needs 5 libs)
That allows running freeoriond on root-servers without having to install many libs.
The 18 libs in freeorion are related to libGL and libGLU, as these libs need about 14 more libs.
ldd -u freeorion-static