LWJGL Forum

Programming => Bug Reports / RFE => Topic started by: ekureuil on November 04, 2016, 11:51:59

Title: BGFX / LINUX : undefined symbol: glXQueryVersion
Post by: ekureuil on November 04, 2016, 11:51:59
Hello,

I am new to LWJGL and i am very interested by the bgfx binding ... I tried to build the basic example displaying an hardcoded image (C99 example, here : https://github.com/LWJGL/lwjgl3/tree/master/modules/core/src/test/java/org/lwjgl/demo/bgfx (https://github.com/LWJGL/lwjgl3/tree/master/modules/core/src/test/java/org/lwjgl/demo/bgfx) ), and everything went fine at the build phase, but when i run the program i get:

/usr/lib/jvm/java-8-openjdk/bin/java: symbol lookup error: /tmp/lwjgleku/3.1.1-build-1/libbgfx.so: undefined symbol: glXQueryVersion

I tried all the 3.1 releases available from the download page (release/stable/nightly).

I am running antergos (arch linux).
Title: Re: BGFX / LINUX : undefined symbol: glXQueryVersion
Post by: spasi on November 04, 2016, 13:59:34
Does any other OpenGL demo work on your system? Try org.lwjgl.demo.glfw.Gears or the native glxgears application.
Title: Re: BGFX / LINUX : undefined symbol: glXQueryVersion
Post by: ekureuil on November 04, 2016, 14:41:15
What i tried that works:
- as my first test (before trying bgfx) LWJGL "hello world" (the red rectangle window)
- as per your instruction, the Gears demo *works*

My system has been configured and works normally. I have a laptop using bumblebee the intel driver part work correctly as well as its nvidia counterpart.
Title: Re: BGFX / LINUX : undefined symbol: glXQueryVersion
Post by: spasi on November 04, 2016, 16:52:42
Thanks, I was able to reproduce this. It looks like bgfx does not load libGL internally. A workaround is to call GL.getFunctionProvider() before bgfx_init().
Title: Re: BGFX / LINUX : undefined symbol: glXQueryVersion
Post by: ekureuil on November 04, 2016, 17:00:06
Yay ! The workaround works perfectly ! Thanks spasi :-)