1

I'm cross compiling an OpenGL application that I am then trying to run on an rpi4 with Ubuntu 20.04, but I am getting the following error:

libGL error: MESA-LOADER: failed to open vc4 (search paths /usr/lib/aarch64-linux-gnu/dri:\$${ORIGIN}/dri:/usr/lib/dri)
libGL error: failed to load driver: vc4  
libGL error: MESA-LOADER: failed to open vc4 (search paths /usr/lib/aarch64-linux-gnu/dri:\$${ORIGIN}/dri:/usr/lib/dri) 
libGL error: failed to load driver: vc4 
libGL error: MESA-LOADER: failed to open swrast (search paths /usr/lib/aarch64-linux-gnu/dri:\$${ORIGIN}/dri:/usr/lib/dri)
libGL error: failed to load driver: swrast 
egl: 1 4 
gles version: 2 0               
Async readback not supported     
X Error of failed request:  BadValue (integer parameter out of range for operation)                         
Major opcode of failed request:  152 (GLX)
Minor opcode of failed request:  24 (X_GLXCreateNewContext)
Value in failed request:  0x0
Serial number of failed request:  74
Current serial number in output stream:  75 

glxgears, es2gears as well as glmark2-es2 all work fine on the rpi4.

I am just guessing that my linking on the host computer breaks something or am I missing some libraries on the rpi4.

Any ideas how I can solve this?

0

I am also looking for the same answer, but maybe this would help you troubleshoot what's happening. In my case, kmscube from Mesa works fine, but my renderer doesn't and creates the same exact output than you.

Here is what I tried, which works:

sudo apt install git meson ninja-build
git clone //gitlab.freedesktop.org/mesa/kmscube.git
cd kmscube
mkdir builddir
cd builddir
meson ..
ninja
./kmscube

I am still trying to figure out why it works for kmscube but doesn't work for my own app. kmscube is a very small project and I hope that it will give you the answer that you are looking for. Good luck!

----- EDIT -----

I sort of figured out and pin-pointed the source of my problem, but I don't have a full understanding of what is going on: The problem went away as soon as I stopped linking ffmpeg libs to my app. Maybe this info will help.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.