Hello Guest

BGFX / LINUX : undefined symbol: glXQueryVersion

  • 4 Replies
  • 6336 Views
BGFX / LINUX : undefined symbol: glXQueryVersion
« 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 ), and everything went fine at the build phase, but when i run the program i get:

Code: [Select]
/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).

*

Offline spasi

  • *****
  • 2261
    • WebHotelier
Re: BGFX / LINUX : undefined symbol: glXQueryVersion
« Reply #1 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.

Re: BGFX / LINUX : undefined symbol: glXQueryVersion
« Reply #2 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.
 

*

Offline spasi

  • *****
  • 2261
    • WebHotelier
Re: BGFX / LINUX : undefined symbol: glXQueryVersion
« Reply #3 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().

Re: BGFX / LINUX : undefined symbol: glXQueryVersion
« Reply #4 on: November 04, 2016, 17:00:06 »
Yay ! The workaround works perfectly ! Thanks spasi :-)