matus-chochlik / oglplus

OGLplus is a collection of open-source, cross-platform libraries which implement an object-oriented facade over the OpenGL® (version 3 and higher) and also OpenAL® (version 1.1) and EGL (version 1.4) C-language APIs. It provides wrappers which automate resource and object management and make the use of these libraries in C++ safer and more convenient.
http://oglplus.org/
Boost Software License 1.0
491 stars 72 forks source link

Linux Mint failure to detect OpenGL version #73

Closed larspensjo closed 10 years ago

larspensjo commented 10 years ago

The failure to detect leads to OpenGL defaulting to 3.0, while 4.3 is supported.

I started with

/configure.py --no-docs --use-glew --use-glfw

The cmake script GLVerExt.cmake will do try_run() with the following arguments:

RUNS_WITH_GL_4_3
COMPILED_WITH_GL_4_3
/home/lars/src/oglplus/_build/gl
/home/lars/src/oglplus/_build/gl/has_GL_4_3.cpp
COMPILE_DEFINITIONS-std=c++0x
CMAKE_FLAGS
-DINCLUDE_DIRECTORIES:STRING=/usr/include/GL;/usr/include/libdrm;;/home/lars/src/oglplus/include;;/home/lars/src/oglplus/implement;;/home/lars/src/oglplus/utils;;/home/lars/src/oglplus/_build/include 
-DLIBRARY_DIRECTORIES:STRING= 
-DLINK_DIRECTORIES:STRING= 
-DLINK_LIBRARIES:STRING=/usr/lib/x86_64-linux-gnu/libGLEW.so;/usr/lib/x86_64-linux-gnu/libGLU.so;/usr/lib/x86_64-linux-gnu/libGL.so;/usr/lib/x86_64-linux-gnu/libGL.so;;/usr/lib/x86_64-linux-gnu/libSM.so;/usr/lib/x86_64-linux-gnu/libICE.so;/usr/lib/x86_64-linux-gnu/libX11.so;/usr/lib/x86_64-linux-gnu/libXext.so 

It turns out that the libraries libSM.so.6 and libICE.so.6 exists, but not libSM.so and libeICE.so, as requested by the script.

If I manually remove the specification of libIce and libSM, I can compile has_GL_4_3.cpp.

matus-chochlik commented 10 years ago

This looks like some misconfiguration of GLEW/GLFW or the two other libs to me. IMHO either the symlinks libICE.so -> libICE.so.6 and libSM.so -> libSM.so.6 should be present (they are on two of my machines that I checked on) or at least the dependency info of GLEW/GLFW should point directly to the right (*.so.6) files.

larspensjo commented 10 years ago

I can confirm that the symlinks exist in Ubuntu, but not in Mint. I am not an expert on this, could you please tell me where I can check the dependency info for GLEW/GLFW?

matus-chochlik commented 10 years ago

That depends on how CMake detects GLUT/GLEW, which can get pretty complicated. I'd say that creating the missing symlinks by using ln -s is the 'better' way how to solve this.