Linux Static Builds are now available

Linux Static Builds are now available

Discuss the source code and development of Spring Engine in general from a technical point of view. Patches go here too.

Moderator: Moderators

User avatar
jK
Spring Developer
Posts: 2299
Joined: 28 Jun 2007, 07:30

Linux Static Builds are now available

Post by jK »

LinuxStaticBuild/Cross-Distro/BinaryBlob

First, the definition "Linux Static Build" means a binary that has near zero library (*.so) dependencies and so can run in any Linux distro w/o recompiling. Many call those builds `binary blobs`.

http://springrts.com/dl/buildbot/defaul ... -g3fce885/
(just download the "minimal-portable", unpack and double click `spring`)

Note: There won't be such a build with the 90.0 release, as the changes are done in a different git branch. But I might hand such a build in later.

PS: thanks to abma, pr-downloader already (the latest git one) has support for engine downloading. So it should be easy to add a ZKL-like multi-engine support to Linux. (Not that this drops the todo for a binary naming changing to support multiple installed spring versions)
User avatar
jamerlan
Balanced Annihilation Developer
Posts: 683
Joined: 20 Oct 2009, 13:04

Re: Linux Static Builds are now available

Post by jamerlan »

Are these static builds slower or faster then dynamic builds?
User avatar
jK
Spring Developer
Posts: 2299
Joined: 28 Jun 2007, 07:30

Re: Linux Static Builds are now available

Post by jK »

They tend to be a very little bit faster. But in other libraries (i.e. unitsync.so) they tend to be some slower, esp. when be compiled as PIC as GCC wants (didn't fixed that yet, so buildprocess outputs many warnings regarding that atm).

Still speed is not a reason to compile a static linked binary.
varikonniemi
Posts: 451
Joined: 03 Jul 2011, 11:54

Re: Linux Static Builds are now available

Post by varikonniemi »

The package spring_{develop}89.0.1-287-g3fce885_minimal-portable-linux-static.7z says this when i try to launch spring:

Code: Select all

q@varikonniemi-desktop:~/Downloads/spring_{develop}89.0.1-287-g3fce885_minimal-portable-linux-static$ ./spring
./spring: error while loading shared libraries: libgomp.so.1: cannot open shared object file: No such file or directory
User avatar
jK
Spring Developer
Posts: 2299
Joined: 28 Jun 2007, 07:30

Re: Linux Static Builds are now available

Post by jK »

Distro?
What does `gcc -print-file-name=libgomp.so` return?
varikonniemi
Posts: 451
Joined: 03 Jul 2011, 11:54

Re: Linux Static Builds are now available

Post by varikonniemi »

Code: Select all

q@varikonniemi-desktop:~$ gcc -print-file-name=libgomp.so
/usr/lib/gcc/x86_64-linux-gnu/4.6/libgomp.so
Im on ubuntu 12.04

Could i do a symlink of .so.1 to .so and make it work?
User avatar
jK
Spring Developer
Posts: 2299
Joined: 28 Jun 2007, 07:30

Re: Linux Static Builds are now available

Post by jK »

varikonniemi wrote:Could i do a symlink of .so.1 to .so and make it work?
Yup, but I will just `fix` the libname in the binary. Already did so for SDL. Still it might be good if you do so to check if there are other missing symlinks I need to fix.
varikonniemi
Posts: 451
Joined: 03 Jul 2011, 11:54

Re: Linux Static Builds are now available

Post by varikonniemi »

i already have a libgomp.so.1 which is a link to libgomp.so which is a link to ../../../x86_64-linux-gnu/libgomp.so.1 :shock:
User avatar
albator
Posts: 866
Joined: 14 Jan 2009, 14:20

Re: Linux Static Builds are now available

Post by albator »

Nice !
Cannot wait for 0.90 !
dansan
Server Owner & Developer
Posts: 1203
Joined: 29 May 2010, 23:40

Re: Linux Static Builds are now available

Post by dansan »

Wow - very nice! I followed the other thread on linux static builds, and had given up hope already :)

I just tried out 89.0.1-287-g3fce885 and starting ./spring <.sdf> worked perfectly.

I got a lot of
[ArchiveScanner] Warning: Archive /home/daniel/.spring/maps/<map>.sd7: The cost for reading a 2nd class meta-file is too high: <file>.tdf
and
Warning: weapondef cylinderTargetting is deprecated and will be removed in the next release (use cylinderTargeting).
I couldn't get it to run with SL though. It said the unitsync-lib doesn't work or something... any idea?
User avatar
jK
Spring Developer
Posts: 2299
Joined: 28 Jun 2007, 07:30

Re: Linux Static Builds are now available

Post by jK »

dansan wrote:...
Not static build related.
dansan wrote:I couldn't get it to run with SL though. It said the unitsync-lib doesn't work or something... any idea?
Works fine here, you know it's not a 90.0 build and won't work in multiplayer?
abma
Spring Developer
Posts: 3798
Joined: 01 Jun 2009, 00:08

Re: Linux Static Builds are now available

Post by abma »

dansan wrote:I couldn't get it to run with SL though. It said the unitsync-lib doesn't work or something... any idea?
is springlobby 64 bit? spring static is 32 bit...
varikonniemi
Posts: 451
Joined: 03 Jul 2011, 11:54

Re: Linux Static Builds are now available

Post by varikonniemi »

I tested again with http://springrts.com/dl/buildbot/defaul ... -static.7z and i get this error now on ubuntu 12.10 64bit:

Code: Select all

./spring: error while loading shared libraries: libSDL-1.2.so.0: cannot open shared object file: No such file or directory

Code: Select all

gcc -print-file-name=libSDL-1.2.so.0
/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../x86_64-linux-gnu/libSDL-1.2.so.0
User avatar
jK
Spring Developer
Posts: 2299
Joined: 28 Jun 2007, 07:30

Re: Linux Static Builds are now available

Post by jK »

it is a 32bit build you need to install 32bit libs
varikonniemi
Posts: 451
Joined: 03 Jul 2011, 11:54

Re: Linux Static Builds are now available

Post by varikonniemi »

Oh yes, how silly of me.

After installing them it worked fine, now on to some more testing...

edit: this is the only bugger i have found so far
Image
User avatar
jK
Spring Developer
Posts: 2299
Joined: 28 Jun 2007, 07:30

Re: Linux Static Builds are now available

Post by jK »

varikonniemi wrote:edit: this is the only bugger i have found so far
It's a develop build and not a release one. Also I don't have the linux_static buildbot running 24/7 - it's a vm that eats a damn lot memory that isn't freed afterwards - , so it is somewhat outdated from time to time.
JoeChip
Posts: 62
Joined: 28 Nov 2012, 12:11

Re: Linux Static Builds are now available

Post by JoeChip »

Hi, how could I have linux builds for the 0.91 version ? I personnaly would need the 64bits one.

see http://springrts.com/phpbb/viewtopic.php?&t=29112
abma
Spring Developer
Posts: 3798
Joined: 01 Jun 2009, 00:08

Re: Linux Static Builds are now available

Post by abma »

64 bit builds seems to currently not work and also we have no static builds for 91.0... if you want to try, grab:
http://springrts.com/dl/buildbot/defaul ... -static.7z

but it will crash when you click start i guess... also this version can't be used for online-play. 32 bit builds are also not available for 91.0, hopefully we get it up for 92.0.
JoeChip
Posts: 62
Joined: 28 Nov 2012, 12:11

Re: Linux Static Builds are now available

Post by JoeChip »

I don't understand : this file contains only windows files like dll and exe. I can't understand what's the problem of compiling C++ sources into 32 or 64 bits executable, were it for win or linux. Isn't C++ quiet standard ? How comes an opensource project runs only under windows ? Isn't that weird ?

I know my questions sound a little angry, but i'm not : just really surprised ; I come from win world and I thought linux was more open and decentralized. Like I could have compile the sources of an opensource project for any OS i can use.
JoeChip
Posts: 62
Joined: 28 Nov 2012, 12:11

Re: Linux Static Builds are now available

Post by JoeChip »

Btw, Springlobby runs fine under Mageia 3 x86.64 , and only under 3, not Mageia 2 ...
Post Reply

Return to “Engine”