I recently restarted my small OpenGL fun project. I have a github repository together with Travis CI for continuous testing. I use an ubuntu 17.10 docker image on Travis to get the latest library versions and cpp features. Everything works fine so far, except for OpenGL. I already found out, that I have to use a virtual frame buffer (java - Travis CI - Run LWJGL Tests in Non-Headless Environment? - Stack Overflow) if I want to test my OpenGL applications on Travis CI. As long as I create a 3.0 Context, everything runs, but if I start using version 4.5 (which I intend to use) the applications start crashing. This is obviously driver related, but since I am no Linux expert, I am not sure, where to get the necessary offscreen drivers. It would be nice, if somebody could give me hint, which libs I need and which repository contains them.
Here is my Dockerfile, so that you see the content of my current docker image:
#Download base image ubuntu 17.10
FROM ubuntu:17.10
# Update Ubuntu
RUN apt-get update
# Get basic libraries
RUN apt-get install -y cmake git g++ clang-5.0 libboost-test-dev
# Get libraries for codecov
RUN apt-get -y install lcov curl
# Get opengl related libraries
RUN apt-get install -y freeglut3-dev libglew-dev mesa-utils xvfb
# Create directories
RUN mkdir /home/usr && mkdir /home/usr/gdl && mkdir /home/usr/gdl/build && mkdir /home/usr/gdl/code
#RUN export DISPLAY=:99 && export LIBGL_ALWAYS_SOFTWARE=1
WORKDIR /home/usr/gdl/build
For the former, you’ll probably get some hits with the output of:
lspci | grep VGA
or for Ubuntu specifically:
sudo lshw -C display
If on the off chance this is Mesa3D, you probably want to read this thread. Your comment reminded me of it. Also, your LIBGL_ALWAYS_SOFTWARE reference suggests you’re probably running Mesa3D.
For the GPU… no clue, since it is running on a server I don’t own. But as far as I understood it, they don’t have any real GPUs. But I will try your suggestions and give you the summarized output as soon as I could (which is probably tomorrow -.-).
If on the off chance this is Mesa3D, you probably want to read this thread. Your comment reminded me of it. Also, your LIBGL_ALWAYS_SOFTWARE reference suggests you’re probably running Mesa3D.
Thanks for the link. I will read it and keep you updated about my progress.
It is still not running, but I have managed to build an image that downloads mesa, builds and installs it. Now I have to figure out, how I get OpenGL version 4.5 activated. If I read it correctly, it should be possible (somehow). Unfortunately I have not that much time at the moment. So I will give another update in the upcoming days if I somehow manage to get it running or if I get stuck.