Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issues on X11 and GLFW for WSL #43

Closed
s99090 opened this issue Oct 6, 2019 · 11 comments
Closed

Issues on X11 and GLFW for WSL #43

s99090 opened this issue Oct 6, 2019 · 11 comments

Comments

@s99090
Copy link

s99090 commented Oct 6, 2019

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
Copy link
Collaborator

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
Copy link
Author

s99090 commented Oct 6, 2019

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

@s99090
Copy link
Author

s99090 commented Oct 6, 2019

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

@abhimadan
Copy link
Collaborator

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
Copy link
Owner

alecjacobson commented Oct 6, 2019 via email

@abhimadan
Copy link
Collaborator

abhimadan commented Oct 6, 2019

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
Copy link
Author

s99090 commented Oct 6, 2019

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
Copy link
Collaborator

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
Copy link
Author

s99090 commented Oct 6, 2019

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
Copy link
Author

s99090 commented Oct 6, 2019

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
Copy link
Author

s99090 commented Oct 6, 2019

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants