alecjacobson/computer-graphics-bounding-volume-hierarchy

Issues on X11 and GLFW for WSL

s99090 opened this issue · 11 comments

I received the following errors:

X11: The DISPLAY environment variable is missing
The GLFW library is not initialized
The GLFW library is not initialized
The GLFW library is not initialized
Segmentation fault (core dumped)

And I tried to set
export DISPLAY=localhost:0.0

and then I got

X11: Failed to open display localhost:0.0
The GLFW library is not initialized
The GLFW library is not initialized
The GLFW library is not initialized
Segmentation fault (core dumped)

What should I do now?

Have you installed the relevant X11 packages? See the readme for a list of packages you need to have installed before starting the assignment.

Yes, I think I installed them all. Any specific one? So I can try to reinstall it.

I guess I need some Graphical Programs. Any suggestions for which program is better to install? Xming?

Yeah I was just about to suggest that, since I realized that those package problems prevented people from even compiling their code. Xming (or any X server really) should work fine.

I believe X windowing needs to be set up for this assignment to work on any Linux system, even when run locally. It usually isn't a problem since most conventional Linux systems already have everything set up out of the box, but you need to install a separate X server on Windows to get WSL to run graphical programs.

I am running WSL locally.
I installed Xming and then the error msg became
GLX: GLX version 1.3 is required

And my glxinfo is:

server glx version string: 1.2
client glx version string: 1.4
GLX version: 1.2
    Max core profile version: 3.3
    Max compat profile version: 3.1
    Max GLES1 profile version: 1.1
    Max GLES[23] profile version: 3.0
OpenGL version string: 3.1 Mesa 19.0.8
OpenGL shading language version string: 1.40

I am still trying to figure out how to upgrade that. May I get some help?

I'm a Mac user, so unfortunately I don't know how to solve this problem, though it looks to me as though your server glx version is too old, which is forcefully downgrading the running version. I think you should try to install a newer version of Xming that runs glx 1.3+.

I installed VcXsrv and GLX version is good now.

But I still encountered another issue:

libGL error: No matching fbConfigs or visuals found
libGL error: failed to load driver: swrast
GLX: Failed to create context: GLXBadFBConfigThe GLFW library is not initializedThe GLFW library is not initializedThe GLFW library is not initializedSegmentation fault (core dumped)

Please help!

Well, the same error also was shown when I ran glxinfo.

libGL error: No matching fbConfigs or visuals found
libGL error: failed to load driver: swrast

NVM! I fixed it with disabling the native opengl when starting VcXsrv.
link here