Compile from source error on Debian testing (wheezy)

Compile from source error on Debian testing (wheezy)

Discuss everything related to running Spring on your chosen distribution of Linux.

Moderator: Moderators

Post Reply
yanom
Posts: 323
Joined: 10 Jul 2009, 23:34

Compile from source error on Debian testing (wheezy)

Post by yanom »

So I got the latest Spring source tarball, ran

Code: Select all

cmake . 
and it came out with no errors. But then I ran make, and it produced this error:

Code: Select all


[  8%] Building CXX object AI/Skirmish/E323AI/CMakeFiles/E323AI.dir/AAStar.cpp.o
In file included from /home/yanom/spring_0.82.7.1/AI/Skirmish/E323AI/AAStar.cpp:1:0:
/home/yanom/spring_0.82.7.1/AI/Skirmish/E323AI/AAStar.h:70:43: error: ÔÇÿNULLÔÇÖ was not declared in this scope
/home/yanom/spring_0.82.7.1/AI/Skirmish/E323AI/AAStar.h: In constructor ÔÇÿAAStar::ANode::ANode()ÔÇÖ:
/home/yanom/spring_0.82.7.1/AI/Skirmish/E323AI/AAStar.h:19:15: error: ÔÇÿNULLÔÇÖ was not declared in this scope
/home/yanom/spring_0.82.7.1/AI/Skirmish/E323AI/AAStar.h: In constructor ÔÇÿAAStar::ANode::ANode(unsigned int, float)ÔÇÖ:
/home/yanom/spring_0.82.7.1/AI/Skirmish/E323AI/AAStar.h:29:15: error: ÔÇÿNULLÔÇÖ was not declared in this scope
make[2]: *** [AI/Skirmish/E323AI/CMakeFiles/E323AI.dir/AAStar.cpp.o] Error 1
make[1]: *** [AI/Skirmish/E323AI/CMakeFiles/E323AI.dir/all] Error 2
make: *** [all] Error 2
Does anyone know how to fix this? Also, Debian uses GCC version 4.6.1
I'd heard that GCC4.6 can cause problems, is GCC4.6 to blame here?
User avatar
hoijui
Former Engine Dev
Posts: 4344
Joined: 22 Sep 2007, 09:51

Re: Compile from source error on Debian testing (wheezy)

Post by hoijui »

we told you, that you desync cause debian testing compiles their spring with GCC 4.6, and that you should either get a package from debian stable or ubuntu (which seems not to work for you), or compile spring with GCC 4.5-.
GCC 4.6 does not match GCC 4.5-
you have to use GCC 4.5-
User avatar
jandd
Posts: 17
Joined: 05 Jan 2010, 13:30

Re: Compile from source error on Debian testing (wheezy)

Post by jandd »

yanom wrote:So I got the latest Spring source tarball, ran

Code: Select all

cmake . 
and it came out with no errors. But then I ran make, and it produced this error:

Code: Select all


[  8%] Building CXX object AI/Skirmish/E323AI/CMakeFiles/E323AI.dir/AAStar.cpp.o
In file included from /home/yanom/spring_0.82.7.1/AI/Skirmish/E323AI/AAStar.cpp:1:0:
/home/yanom/spring_0.82.7.1/AI/Skirmish/E323AI/AAStar.h:70:43: error: ÔÇÿNULLÔÇÖ was not declared in this scope
/home/yanom/spring_0.82.7.1/AI/Skirmish/E323AI/AAStar.h: In constructor ÔÇÿAAStar::ANode::ANode()ÔÇÖ:
/home/yanom/spring_0.82.7.1/AI/Skirmish/E323AI/AAStar.h:19:15: error: ÔÇÿNULLÔÇÖ was not declared in this scope
/home/yanom/spring_0.82.7.1/AI/Skirmish/E323AI/AAStar.h: In constructor ÔÇÿAAStar::ANode::ANode(unsigned int, float)ÔÇÖ:
/home/yanom/spring_0.82.7.1/AI/Skirmish/E323AI/AAStar.h:29:15: error: ÔÇÿNULLÔÇÖ was not declared in this scope
make[2]: *** [AI/Skirmish/E323AI/CMakeFiles/E323AI.dir/AAStar.cpp.o] Error 1
make[1]: *** [AI/Skirmish/E323AI/CMakeFiles/E323AI.dir/all] Error 2
make: *** [all] Error 2
Does anyone know how to fix this? Also, Debian uses GCC version 4.6.1
I'd heard that GCC4.6 can cause problems, is GCC4.6 to blame here?
My official Debian package contains a patch for gcc-4.6 compatibility, see http://anonscm.debian.org/gitweb/?p=pkg ... 5097.patch

Unfortunately g++ 4.6 builds of spring 0.82.7.1 have sync problems.
yanom
Posts: 323
Joined: 10 Jul 2009, 23:34

Re: Compile from source error on Debian testing (wheezy)

Post by yanom »

jandd wrote: Unfortunately g++ 4.6 builds of spring 0.82.7.1 have sync problems.
Exactly! Is there a way to build with g++ 4.5?
User avatar
jandd
Posts: 17
Joined: 05 Jan 2010, 13:30

Re: Compile from source error on Debian testing (wheezy)

Post by jandd »

yanom wrote:
jandd wrote: Unfortunately g++ 4.6 builds of spring 0.82.7.1 have sync problems.
Exactly! Is there a way to build with g++ 4.5?
CMake uses variables for this, have a look at http://cmake.org/Wiki/CMake_Useful_Vari ... _and_Tools
yanom
Posts: 323
Joined: 10 Jul 2009, 23:34

Re: Compile from source error on Debian testing (wheezy)

Post by yanom »

ok, how do I set CMAKE_C_COMPILER and CMAKE_CXX_COMPILER variables?

And, will this change fix my problem?
abma
Spring Developer
Posts: 3798
Joined: 01 Jun 2009, 00:08

Re: Compile from source error on Debian testing (wheezy)

Post by abma »

cmake . -DCMAKE_C_COMPILER=/usr/bin/gcc-4.6 -DCMAKE_CXX_COMPILER=/usr/bin/g++-4.6


but better use the ubuntu-ppa:
deb http://ppa.launchpad.net/spring/ppa/ubuntu natty main
deb-src http://ppa.launchpad.net/spring/ppa/ubuntu natty main

they will sync!
i don't know which version works, but one of the ubuntu-packages should work, look here which versions are avaiable: https://launchpad.net/~spring/+archive/ppa/+packages or
http://ppa.launchpad.net/spring/ppa/ubu ... /s/spring/

the sync-errors doesn't come from the compiler only... or... we don't really know. i guess they are from the boost-libs but... just a guess.
yanom
Posts: 323
Joined: 10 Jul 2009, 23:34

Re: Compile from source error on Debian testing (wheezy)

Post by yanom »

ok, I'm trying to get the PPA's to work.

These errors go away in next spring release right?
yanom
Posts: 323
Joined: 10 Jul 2009, 23:34

Re: Compile from source error on Debian testing (wheezy)

Post by yanom »

ok, the PPA's won't work because debian repos already have the latest spring version (but it's the broken one with the sync errors) and when I try to "force version" to the ubuntu PPA version in synaptic it just stays on the debian version.
abma
Spring Developer
Posts: 3798
Joined: 01 Jun 2009, 00:08

Re: Compile from source error on Debian testing (wheezy)

Post by abma »

deinstall (afaik "apt-get remove spring") the debian spring package + install then the packages from the ppa.
Post Reply

Return to “Linux”