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
492 stars 72 forks source link

GL detection and extensions #31

Closed ucacaxm closed 10 years ago

ucacaxm commented 10 years ago

Hi,

I use oglplus for several months and I like it. But on my new linux (ubuntu 13.10) install I have a problem with Gl and extension detection.

1) If I run ./configure.py --no-examples --from-scratch --include-dir=/home/alex/lib/glew-1.10.0/include --library-dir=/home/alex/lib/glew-1.10.0/lib

It finds GL 4.4 but stop at compiling -- Found GL extension: EXT_direct_state_access But glewinfo gives that this extension is ok

2) If I force glew ./configure.py --no-examples --from-scratch --use-glew --include-dir=/home/alex/lib/glew-1.10.0/include --library-dir=/home/alex/lib/glew-1.10.0/lib

It can not detect GL: -- Detecting OpenGL version Could not detect GL version, assuming 3.0 and stop at -- Found GLEW extension: AMD_performance_monitor which is normal since GLEW tell that this extension is missing: GL_AMD_performance_monitor: MISSING

Can I bypass these tests ? Many thanks, Alex PS: On my laptop (Windows 8.1) every thing is ok (ok it not the same hardware, nor OS).

matus-chochlik commented 10 years ago

Hi, Thanks for reporting this.

I'll have a look at the problem, in the meantime a rather crude solution to get it going for you might be to comment out the individual extension detection in ./config/GLExt.cmake. Just remove or comment out the line(s) like: "glew_ext_detection(AMD performance_monitor)"

if you would like to help with the debugging you could do the following:

run configure.py with the --debug-config option and when the configuration stops (at the extension detection) interrupt it (press CTRL+C) and have a look into ./_build/gl/ there should be subdirectories containing the files for the last try_compile test (source + makefiles); try to make them manually, it may give some clues why the test fails.

ucacaxm commented 10 years ago

Hi,

Hi,

Thanks for reporting this.

I'll have a look at the problem, in the meantime a rather crude solution to get it going for you might be to comment out the individual extension detection in ./config/GLExt.cmake. Just remove or comment out the line(s) like: "glew_ext_detection(AMD performance_monitor)"

Ok good to know that.

if you would like to help with the debugging you could do the following:

run configure.py with the --debug-config option and when the configuration stops (at the extension detection) interrupt it (press CTRL+C) and have a look into ./_build/gl/ there should be subdirectories containing the files for the last try_compile test (source + makefiles); try to make them manually, it may give some clues why the test fails.

Ok I am investigating this direction. Thank for pointing this folder which is what I wanted to debug.

I should have a problem with different version of GLEW since the simple compilation of has_GL_4_4.cpp with GLEW gives at execution: Inconsistency detected by ld.so: dl-version.c: 224: _dl_check_map_versions: Assertion `needed != ((void *)0)' failed!

Thanks, Alex

— Reply to this email directly or view it on GitHubhttps://github.com/matus-chochlik/oglplus/issues/31#issuecomment-28775537 .

ucacaxm commented 10 years ago

I think I have a strange bug not related to oglplus.

When I compile just this (which is similar but simpler to what oglplus does in extensions detection or in has_GL_4_3.cpp)

include <GL/glew.h>

include

int main() { GLenum init_result = glewInit(); if(0) throw std::runtime_error("OpenGL/GLEW initialization error."); return 0; }

with

g++ testGLUT.cpp -lglut -lGL

and run it, I get this:

Inconsistency detected by ld.so: dl-version.c: 224: _dl_check_map_versions: Assertion `needed != ((void *)0)' failed!

ldd a.out

provide the same error

If I remove the throw exception, then it works! (Or if I compile with juste this # g++ testGLUT.cpp -lglut it works as well which ok since I do not use GL fonctions).

So there should be a problem on Ubuntu 13.10 with GLEW, GL (nvidia driver). Similar bug is describe here http://ubuntuforums.org/showthread.php?t=2183928

If I find somethings, I'll tell you ... alex

2013/11/19 Alexandre Meyer Alexandre.Meyer@liris.univ-lyon1.fr

Hi,

Hi,

Thanks for reporting this.

I'll have a look at the problem, in the meantime a rather crude solution to get it going for you might be to comment out the individual extension detection in ./config/GLExt.cmake. Just remove or comment out the line(s) like: "glew_ext_detection(AMD performance_monitor)"

Ok good to know that.

if you would like to help with the debugging you could do the following:

run configure.py with the --debug-config option and when the configuration stops (at the extension detection) interrupt it (press CTRL+C) and have a look into ./_build/gl/ there should be subdirectories containing the files for the last try_compile test (source + makefiles); try to make them manually, it may give some clues why the test fails.

Ok I am investigating this direction. Thank for pointing this folder which is what I wanted to debug.

I should have a problem with different version of GLEW since the simple compilation of has_GL_4_4.cpp with GLEW gives at execution: Inconsistency detected by ld.so: dl-version.c: 224: _dl_check_map_versions: Assertion `needed != ((void *)0)' failed!

Thanks, Alex

— Reply to this email directly or view it on GitHubhttps://github.com/matus-chochlik/oglplus/issues/31#issuecomment-28775537 .

matus-chochlik commented 10 years ago

thanks for the info

ucacaxm commented 10 years ago

To close to issue:

Finally, I change the the link of libGL.so which was to mesa to point to the libGL of nvidia: sudo ln -s /usr/lib/nvidia-319/libGL.so /usr/lib/x86_64-linux-gnu/ (something should be wrong in the nvidia driver package).

Sorry it was not related to oglplus.

Thanks for this great lib, alex

2013/11/22 Matus Chochlik notifications@github.com

thanks for the info

— Reply to this email directly or view it on GitHubhttps://github.com/matus-chochlik/oglplus/issues/31#issuecomment-29069972 .

matus-chochlik commented 10 years ago

Thanks. Good to hear that you got it going.