View topic - Compiling spring 0.82 rc



All times are UTC + 1 hour


Post new topic Reply to topic  [ 19 posts ] 
Author Message
 Post subject: Compiling spring 0.82 rc
PostPosted: 30 Jul 2010, 19:47 

Joined: 30 Jul 2010, 19:40
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?


Top
 Offline Profile  
 
PostPosted: 30 Jul 2010, 20:42 

Joined: 15 Nov 2008, 17:24
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.


Top
 Offline Profile  
 
PostPosted: 31 Jul 2010, 10:44 
Spring Developer
User avatar

Joined: 22 Sep 2007, 08:51
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


Top
 Offline Profile  
 
PostPosted: 31 Jul 2010, 12:17 

Joined: 15 Nov 2008, 17:24
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.


Top
 Offline Profile  
 
PostPosted: 31 Jul 2010, 20:26 

Joined: 30 Jul 2010, 19:40
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"?


Top
 Offline Profile  
 
PostPosted: 31 Jul 2010, 23:38 
Moderator

Joined: 19 May 2009, 20:10
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).


Top
 Offline Profile  
 
PostPosted: 01 Aug 2010, 07:23 
Spring Developer
User avatar

Joined: 22 Sep 2007, 08:51
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:
Code:
git clone http://github.com/spring/spring.git
git submodule update --init

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.


Top
 Offline Profile  
 
PostPosted: 01 Aug 2010, 11:31 

Joined: 30 Jul 2010, 19:40
thanks for replies :)


Top
 Offline Profile  
 
PostPosted: 15 Aug 2010, 17:58 

Joined: 15 Aug 2010, 12:50
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.


Attachments:
spring_0.82.3-install_logs.txt [16.61 KiB]
Downloaded 12 times
Top
 Offline Profile  
 
PostPosted: 15 Aug 2010, 22:17 
Spring Developer
User avatar

Joined: 22 Sep 2007, 08:51
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.


Top
 Offline Profile  
 
PostPosted: 17 Aug 2010, 18:00 

Joined: 15 Aug 2010, 12:50
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.


Top
 Offline Profile  
 
PostPosted: 17 Aug 2010, 19:56 

Joined: 15 Aug 2010, 12:50
or not. CMAKE_BACKWARDS_COMPATIBILITY actually doesnt change anything, my bad, I guess I used make instead of make spring.


Top
 Offline Profile  
 
PostPosted: 17 Aug 2010, 21:09 
Spring Developer
User avatar

Joined: 22 Sep 2007, 08:51
i did the rearrangement in spring master. it works for me.


Top
 Offline Profile  
 
PostPosted: 18 Aug 2010, 16:20 

Joined: 15 Aug 2010, 12:50
Now is the right time to write it:
weepee wrote:
Now the AI directory is compiled at install time, but at least the installation is completed without errors.

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.


Top
 Offline Profile  
 
PostPosted: 18 Aug 2010, 16:55 
Spring Developer
User avatar

Joined: 22 Sep 2007, 08:51
is that with spring master or 0.82.3?


Top
 Offline Profile  
 
PostPosted: 18 Aug 2010, 18:31 

Joined: 15 Aug 2010, 12:50
With the current version in the git repository (I supposed this is the Spring master).


Top
 Offline Profile  
 
PostPosted: 19 Aug 2010, 20:02 
Spring Developer
User avatar

Joined: 22 Sep 2007, 08:51
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.


Top
 Offline Profile  
 
PostPosted: 20 Aug 2010, 01:15 

Joined: 15 Aug 2010, 12:50
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.


Top
 Offline Profile  
 
PostPosted: 20 Aug 2010, 08:22 
Spring Developer
User avatar

Joined: 22 Sep 2007, 08:51
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.


Top
 Offline Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 19 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group

Site layout created by Roflcopter et al.