Building the release graphics stack
The Vinix X11 sidecar uses indirect GLX from Mesa 24.0.9 and EGL, GLES and GBM from Mesa 24.2.8. Their Gallium libraries require LLVM 17.0.6 and 19.1.4 respectively. The new LLVM and Mesa packages still require full builds and guest rendering checks on each architecture. The release ELF check records the public paths and the matching original files.
Build each LLVM release with a native TableGen of the same version. tools/vinix-llvm.v checks the reported version and configures the native CPU backend and AMDGPU with shared LLVM, RTTI and exceptions. Install the matching llvm17-dev or llvm19-dev package in the Mesa build SDK for its headers and relocatable llvm-config. The runtime packages use Vinix’s gcc-libs and musl.
Mesa 24.2.8 uses a native intel_clc to compile the built-in shaders for the x86 Iris driver. Build that generator from the same patched Mesa source on the build host, using LLVM/Clang 19, libclc, SPIRV-Tools and the matching SPIRV-LLVM-Translator. Put the resulting executable on the build host’s PATH and check its LLVM version with intel_clc -M. Mesa's cross build runs it with each Intel GPU generation and compiles the resulting shader tables into the driver. The release ARM configuration uses the ARM Gallium backends. The legacy GLX profile keeps Mesa 24.0.9’s software DRI server and its private LLVM 17 dependency.
The build-host generator’s Meson configure found LLVM 19.1.4, clang-cpp, libclc 0.2.0, SPIRV-Tools 2024.4.1 and LLVMSPIRVLib 19.1.0.0. Clang 19 compiled the generator’s clc_helpers.cpp with CXXFLAGS="-O0 -g0" on the 1 GiB worker. The configure log and compiler commands are in xorg/llvm/work/intel-clc-02 on the release worker.
Both target Mesa profiles build the Zink Gallium backend with Mesa's Vulkan headers. If a client selects Zink, the driver opens libvulkan.so.1 at runtime. The loader is therefore a driver-specific dependency that an ELF DT_NEEDED scan cannot detect. The software EGL and GLX checks exercise the software Gallium backend. Zink loader selection in Mesa 24.2.8
Sharing a builder
Compile tools/vinix-ninja.v as vinix-ninja on the build host. Its default invocation delegates to Ninja with two jobs. On a shared Linux worker, open the existing build lock before starting vpac and pass that same file descriptor to its subprocesses. Run the example from the repository root with the signed target SDK and build tools already configured.
export VINIX_BUILD_LOCK="$worker_state/compile.lock" VINIX_BUILD_LOCK_FD=9
export VINIX_BUILD_SLICE_SECONDS=180
export VINIX_BUILD_MIN_FREE_MIB=6912
exec 9>>"$VINIX_BUILD_LOCK"
flock -x 9
vpac --native-build ports/llvm19-libs/PKGBUILD.vile "$receipts/llvm19.manifest"
The helper obtains the object prerequisites from Ninja’s graph and completes them in batches of eight. Once a batch exceeds the time slice, it hands the lock to waiting workers. The next batch resumes in the same verified source and build directory. Ninja rechecks the full requested dependency graph and runs the final links while holding the lock. The surrounding vpac process keeps ownership through its checks and archive creation.
VINIX_BUILD_MIN_FREE_MIB is an optional free-space threshold for the build filesystem. Before starting each batch or final link, the helper checks the available space. If it falls below this threshold, the helper releases the lock and checks every 30 seconds. Set the threshold above the required reserve to leave room for the next batch. The example leaves a 768 MiB margin above a 6 GiB reserve. The worker test confirmed a waiting build produced no object, a second process acquired the lock, and a build with sufficient space completed. Receipts are in ~/.local/state/vinix/ports/musl-busybox-CqkBEA/xorg/worker/ninja-free-space.
Monitor the build log for the last completed batch. A clean wait for the lock leaves the original vpac process alive. If the process or host is terminated, preserve its logs and start a fresh native build from the pinned recipe. Use the completed manifest, verify the archive digest, then sign and install it into a clean target root before using the result.
A native vpac build of libdrm 2.4.123 yielded after 8, 24 and 32 of its 53 object targets on November 30. A second process acquired the same lock between batches. The calling process still held it after vpac wrote the archive. A check with an unrelated lock file failed. The test archive SHA-256 is caec67ab38c181231b0ded61a570cd4c8bf3cdf1ec65fc72a8a76caa6306b8bb.
For Meson links driven by GCC, build tools/vinix-time-ld.v as ld.lld in a private directory, set VINIX_REAL_LD to the absolute path of the real linker and VINIX_LINK_LOG to an absolute output path, and add -B<private-directory>/ -fuse-ld=lld to the target link flags. GNU time records maximum resident KiB, elapsed seconds, exit status and the linker command. The worker linked and ran libbsd's endian test, recording 58,880 KiB for its successful link. A missing library produced a failure record and the compile-only step produced none. Receipts for both runs are in ~/.local/state/vinix/ports/musl-busybox-CqkBEA/xorg/worker/{ninja-sharing-01,timed-link-02}.