Compiling spring 0.82 rc
Moderator: Moderators
Compiling spring 0.82 rc
So i m trying to compile it on ubuntu 10.04 32bit
Got a problem :
[ 58%] Building C object rts/lib/headlessStubs/CMakeFiles/headlessStubs.dir/sdlstub.c.o
/home/wolas/Desktop/DEVELOPMENT/spring_0.82.0/rts/lib/headlessStubs/sdlstub.c:8:17: error: SDL.h: No such file or directory
/home/wolas/Desktop/DEVELOPMENT/spring_0.82.0/rts/lib/headlessStubs/sdlstub.c:23: error: expected ÔÇÿ=ÔÇÖ, ÔÇÿ,ÔÇÖ, ÔÇÿ;ÔÇÖ, ÔÇÿasmÔÇÖ or ÔÇÿ__attribute__ÔÇÖ before ÔÇÿstubKeyStateÔÇÖ
/home/wolas/Desktop/DEVELOPMENT/spring_0.82.0/rts/lib/headlessStubs/sdlstub.c:24: error: expected ÔÇÿ=ÔÇÖ, ÔÇÿ,ÔÇÖ, ÔÇÿ;ÔÇÖ, ÔÇÿasmÔÇÖ or ÔÇÿ__attribute__ÔÇÖ before ÔÇÿstubVersionÔÇÖ...
... (many of those lines)
well SDL.h is on my system in /usr/include/SDL/SDL.h
so what can be wrong?
Got a problem :
[ 58%] Building C object rts/lib/headlessStubs/CMakeFiles/headlessStubs.dir/sdlstub.c.o
/home/wolas/Desktop/DEVELOPMENT/spring_0.82.0/rts/lib/headlessStubs/sdlstub.c:8:17: error: SDL.h: No such file or directory
/home/wolas/Desktop/DEVELOPMENT/spring_0.82.0/rts/lib/headlessStubs/sdlstub.c:23: error: expected ÔÇÿ=ÔÇÖ, ÔÇÿ,ÔÇÖ, ÔÇÿ;ÔÇÖ, ÔÇÿasmÔÇÖ or ÔÇÿ__attribute__ÔÇÖ before ÔÇÿstubKeyStateÔÇÖ
/home/wolas/Desktop/DEVELOPMENT/spring_0.82.0/rts/lib/headlessStubs/sdlstub.c:24: error: expected ÔÇÿ=ÔÇÖ, ÔÇÿ,ÔÇÖ, ÔÇÿ;ÔÇÖ, ÔÇÿasmÔÇÖ or ÔÇÿ__attribute__ÔÇÖ before ÔÇÿstubVersionÔÇÖ...
... (many of those lines)
well SDL.h is on my system in /usr/include/SDL/SDL.h
so what can be wrong?
Re: Compiling spring 0.82 rc
I have the same problem on my Gentoo install (this is manual compile as there's no ebuild in the overlay yet).
There is also a warning about the 'tools' directory from cmake, but I forget the details and don't have them to hand at the moment.
There is also a warning about the 'tools' directory from cmake, but I forget the details and don't have them to hand at the moment.
Re: Compiling spring 0.82 rc
the problem is, that the tarbal of the current RC is incompleete.
it has been fixed already. sorry for this.
the compleete source can be downloaded here:
http://github.com/spring/spring/archives/0.82.0
it has been fixed already. sorry for this.
the compleete source can be downloaded here:
http://github.com/spring/spring/archives/0.82.0
Re: Compiling spring 0.82 rc
Thanks Hoijui that works much better. I found 'make spring' and 'make install-spring' to make the build time quicker. I'll have to try out the MT version at some point.
One other point to note for anyone following this thread is that two of the Skirmish AIs (Hugh and E323) are not included in that git generated archive. If you just download their own archive and stick them in the correct directory and reconfigure it worked fine for me.
One other point to note for anyone following this thread is that two of the Skirmish AIs (Hugh and E323) are not included in that git generated archive. If you just download their own archive and stick them in the correct directory and reconfigure it worked fine for me.
Re: Compiling spring 0.82 rc
compiled sucessfully but how to have two springs? since i playing 0.81 i dont want to "make install" is it possible to make it "portable"?
-
- Posts: 834
- Joined: 19 May 2009, 21:10
Re: Compiling spring 0.82 rc
cmake -DCMAKE_INSTALL_PREFIX=/where/ever
You might also want to use a different user account, or at least a different .springrc config file that indicates a different SpringData directory. Otherwise everytime you switch between 0.81 and 0.82 spring rescans your maps and mods (because base file changed -> different hash).
You might also want to use a different user account, or at least a different .springrc config file that indicates a different SpringData directory. Otherwise everytime you switch between 0.81 and 0.82 spring rescans your maps and mods (because base file changed -> different hash).
Re: Compiling spring 0.82 rc
for the AIs:
i would say, if you want them, it is easier/better to get the sources through git. these AIs are referenced as git submodules, so you do:
make spring and make install-spring should be mentioned on the wiki already.
what SirMaverick said, plus -DSPRING_DATADIR=/where/ever.
which is, in my eyes, the best solution to solve the mentioned cache issue.
i would say, if you want them, it is easier/better to get the sources through git. these AIs are referenced as git submodules, so you do:
Code: Select all
git clone http://github.com/spring/spring.git
git submodule update --init
what SirMaverick said, plus -DSPRING_DATADIR=/where/ever.
which is, in my eyes, the best solution to solve the mentioned cache issue.
Re: Compiling spring 0.82 rc
Some notes about compiling 0.82.3 which may be related to this thread (installation logs attached):
Running ÔÇ£make install-springÔÇØ makes files in rts/lib/headlessStubs/ and tools/unitsync/ to be compiled. This should obviously happens while running ÔÇ£make springÔÇØ, not at installation time.
Sources in the AI directory are not compiled, making ÔÇ£make install-springÔÇØ ends with errors. Running ÔÇ£makeÔÇØ in this directory and then ÔÇ£make install-springÔÇØ in the top-level directory fix the problem.
Running ÔÇ£make install-springÔÇØ makes files in rts/lib/headlessStubs/ and tools/unitsync/ to be compiled. This should obviously happens while running ÔÇ£make springÔÇØ, not at installation time.
Sources in the AI directory are not compiled, making ÔÇ£make install-springÔÇØ ends with errors. Running ÔÇ£makeÔÇØ in this directory and then ÔÇ£make install-springÔÇØ in the top-level directory fix the problem.
- Attachments
-
- spring_0.82.3-install_logs.txt
- (16.61 KiB) Downloaded 18 times
Re: Compiling spring 0.82 rc
this new stuff is not working well, because of cmake not working as it should. for some people it works as expected, for others not, and it seems to not to be pin-pointable to a certain cmake version...
anyway, if you configure multiple times (as in, reconfigure) it might work as expected.
i will try some rearrangement to limit this, but can not promise anything.
basically, we are using a sort of hack, as cmake does not allow natively to install only a subset of an application. the build part is less hacky, but still plagued by the order in which the individual targets are defined/in what subdirs they are.
anyway, if you configure multiple times (as in, reconfigure) it might work as expected.
i will try some rearrangement to limit this, but can not promise anything.
basically, we are using a sort of hack, as cmake does not allow natively to install only a subset of an application. the build part is less hacky, but still plagued by the order in which the individual targets are defined/in what subdirs they are.
Re: Compiling spring 0.82 rc
OK, I see. I tried ÔÇ£cmake CMAKE_BACKWARDS_COMPATIBILITY="2.8" .ÔÇØ (default is 2.4) since I use cmake 2.8.1. Now the AI directory is compiled at install time, but at least the installation is completed without errors.
Re: Compiling spring 0.82 rc
or not. CMAKE_BACKWARDS_COMPATIBILITY actually doesnt change anything, my bad, I guess I used make instead of make spring.
Re: Compiling spring 0.82 rc
i did the rearrangement in spring master. it works for me.
Re: Compiling spring 0.82 rc
Now is the right time to write it:
Thanks for this. However I urge you to consider that compiling code at install time means doing it as root, which may lead to serious troubles for the user in case of nasty bugs.weepee wrote:Now the AI directory is compiled at install time, but at least the installation is completed without errors.
Re: Compiling spring 0.82 rc
is that with spring master or 0.82.3?
Re: Compiling spring 0.82 rc
With the current version in the git repository (I supposed this is the Spring master).
Re: Compiling spring 0.82 rc
the thing is, that we need to do cmake hackery to be bale to combine a subset of targets in a single target name. this hackery seemingly randomly works or not. one thing that should always work, is using bare make and make install, instead of make spring and make install-spring. this means you have to compile everything though. you can also do make and make install-spring, to build everything and install only spring(default stuff).
then again, the best solution for you is probably to not install under /usr, but under ~/ somewhere (thats what i do when compiling spring myself, while only having packages under /usr. then you do not need root access for install.
then again, the best solution for you is probably to not install under /usr, but under ~/ somewhere (thats what i do when compiling spring myself, while only having packages under /usr. then you do not need root access for install.
Re: Compiling spring 0.82 rc
Actually I fully agree with what you wrote. My point was not to solve a problem of mine but rather to point out potential problems. So, if the cmake issue canÔÇÖt be solve for all configurations, I think it is very important to clearly document it in the installation instructions. Anyway, thank for your help.
Re: Compiling spring 0.82 rc
thanks 
sadly, there is no way to get people to read a document that contains such hints.
"install.. where.. where is the commands i have to c&p? ... there!! c&p, c&P!!! ... why no work?!? i post forum!"
not that this is bad, i guess i am not different. it is human.

sadly, there is no way to get people to read a document that contains such hints.

"install.. where.. where is the commands i have to c&p? ... there!! c&p, c&P!!! ... why no work?!? i post forum!"
not that this is bad, i guess i am not different. it is human.