Bugzilla – Bug 1189196
OpenGL: libglfw3 crashes on glewInit(), same code works with libglfw3-wayland
Last modified: 2021-08-29 15:01:35 UTC
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:90.0) Gecko/20100101 Firefox/90.0 Build Identifier: Hi, I'm started a project on OpenGl after a long time on openSUSE Tumbleweed. Calling glewInit() throws the error message "glewInit failed: Missing GL version" Searched a lot on stackoverflow etc but no working solutions found. The same program runs on Ubuntu 20.04 without any problem. All other programs using OpenGl (steam, CUDA, ...) are working without any problems. A simple test program and compiling parameter can be found in this issue in RedHat Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1895018 Posted this issue on Reddit: https://www.reddit.com/r/openSUSE/comments/p0mca1/opengl_glewinit_throws_error_tumbleweed_problem/ Due to the answer, I changed to a Plasma-Wayland session, removed "libglfw3" and installed "libglfw3-wayland" and the application worked. I tested it also on a second computer and the result was the same. So I assume X and libglfw3 are not working together anymore, but Wayland and libglfw3-wayland does. Reproducible: Always Steps to Reproduce: 1. In X-Session: Install glfw3 and glew 2. Get OpenGl test code from https://bugzilla.redhat.com/show_bug.cgi?id=1895018 3. Compile and start. Results in crash and error message "glewInit failed: Missing GL version" 4. Deinstall glfw3 and install glfw3-wayland 5. Switch to wayland session 6. Applicarion runs fine Actual Results: OpenGl application crashes and get error message "glewInit failed: Missing GL version" Expected Results: OpenGl application should start.
Hi Ferdinand, would you please help to take a look at this issue? I'm really not sure whether it is right to assign it to you, please feel free to reassign whenever necessary, thanks.
I compiled libglfw3 on my own and got still the same error. So maybe the problem is more related to glwf3 itself.
Ok, I did some more investigations: With the (offical) glfw3 examples code I changed my test code and managed it to compile and run. Therefore, libglfw3 seems to work. But this does not explain why I have to change my test code for X11, but I don't have to change it for wayland. Seems to be that the libraries libglfw3 and libglfw3-wayland are different versions of the glfw API.
Having the same issue here, both with a self-written application and the game supertuxkart. Both abort with Error: Missing GL version ** (gui:23595): ERROR **: 13:35:13.075: unhandled exception (type std::exception) in signal handler: what: Could not initialize GLEW I noticed that the changelog of libGLEW mentions it was switched to use EGL end July. And indeed, if I just downgrade libGLEW2 to a version before that change (I got libGLEW2_2-2.2.0-1.14.x86_64.rpm from the Tumbleweed History download area), both programs run again (The rest of the system is Tumbleweed 20210820).
Sorry fore late response, but I can not reproduce it. Compiling the linked source code using: `g++ test.cpp -lglfw -lGLEW -lGL` succeed and even running the program in a X11 session does work without issues. Setup: libGLEW2_2 = 2.2.0-3.1 libglfw3 = 3.3.4-1.4
After more investigation, it seems like this was a result of #1189524 So the real issue is that GLEW does not properly support EGL. *** This bug has been marked as a duplicate of bug 1189524 ***