alecjacobson / computer-graphics-bounding-volume-hierarchy

Computer Graphics Assignment about Bounding Volume Hierarchies
124 stars 46 forks source link

Issues on X11 and GLFW for WSL #43

Closed s99090 closed 5 years ago

s99090 commented 5 years ago

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?

abhimadan commented 5 years ago

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

s99090 commented 5 years ago

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

s99090 commented 5 years ago

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

abhimadan commented 5 years ago

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.

alecjacobson commented 5 years ago

Are you trying to run over ssh? This will not work easily and is not supported.

On Sat, Oct 5, 2019, 9:35 PM Abhishek Madan notifications@github.com wrote:

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.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/alecjacobson/computer-graphics-bounding-volume-hierarchy/issues/43?email_source=notifications&email_token=AARDJGKN6RIQQQGNMDDEDLLQNE6F3A5CNFSM4I5Z6RHKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEAN7OQQ#issuecomment-538703682, or mute the thread https://github.com/notifications/unsubscribe-auth/AARDJGLM3WSHLF4QITD3S6TQNE6F3ANCNFSM4I5Z6RHA .

abhimadan commented 5 years ago

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.

s99090 commented 5 years ago

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?

abhimadan commented 5 years ago

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+.

s99090 commented 5 years ago

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!

s99090 commented 5 years ago

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
s99090 commented 5 years ago

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