libvirt error: symbol lookup error: /usr/lib/libvirglrenderer.so.1: undefined symbol: gbm_bo_unmap

I encountered the following error after installing the AMDGPU Pro drivers on my Arch Linux machine:

error: internal error: process exited while connecting to monitor: /usr/bin/qemu-system-x86_64: symbol lookup error: /usr/lib/libvirglrenderer.so.1: undefined symbol: gbm_bo_unmap

The error is caused because the thing it is looking up does not exist. Luckily the fix is easy.

 

Add the following to the systemd service file for libvirt in /etc/systemd/system/multi-user.target.wants/libvirtd.service under [Service].

Environment="LD_LIBRARY_PATH=/usr/lib"

That is the lowercase letter “L” not the number one.

 

That should do it. This was tested on archlinux and works fine for me. If it does not work for you I’m sorry I don’t think I’ll be able to help, I got this answer from a chinese website. Here is what it said:

 

Your question is: opencl-amdgpu-pro-orca.

It provides its own libgbm.so.1 even if it is the latest version of aur with default values, it also lacks this symbol. It first enters the search path.

Therefore, you can disable these drivers, or try to get/compile a fixed/updated version that includes this feature, or try disabling only the lib search path for libvirtd servcie (adding the ld_library_path=/usr/lib environment variable to the service startup process).

How to analyze these issues such as:
ldd /usr/lib/libvirglrenderer.so.1 ldd /usr/lib/libvirglrenderer.so.1 \
| awk '!=""{print }' \
| while read file; do objdump -TC -j.text $file \
| grep gbm_bo_unmap && echo $file; done LD_LIBRARY_PATH=/usr/lib ldd /usr/lib/libvirglrenderer.so.1 \
| awk '!=""{print }' \
| while read file; do objdump -TC -j.text $file \
| grep gbm_bo_unmap && echo $file; done



About: Ryan Parker

I'm a former captain of the Cyber Defense team, Current Infrastructure Security Specialist. I also have a side job helping small to medium business with anything technology doing everything imaginable. One of my hobbies is building out infrastructures for myself, friends, and clients. I current maintain a homelab with about 400GB of RAM, 100+ TB of storage, and tons of CPU cores.


Leave a Reply

Your email address will not be published. Required fields are marked *