Compilation failed 97.0.1-xxx, archlinux

Compilation failed 97.0.1-xxx, archlinux

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

Moderators: Moderators, Moderators

Post Reply
lamer
Posts: 146
Joined: 08 Mar 2014, 23:13

Compilation failed 97.0.1-xxx, archlinux

Post by lamer »

I have following compilation error.

Code: Select all

[ 28%] Building CXX object rts/builds/legacy/CMakeFiles/engine-legacy.dir/__/__/Rendering/GlobalRendering.cpp.o
/home/evgenij/games/spring/spring/rts/Rendering/GlobalRendering.cpp: In member function ‘void CGlobalRendering::PostInit()’:
/home/evgenij/games/spring/spring/rts/Rendering/GlobalRendering.cpp:241:17: error: ‘GL_MAX_UNIFORM_BUFFER_BINDINGS’ was not declared in this scope
   glGetIntegerv(GL_MAX_UNIFORM_BUFFER_BINDINGS, &glslMaxUniformBufferBindings);
                 ^
/home/evgenij/games/spring/spring/rts/Rendering/GlobalRendering.cpp:242:17: error: ‘GL_MAX_UNIFORM_BLOCK_SIZE’ was not declared in this scope
   glGetIntegerv(GL_MAX_UNIFORM_BLOCK_SIZE,      &glslMaxUniformBufferSize);
                 ^
rts/builds/legacy/CMakeFiles/engine-legacy.dir/build.make:4079: recipe for target 'rts/builds/legacy/CMakeFiles/engine-legacy.dir/__/__/Rendering/GlobalRendering.cpp.o' failed
make[3]: *** [rts/builds/legacy/CMakeFiles/engine-legacy.dir/__/__/Rendering/GlobalRendering.cpp.o] Error 1
CMakeFiles/Makefile2:2796: recipe for target 'rts/builds/legacy/CMakeFiles/engine-legacy.dir/all' failed
make[2]: *** [rts/builds/legacy/CMakeFiles/engine-legacy.dir/all] Error 2
CMakeFiles/Makefile2:2743: recipe for target 'rts/builds/CMakeFiles/spring.dir/rule' failed
make[1]: *** [rts/builds/CMakeFiles/spring.dir/rule] Error 2
Makefile:824: recipe for target 'spring' failed
make: *** [spring] Error 2
Something related to glew under archlinux?
If i manually add only those 2 constants to file, then it will compile but stuck with another.
I did try to install glew from git master with same result.
Any ideas?
Last edited by lamer on 19 Aug 2014, 15:09, edited 1 time in total.
0 x

lamer
Posts: 146
Joined: 08 Mar 2014, 23:13

Re: Compilation failed 97.0.1-208, archlinux

Post by lamer »

Ok, now how do i delete own threads? :)
Compilation out of the git box didn't work because it had some stub of glew.h inside include/GL folder.
Replaced that one with system one and everything compiled.
0 x

cleanrock
Former Engine Dev
Posts: 115
Joined: 21 Feb 2009, 07:42

Re: Compilation failed 97.0.1-208, archlinux

Post by cleanrock »

You needed a complete rebuild including a fresh cmake run.
If you use out of source builds you can just scratch the build dir to easily do a complete rebuild.
0 x

lamer
Posts: 146
Joined: 08 Mar 2014, 23:13

Re: Compilation failed 97.0.1-208, archlinux

Post by lamer »

You needed a complete rebuild including a fresh cmake run.
If you use out of source builds you can just scratch the build dir to easily do a complete rebuild.
To build 683803892 commit (thats 97.0.1-208) i did something like this:
(http://springrts.com/wiki/Building_Spri ... %20Install)

$git checkout develop
$git pull origin
$make clean
$cmake .
$make spring -j<N>

And the issue with outdated glew.h (that's inside repo include/GL/ folder) appears. Its not copied from anywhere, its part of repo.

Therefore i don't understand your point.
0 x

cleanrock
Former Engine Dev
Posts: 115
Joined: 21 Feb 2009, 07:42

Re: Compilation failed 97.0.1-208, archlinux

Post by cleanrock »

Your "make clean" is not enough. You need to make sure cmake output files are generated from scratch.
Had you scratched your out of source build dir and then ran cmake again you would have had a successful build.
0 x

abma
Spring Developer
Posts: 3568
Joined: 01 Jun 2009, 00:08

Re: Compilation failed 97.0.1-208, archlinux

Post by abma »

this will delete ALL files not inside the repo:

Code: Select all

$ git clean -d -f -x
(so be careful when using this!)
0 x

lamer
Posts: 146
Joined: 08 Mar 2014, 23:13

Re: Compilation failed 97.0.1-208, archlinux

Post by lamer »

Got it. Thanks. Made test with clean git clone, everything works out of the box.
0 x

lamer
Posts: 146
Joined: 08 Mar 2014, 23:13

Re: Compilation failed 97.0.1-xxx, archlinux

Post by lamer »

Another issue again with glew. Mesa3d's glew.h defines last parameter of glDebugMessageCallbackARB's callback function (that is OpenGLDebugMessageCallback) as
const GLvoid* userParam
But in rts/Rendering/GL/myGL.cpp its defined without const
GLvoid* userParam

how can i add include directory to look for another glew.h (not system one)?
0 x

abma
Spring Developer
Posts: 3568
Joined: 01 Jun 2009, 00:08

Re: Compilation failed 97.0.1-xxx, archlinux

Post by abma »

just update your system installed glew and you should be fine. or/and compile latest development version of spring, as it contains some compile fixes.
0 x

lamer
Posts: 146
Joined: 08 Mar 2014, 23:13

Re: Compilation failed 97.0.1-xxx, archlinux

Post by lamer »

Strange, pacman says nothing to update.
Will wait for a while.
0 x

lamer
Posts: 146
Joined: 08 Mar 2014, 23:13

Re: Compilation failed 97.0.1-xxx, archlinux

Post by lamer »

abma wrote:just update your system installed glew and you should be fine. or/and compile latest development version of spring, as it contains some compile fixes.
So that really was a bug https://github.com/spring/spring/commit ... 646c8637f9
Good to know its been fixed.
0 x

Post Reply

Return to “Engine”

cron