GLFW fails on Debian (with Python)
Asked Answered
C

0

6

I tried to make the question as reproducible as possible. So here is the docker commands:

docker run --name headless_test -ti python:3.6-jessie /bin/bash

And inside the docker execute the following lines:

apt update && apt install -y git xvfb xorg-dev cmake
pip3 install glfw
mkdir /projects
git clone https://github.com/glfw/glfw.git /projects/glfw
cd /projects/glfw
cmake -DBUILD_SHARED_LIBS=ON .
make
export PYGLFW_LIBRARY=/projects/glfw/src/libglfw.so
xvfb-run python -c "import glfw; glfw.init(); glfw.window_hint(glfw.VISIBLE, False); glfw.create_window(100, 100, 'hidden window', None, None)"

this fails with the following error:

GLX: Failed to find a suitable GLXFBConfig

executing xvfb-run glxinfo (after installing mesa-utils) returns the following:

libGL error: No matching fbConfigs or visuals found
libGL error: failed to load driver: swrast
Error: couldn't find RGB GLX visual or fbconfig

EDIT: This works great if I use the ubuntu docker

Centiliter answered 9/5, 2019 at 16:13 Comment(3)
So does it work in other Linux distributions inside Docker?Boiled
edited- it works on ubuntuCentiliter
Yes. It is automatically installed as part of the previous steps (executing apt install libgl1-mesa-glx changes nothing)Centiliter

© 2022 - 2024 — McMap. All rights reserved.