I haven't touched the source code at all and I just wanted to compile it. It seems to complain about some opengl functions that are not declared properly. I'm using Xubuntu. Which has to have OpenGL since what other option is there, right? Some help would be greatly appreciated since I have no idea how to fix this./home/toby/Documents/TASpringSource/spring_103.0/rts/Rendering/GlobalRendering.cpp: In member function ‘void CGlobalRendering::PostInit()’:
/home/toby/Documents/TASpringSource/spring_103.0/rts/Rendering/GlobalRendering.cpp:240:17: error: ‘GL_MAX_UNIFORM_BUFFER_BINDINGS’ was not declared in this scope
glGetIntegerv(GL_MAX_UNIFORM_BUFFER_BINDINGS, &glslMaxUniformBufferBindings);
^
/home/toby/Documents/TASpringSource/spring_103.0/rts/Rendering/GlobalRendering.cpp:241: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:4958: 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:4101: 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:3922: recipe for target 'rts/builds/CMakeFiles/spring.dir/rule' failed
make[1]: *** [rts/builds/CMakeFiles/spring.dir/rule] Error 2
Makefile:1070: recipe for target 'spring' failed
make: *** [spring] Error 2
Strange OpenGL error when compiling Source
Moderator: Moderators
Strange OpenGL error when compiling Source
Hi, I'm rather new to Linux so it could be something I'm doing wrong (and most likely is), but when I compile the source after downloading all the required libs I get this error after compiling for a while:
Re: Strange OpenGL error when compiling Source
You are most likely missing headers for OpenGL. I'd look at some spring compile guide and install the additional packages that might be mentioned there.
Re: Strange OpenGL error when compiling Source
Thanks for the help. I completely forgot about this post, ergo my absence. (Was waiting for an email telling me that the thread was approved ) We'll give it another try compiling but I figured all OpenGL related headers would already be included with my Linux Distro.
Re: Strange OpenGL error when compiling Source
Your distro's version of GLEW is probably out of date, as is...
the directory naming convention you have chosen./home/toby/Documents/TASpringSource/
Re: Strange OpenGL error when compiling Source
Didn't realize the name of the folder could mess things up. Figured it would be fine as long as you don't have spaces. What is the problem exactly?
We managed to compile it on another computer running the same distro in a virtual box (fresh install). So I'm unsure as to what the cause for the problem is.
We managed to compile it on another computer running the same distro in a virtual box (fresh install). So I'm unsure as to what the cause for the problem is.
Re: Strange OpenGL error when compiling Source
Kloot wrote:the directory naming convention you have chosen./home/toby/Documents/TASpringSource/
There is no technical issue with that, except this project hasn't been called TASpring in a long while.Toby wrote:Didn't realize the name of the folder could mess things up. Figured it would be fine as long as you don't have spaces. What is the problem exactly?
To expand on the original problem, I had the same issue on Ubuntu 16.04, as it's using glew 1.13.0 (libglew-dev/xenial,now 1.13.0-2 amd64 [installed]). I've a feeling we should put some effort to support it, as it's a popular platform (maybe our include/GL/glew.h is out of date?). This issue is related to viewtopic.php?t=32428, although archlinux has probably moved to glew 2.0 since.
Glew 2.0 is in Ubuntu testing (https://launchpad.net/ubuntu/+source/glew) and it has binaries available at:
https://launchpad.net/ubuntu/+source/gl ... d/11117458
Once you downloaded them (seems you only need these 3), they can then be installed with:
Code: Select all
sudo dpkg -i glew-utils_2.0.0-3_amd64.deb libglew-dev_2.0.0-3_amd64.deb libglew2.0_2.0.0-3_amd64.deb
Then it will compile. Running it, I still had some issues with ArchiveScan (https://springrts.com/mantis/view.php?id=5415), and you can see them in infolog-ubuntu.txt in that report.
Re: Strange OpenGL error when compiling Source
Our include/GL/glew.h *is* ancient, but only used by the headless build and not relevant here.