cmake... Again!

cmake... Again!

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

Moderator: Moderators

Post Reply
User avatar
sombriks
Posts: 50
Joined: 03 Jan 2008, 15:40

cmake... Again!

Post by sombriks »

hi, all,

i've tried to compile a stable version (http://spring.clan-sy.com/dl/spring_0.76b1_src.tar.bz2) and got two errors:

Code: Select all

usuario@leo2:~/taspring/spring/trunk/rts$ make
-- Found GLEW: /usr/lib/libGLEW.so
-- Found OggVorbis: /usr/lib/libogg.so;/usr/lib/libvorbis.so;/usr/lib/libvorbisfile.so;/usr/lib/libvorbisenc.so
-- Found Freetype: -lfreetype -lz
-- Configuring done
-- Generating done
-- Build files have been written to: /home/usuario/taspring/spring/trunk/rts
[ 14%] Built target streflop
[ 20%] Built target lua
[ 24%] Built target luabind
[ 26%] Built target 7zip
[ 27%] Built target hpiutil2
[ 27%] Built target minizip
Scanning dependencies of target spring
Linking CXX executable spring
lib/liblua.a(loslib.cpp.o): In function `os_tmpname(lua_State*)':
loslib.cpp:(.text+0x34): warning: the use of `tmpnam' is dangerous, better use `mkstemp'
CMakeFiles/spring.dir/ExternalAI/GlobalAI.cpp.o: In function `CGlobalAI::PostLoad()':
GlobalAI.cpp:(.text+0x419): undefined reference to `AbicProxy::AbicProxy()'
GlobalAI.cpp:(.text+0x4dd): undefined reference to `AbicProxy::InitAI(char const*, IGlobalAICallback*, int)'
CMakeFiles/spring.dir/ExternalAI/GlobalAI.cpp.o: In function `CGlobalAI::CGlobalAI(int, char const*)':
GlobalAI.cpp:(.text+0x1a18): undefined reference to `AbicProxy::AbicProxy()'
GlobalAI.cpp:(.text+0x1aab): undefined reference to `AbicProxy::InitAI(char const*, IGlobalAICallback*, int)'
CMakeFiles/spring.dir/ExternalAI/GlobalAI.cpp.o: In function `CGlobalAI::CGlobalAI(int, char const*)':
GlobalAI.cpp:(.text+0x229a): undefined reference to `AbicProxy::AbicProxy()'
GlobalAI.cpp:(.text+0x232d): undefined reference to `AbicProxy::InitAI(char const*, IGlobalAICallback*, int)'
collect2: ld returned 1 exit status
make[2]: ** [spring] Erro 1
make[1]: ** [CMakeFiles/spring.dir/all] Erro 2
make: ** [all] Erro 2
and that one i've corrected adding this line on CMakeLists.txt: (/trunk/rts/)

Code: Select all

AUX_SOURCE_DIRECTORY(ExternalAI/GlobalAICInterface aifiles)
iv'e put it in the proper location, and then the compilation process finished nicely.

but when i tried to open the game, i got that error:

Code: Select all

Luxi.ttf: FT_New_Face failed: cannot open resource
and pasted that Luxi.ttf inside the fonts folder of my ~/.spring

when i imagined that the game was ready to start, that error poped me:

Code: Select all

could not open file: gamedata/defs.lua
i'm out of imagination. anyone can say me what is missing? and what do i need to do in order to make the game look for resources inside /usr/share/games/spring???
User avatar
hoijui
Former Engine Dev
Posts: 4344
Joined: 22 Sep 2007, 09:51

Re: cmake... Again!

Post by hoijui »

i think it has to do with outdated stuff in spring/base.
for SVN builds you can find it here http://spring.clan-sy.com/dl/buildbot/
for the current stable build, it should be in the installer (i dont know where else)
User avatar
sombriks
Posts: 50
Joined: 03 Jan 2008, 15:40

Re: cmake... Again!

Post by sombriks »

hello hoijui!

i've figured that buildbot folder only have .exe files, u.u

they aren't useful to me sadly...

what i really want to do is to compile spring from svn using cmake if possible; i'm trying to make it work, but right now i just started to understand how cmake works (i'm doing minor example projects) in order to put the actual cmake system added in the spring source tree to work.

so, actually if there are a diff between boost 1.34 and 1.35 i am inclined do discover what is and then try to fix/broke/whatever to get my own spring binary working and running.

also i believe that cmake build will allow spring to compile even i older linux distros (when X11R6 folder hides all libs and headers of X), and do it just faster than scons.
Auswaschbar
Spring Developer
Posts: 1254
Joined: 24 Jun 2007, 08:34

Re: cmake... Again!

Post by Auswaschbar »

sombriks wrote:what i really want to do is to compile spring from svn using cmake if possible; i'm trying to make it work, but right now i just started to understand how cmake works (i'm doing minor example projects) in order to put the actual cmake system added in the spring source tree to work.
sombriks wrote:i've tried to compile a stable version (http://spring.clan-sy.com/dl/spring_0.76b1_src.tar.bz2) and got two errors:
Why did you download the stable tarball when trying to compile svn?
Btw there never had been cmake files for 0.76b1, and the svn ones don't work there because some directories have changed (but they work fine in svn).
User avatar
LordMatt
Posts: 3393
Joined: 15 May 2005, 04:26

Re: cmake... Again!

Post by LordMatt »

hoijui wrote:i think it has to do with outdated stuff in spring/base.
for SVN builds you can find it here http://spring.clan-sy.com/dl/buildbot/
for the current stable build, it should be in the installer (i dont know where else)
That folder is not yet ready for public use, as Fnordia needs to install a bigger harddrive so we can put the newest SVN versions on it.
User avatar
hoijui
Former Engine Dev
Posts: 4344
Joined: 22 Sep 2007, 09:51

Re: cmake... Again!

Post by hoijui »

aehm.. ok
i think i posted the wrong link, sorry :/
you mean the folder i intended to link is not ready yet?
it was a folder with the base stuff needed for spring (everything that belongs into spring/base. i lost the link :/
User avatar
LordMatt
Posts: 3393
Joined: 15 May 2005, 04:26

Re: cmake... Again!

Post by LordMatt »

No the folder you did link is not ready. What you were trying to link was http://installer.clan-sy.com/base/
User avatar
hoijui
Former Engine Dev
Posts: 4344
Joined: 22 Sep 2007, 09:51

Re: cmake... Again!

Post by hoijui »

thanks :D yeah that looks better
though last time it had all this zipped, and different versions of it (for SVNXXXX)
but maybe this helps is the one he needs (if it was this)
thanks LordMatt!
User avatar
sombriks
Posts: 50
Joined: 03 Jan 2008, 15:40

Re: cmake... Again!

Post by sombriks »

Auswaschbar wrote:
sombriks wrote:what i really want to do is to compile spring from svn using cmake if possible; i'm trying to make it work, but right now i just started to understand how cmake works (i'm doing minor example projects) in order to put the actual cmake system added in the spring source tree to work.
sombriks wrote:i've tried to compile a stable version (http://spring.clan-sy.com/dl/spring_0.76b1_src.tar.bz2) and got two errors:
Why did you download the stable tarball when trying to compile svn?
Btw there never had been cmake files for 0.76b1, and the svn ones don't work there because some directories have changed (but they work fine in svn).

let me try to explain:

first i've tried to compile latest svn version using cmake; it failed against boost 1.33 (a bit buggy, the boost package from GSlacky seems strange, wrong places for the headers) and the same against boost 1.35; later i've tried svn version against 1.34 version and it compiled, but didin't linked in the very end of the process.

so i reverted everything (svn revert *) and tried svn version using scons and failed again.

then i picked up a stable version and tried to comile using CMakeLists.txt from svn, that's why i had to add ExternalAI/GlobalAICInterface as AUX_SOURCE_DIRECTORY; it don't exists in svn anymore, but i had to add it in order to compile 0.76b1;

what happens now? the font error and gamedata/defs.lua;

if someone could tell me what exactly is gamedata i could hack a bit more CMakeLists.txt and then bring a working way to compile and run spring.

seems to me a nice way to learn cmake and also do some stuff with spring, while i start to learn that code.
Auswaschbar
Spring Developer
Posts: 1254
Joined: 24 Jun 2007, 08:34

Re: cmake... Again!

Post by Auswaschbar »

It seems that this is because spring is not able to find springcontent.sdz, check if your datadirs are set right.
Post Reply

Return to “Engine”