The project SoLo has recently been released, providing a solution for static Linux programs compiled with musl to be able to load glibc libraries installed on the system. This is particularly useful for applications that require Vulkan and OpenGL drivers, typically provided as shared libraries built with glibc. SoLo allows for these static builds to work with such drivers by utilizing the ELF loader within the executable file and translating glibc calls into the musl runtime of the process. Notably, glibc itself is not loaded into the process, preventing the emergence of a second libc in the process. The code base is written in C++ and is open-source under the MIT license.
One of the examples included in the repository demonstrates the functionality of SoLo – a static executable without an interpreter or dynamic section is able to locate the system’s driver in the standard Vulkan manner, load it along with its dependencies, run the computational shader, and save the output in PNG format. Continuous integration testing has been conducted on Alpine, Fedora, and Ubuntu, using Lavapipe packages from the standard repositories of these distributions. The effectiveness of this approach has already been demonstrated in practice, as it is currently being utilized to generate release builds of the Shitty terminal emulator.