[SOLVED]gcc 4.6 build problem
Posted: 22 Apr 2011, 21:41
Hi,
at this morning I got the new source from the git(master last commit a4858bdaea472e2abb24b1372656f4b865f7c70a) and compiled successfully with cmake,make (gcc 4.5). But after upgrading to gcc 4.6 via pacman (archlinux) I got several build failures:
FIRST but easy to fix:
but now I am getting:
any solutions yet? (besides downgrading)
I'm using gcc4.6, glibc 2.13,cmake 2.4.8 under archlinux, kernel 2.6.38.4
EDIT:
ok, adding an #include <cstdio> fixed this. there is nothing wrong with gcc4.6. something with the includes in my system is messed up.
at this morning I got the new source from the git(master last commit a4858bdaea472e2abb24b1372656f4b865f7c70a) and compiled successfully with cmake,make (gcc 4.5). But after upgrading to gcc 4.6 via pacman (archlinux) I got several build failures:
FIRST but easy to fix:
Code: Select all
/spring/spring/rts/Rendering/GLContext.cpp: In constructor 'HookSet::HookSet()':
/spring/spring/rts/Rendering/GLContext.cpp:18:9: error: 'NULL' was not declared in this scope
/spring/spring/rts/Rendering/GLContext.cpp: In function 'void GLContext::InsertHookSet(GLContext::Func, GLContext::Func, void*)':
/spring/spring/rts/Rendering/GLContext.cpp:61:15: error: 'NULL' was not declared in this scope
make[2]: *** [rts/builds/default/CMakeFiles/engine-default.dir/__/__/Rendering/GLContext.cpp.o] Error 1
make[1]: *** [rts/builds/default/CMakeFiles/engine-default.dir/all] Error 2
make: *** [all] Error 2
Code: Select all
In file included from /spring/spring/rts/Sim/Projectiles/Unsynced/FlyingPiece.hpp:8:0,
from /spring/spring/rts/Sim/Projectiles/Unsynced/FlyingPiece.cpp:3:
/spring/spring/rts/System/MemPool.h:8:7: error: 'size_t' does not name a type
/spring/spring/rts/System/MemPool.h:14:8: error: expected ';' at end of member declaration
/spring/spring/rts/System/MemPool.h:14:21: error: expected ')' before 'n'
/spring/spring/rts/System/MemPool.h:15:20: error: 'size_t' has not been declared
/spring/spring/rts/System/MemPool.h:19:17: error: 'MAX_MEM_SIZE' was not declared in this scope
/spring/spring/rts/System/MemPool.h:20:15: error: 'MAX_MEM_SIZE' was not declared in this scope
In file included from /spring/spring/rts/Sim/Projectiles/Unsynced/FlyingPiece.cpp:3:0:
/spring/spring/rts/Sim/Projectiles/Unsynced/FlyingPiece.hpp: In static member function 'static void* FlyingPiece::operator new(size_t)':
/spring/spring/rts/Sim/Projectiles/Unsynced/FlyingPiece.hpp:21:68: error: 'mempool.CMemPool::Alloc' cannot be used as a function
make[2]: *** [rts/builds/default/CMakeFiles/engine-default.dir/__/__/Sim/Projectiles/Unsynced/FlyingPiece.cpp.o] Error 1
make[1]: *** [rts/builds/default/CMakeFiles/engine-default.dir/all] Error 2
make: *** [all] Error 2
any solutions yet? (besides downgrading)
I'm using gcc4.6, glibc 2.13,cmake 2.4.8 under archlinux, kernel 2.6.38.4
EDIT:
ok, adding an #include <cstdio> fixed this. there is nothing wrong with gcc4.6. something with the includes in my system is messed up.