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

Bug: new viewer not working and reverting to classic mode on some Linux configuration #200

Closed
abey79 opened this issue Feb 13, 2021 · 0 comments · Fixed by #206
Closed

Comments

@abey79
Copy link
Owner

abey79 commented Feb 13, 2021

Symptom

show reverts to classic viewer with following note:

WARNING:root:!!! show: ModernGL not available, reverting to classic mode.

This may have several root cause. This issue is about failing to find the X11 library. It can be confirmed with the following command:

python -c "import moderngl;print(moderngl.create_standalone_context().info)"

The output should be similar to this:

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File ".../lib/python3.8/site-packages/moderngl/context.py", line 1560, in create_standalone_context
    ctx.mglo, ctx.version_code = mgl.create_context(glversion=require, mode=mode, **settings)
  File ".../lib/python3.8/site-packages/glcontext/__init__.py", line 80, in create
    return x11.create_context(**kwargs)
Exception: (detect) libX11.so not loaded

Workaround

Run the following command:

python -c "from ctypes.util import find_library; print(find_library('X11'))"

Note the result. There are good chances that it is libX11.so.6 (but could be something else.

Running vpype with the following command should then work (use the actual result of the previous command instead of libX11.so.6:

GLCONTEXT_LINUX_LIBX11=libX11.so.6 vpype ...
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

Successfully merging a pull request may close this issue.

1 participant