Loading...
  OR  Zero-K Name:    Password:   

Compiling spring 91.0 with boost=>1.50

20 posts, 1617 views
Post comment
Filter:    Player:  
sort

11 years ago
Since I went through the frustration of not having this work, trying to fix it, and finally fixing it, I thought I should at least share my solution/experience in case someone else needs it.

I am on Arch Linux and had recently upgraded everything (including the boost library to 1.53). I then notice we are playing on 91 still. No big deal, lets just get the source and compile it. Doesn't compile? Well, lets just apply the patch currently on the repo's pkgbuild:

(https://projects.archlinux.org/svntogit/community.git/plain/trunk/boost-1.50.patch?h=packages/spring)

Wait, it still gets stuck?:

/home/N2maniac/git/spring/spring_91.0/AI/Skirmish/E323AI/CScopedTimer.h:39:31: error: expected unqualified-id before numeric constant
boost::xtime_get(&t, boost::TIME_UTC);
^
make[2]: * [AI/Skirmish/E323AI/CMakeFiles/E323AI.dir/CTaskHandler.cpp.o] Error 1
make[1]: * [AI/Skirmish/E323AI/CMakeFiles/E323AI.dir/all] Error 2
make: * [all] Error 2

Oh, turns out that file needs a similar change:

+ boost::xtime_get(&t, boost::TIME_UTC);
- boost::xtime_get(&t, boost::TIME_UTC_);

And now it gets through compilation and I can play again!
+0 / -0
11 years ago
It may be that hard on arch, I did it on Xubuntu but it was a LOT easier than that for me. This is what it says about Ubuntu on the compiling instruction page:
quote:
# compiler and build tools
sudo apt-get install build-essential cmake cmake-gui git

# spring dependencies
sudo apt-get install libglew-dev libsdl-dev libdevil-dev libopenal-dev \
libogg-dev libvorbis-dev libfreetype6-dev p7zip-full libxcursor-dev \
libboost-thread-dev libboost-regex-dev libboost-system-dev \
libboost-program-options-dev libboost-signals-dev

# alternatively, you can try ...
sudo apt-get build-dep spring

That is for Ubuntu but I would imagine, having never used arch, that it was mainly just changing, for example, "sudo apt-get install [program name]" with "sudo [install package command] [package name]". I actually made a script to compile 91.0 if anyone wants it but it only works on Debian based distros.
+0 / -0
11 years ago
I am on arch and what I used to do before the last update (which was reverted pretty fast as usual) was keeping the old boost and spring (you can prevent them from updating in pacman.conf iirc)
There's also some website that allows you to download old packages, so no need to go through compiling :P

Right now i am too lazy to download the old ones again so that's why i stopped playing xD
+0 / -0

11 years ago
I would like to try your script TheSponge. Have been trying to get 91 to work but haven't encountered any success yet.
+0 / -0
[AG]abma
11 years ago
about the compile error, just fetch the latest version of E323AI source code, it contains this patch:

https://github.com/Error323/E323AI/commit/78f8a5e5aea1fe20468917945f9378ee1425e83e
+0 / -0
@lauri0 You can download it from https://docs.google.com/file/d/0B-0MFn2vQYvSQXlBSE4wREtZTTQ/edit?pli=1. It should just work on Ubuntu or any other Debian based distribution. You may need to give it permission to run as a program before it works. If you encounter problems run it in a terminal and post your output.
+0 / -0

11 years ago
It could not find some things, I guess I'm missing stuff: https://docs.google.com/file/d/0B2ZmzlfAxF6UV2NldkdHWFRPTzQ/edit?usp=sharing
+0 / -0
quote:
-- Could NOT find Boost

quote:
-- Boost version: 1.49.0


Weird. Try running "sudo apt-get build-dep spring" and then run the script again. I noticed you are on 64 bit, that may make a difference. I am fairly certain that this is a problem about not being able to find boost.
+0 / -0

11 years ago
...And another thing that popped up (and not just for me it seems)
http://springrts.com/mantis/view.php?id=3789

Had to apply that to the relevant file in rts/System/Sound/EFX.cpp
+0 / -0
11 years ago
USrank[rks]N2maniac: or just use the PKGBUILD of 91.0, which contains the patch required. https://projects.archlinux.org/svntogit/community.git/tree/trunk/PKGBUILD?h=packages/spring&id=e7e0605c222c100dc4f7279baebf51746733822d
+0 / -0

11 years ago
TheSponge I had done that already beforehand. N2maniac and burp, the change is simple but I'm not quite sure how I could use it. Can I just change the source url in TheSponge's script so that it gets the version with the changed .cpp file?

Otherwise, to run it again I have to delete the SourceFiles folder and thus I can't really keep the sound file modification in a way that would let the script finish.

Also, should I try reinstalling boost?
+0 / -0
11 years ago
Hmmm. Maybe it wants boost 1.50; "sudo apt-get install libboost1.50-all-dev". What distribution are you on? Also there is a new version of the script, when I tried recompiling with the new version I got a similar output to you though so I think it has the same problem. It is strange though that 1.49 does not work.
+0 / -0
@lauri0: Looks like it's missing development stuff for python (headers etc.). The error in the log you posted is:

CMake Error: The following variables are used in this project, but they are set
to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
PYTHON_INCLUDE_DIR (ADVANCED)

This is no boost problem. Boost is found on your setup. Assuming you are on a debian-like system you probably need to install python-dev or python-all-dev.
+0 / -0
Ah yes indeed that was the case. Now I get to 22% with the script, it stops at:

[ 22%] Building CXX object AI/Skirmish/E323AI/CMakeFiles/E323AI.dir/CTaskHandler.cpp.o
In file included from /home/kristjan/SourceFiles/spring_91.0/AI/Skirmish/E323AI/CTaskHandler.cpp:16:0:
/home/kristjan/SourceFiles/spring_91.0/AI/Skirmish/E323AI/CScopedTimer.h: In static member function ‘static unsigned int CScopedTimer::GetEngineRuntimeMSec()’:
/home/kristjan/SourceFiles/spring_91.0/AI/Skirmish/E323AI/CScopedTimer.h:39:31: error: expected unqualified-id before numeric constant
make[2]: * [AI/Skirmish/E323AI/CMakeFiles/E323AI.dir/CTaskHandler.cpp.o] Error 1
make[1]: * [AI/Skirmish/E323AI/CMakeFiles/E323AI.dir/all] Error 2
make: * [all] Error 2

Edit: and turns out the OP had and fixed the same exact problem. Should I just manually compile then and make the same change that N2maniac did?
+0 / -0
11 years ago
Was it python-dev or python-all-dev? Just so I know what needs adding to the script.
+0 / -0

11 years ago
python-all-dev
+0 / -0
11 years ago
@lauri0: "make the same change that N2maniac did?" Yes, it's necessary.

You need to do two changes to make it compile. First:

sed "s/TIME_UTC/TIME_UTC_/g" -i AI/Skirmish/E323AI/CScopedTimer.h

And you need to fix the sound: http://springrts.com/mantis/view.php?id=3789

Then it will compile without any problems with the most recent software.
+0 / -0

11 years ago
Now it gets stuck here:
[ 23%] Building CXX object rts/lib/headlessStubs/CMakeFiles/headlessStubs.dir/sdlstub_cppbit.cpp.o
/home/kristjan/.spring/engine/spring_91.0/rts/lib/headlessStubs/sdlstub_cppbit.cpp: In function ‘int stub_sdl_getSystemMilliSeconds()’:
/home/kristjan/.spring/engine/spring_91.0/rts/lib/headlessStubs/sdlstub_cppbit.cpp:21:30: error: expected unqualified-id before numeric constant
/home/kristjan/.spring/engine/spring_91.0/rts/lib/headlessStubs/sdlstub_cppbit.cpp: In function ‘void stub_sdl_sleepMilliSeconds(int)’:
/home/kristjan/.spring/engine/spring_91.0/rts/lib/headlessStubs/sdlstub_cppbit.cpp:33:30: error: expected unqualified-id before numeric constant
make[2]: * [rts/lib/headlessStubs/CMakeFiles/headlessStubs.dir/sdlstub_cppbit.cpp.o] Error 1
make[1]: * [rts/lib/headlessStubs/CMakeFiles/headlessStubs.dir/all] Error 2
make: * [all] Error 2

I'm on 64-bit debian sid.
+0 / -0
Hmm, update on my end: I am getting desynced in games. If I dig up any information as to why or what is causing it I will let you know.

I am suspicious that the following is related:
[f=0010455] Error: LuaRules::RunCallIn: error = 2, RecvFromSynced, [string "LuaRules/Gadgets/lups_nano_spray.lua"]:300: attempt to call field 'GetUnitCurrentBuildPower' (a nil value)

Similarly, if anyone is seeing this please point it out.

Edit: I am a dumb. I somehow got it to compile with a blank version number. This seems to have been the culprit, as certain internals use this to figure out what code/workarounds to execute.
+0 / -0

11 years ago
lauri0: see my first post regarding the arch pkgbuild patch for spring:
https://projects.archlinux.org/svntogit/community.git/plain/trunk/boost-1.50.patch?h=packages/spring
That should apply to your situation as well.
+0 / -0