mesa: receta llvm18 + mesa-llvmpipe para el escritorio KDE en VM
llvmpipe necesita libLLVM (softpipe no bindea el GBM/EGL que kwin exige). El LLVM 22 del sandbox no compila con mesa 24.0.9 ⇒ sellamos LLVM 18.1.8 desde fuente (rango soportado), patrón gcc-de-gueto + static-libstdc++. mesa-llvmpipe = mesa-swrast con -Dllvm=enabled. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,50 @@
|
||||
# LLVM 18.1.8 — sólo libLLVM (sin clang) para el JIT de llvmpipe (mesa-llvmpipe → escritorio KDE en VM).
|
||||
# Ver [[kde-metal-qemu-desktop]]: kwin exige GBM/EGL de software COMPLETO; softpipe no bindea, llvmpipe sí,
|
||||
# y llvmpipe necesita libLLVM. El LLVM 22 del sandbox Alpine NO compila con mesa 24.0.9 (dep detection
|
||||
# rota) ⇒ sellamos un LLVM 18 (rango que mesa 24.0.9 soporta) desde fuente.
|
||||
#
|
||||
# Patrón gcc-de-gueto (idéntico a cmake.toml): C++ a escala ⇒ g++ del sandbox (Alpine, musl) con
|
||||
# -static-libstdc++ -static-libgcc ⇒ libLLVM.so.18 queda con NEEDED sólo libc.musl (inyectable a la
|
||||
# imagen QEMU como el loader musl). BUILD_LLVM_DYLIB=ON ⇒ una sola libLLVM.so compartida (lo que
|
||||
# mesa linkea). Sólo el target X86 (host), sin tests/docs/bindings ⇒ recorta el monstruo.
|
||||
#
|
||||
# Worker GORDO (TYPE=ccx63): LLVM es de las compilaciones más pesadas; el link del DYLIB pide MUCHA RAM.
|
||||
name = "llvm18"
|
||||
version = "18.1.8"
|
||||
|
||||
[source]
|
||||
tarball = "https://github.com/llvm/llvm-project/releases/download/llvmorg-18.1.8/llvm-project-18.1.8.src.tar.xz"
|
||||
sha256 = "0b58557a6d32ceee97c8d533a59b9212d87e0fc4d2833924eb6c611247db2f2a"
|
||||
|
||||
[build]
|
||||
compiler = "zig-cc"
|
||||
target = "x86_64-linux-musl"
|
||||
link = "dynamic"
|
||||
|
||||
[build.phases]
|
||||
configure = '''
|
||||
CC=gcc CXX='g++ -static-libstdc++ -static-libgcc' \
|
||||
cmake -S llvm -B build -G Ninja \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_INSTALL_PREFIX=/usr \
|
||||
-DLLVM_TARGETS_TO_BUILD=X86 \
|
||||
-DLLVM_BUILD_LLVM_DYLIB=ON \
|
||||
-DLLVM_LINK_LLVM_DYLIB=ON \
|
||||
-DLLVM_ENABLE_RTTI=ON \
|
||||
-DLLVM_ENABLE_PROJECTS="" \
|
||||
-DLLVM_ENABLE_TERMINFO=OFF \
|
||||
-DLLVM_ENABLE_ZLIB=OFF \
|
||||
-DLLVM_ENABLE_ZSTD=OFF \
|
||||
-DLLVM_ENABLE_LIBXML2=OFF \
|
||||
-DLLVM_ENABLE_LIBEDIT=OFF \
|
||||
-DLLVM_ENABLE_BINDINGS=OFF \
|
||||
-DLLVM_INCLUDE_TESTS=OFF \
|
||||
-DLLVM_INCLUDE_EXAMPLES=OFF \
|
||||
-DLLVM_INCLUDE_BENCHMARKS=OFF \
|
||||
-DLLVM_INCLUDE_DOCS=OFF
|
||||
'''
|
||||
compile = "ninja -C build"
|
||||
install = "DESTDIR=/out ninja -C build install"
|
||||
|
||||
[deps]
|
||||
build = ["cmake", "samurai", "python3", "pkgconf"]
|
||||
@@ -0,0 +1,29 @@
|
||||
# Mesa 24.0.9 — LLVMPIPE (render por software CON LLVM JIT). Variante de mesa-swrast (softpipe) para
|
||||
# el escritorio KDE en VM: kwin exige un GBM/EGL de software COMPLETO, y softpipe no bindea las
|
||||
# extensiones que kwin pide ("failed to bind extensions" → "Failed to create gbm device"). llvmpipe
|
||||
# (el driver `swrast` de gallium cuando `-Dllvm=enabled`) sí las provee. Ver [[kde-metal-qemu-desktop]].
|
||||
#
|
||||
# La ÚNICA diferencia con mesa-swrast.toml es `-Dllvm=enabled` (+ el toolchain LLVM en el sandbox).
|
||||
# Si el sandbox no trae libLLVM/llvm-config, este build falla en configure ⇒ hay que sellar LLVM
|
||||
# desde fuente primero (el monstruo). Test primero, decidir después.
|
||||
name = "mesa-llvmpipe"
|
||||
version = "24.0.9"
|
||||
|
||||
[source]
|
||||
tarball = "https://archive.mesa3d.org/mesa-24.0.9.tar.xz"
|
||||
sha256 = "51aa686ca4060e38711a9e8f60c8f1efaa516baf411946ed7f2c265cd582ca4c"
|
||||
patches = ["mesa-version-script-comma.patch"]
|
||||
|
||||
[build]
|
||||
compiler = "zig-cc"
|
||||
target = "x86_64-linux-musl"
|
||||
link = "dynamic"
|
||||
zig_version = "0.13.0"
|
||||
|
||||
[build.phases]
|
||||
configure = "PATH=/usr/lib/llvm22/bin:$PATH LLVM_CONFIG=/usr/lib/llvm22/bin/llvm-config PYTHONPATH=/usr/lib/python3.12/site-packages meson setup output --prefix=/usr --buildtype=release -Db_ndebug=true -Dgallium-drivers=swrast -Dvulkan-drivers= -Dllvm=enabled -Dshared-llvm=enabled -Dintel-clc=disabled -Dplatforms=wayland -Dglx=disabled -Dgbm=enabled -Degl=enabled -Dopengl=true -Dgles1=disabled -Dgles2=enabled -Dexpat=enabled -Dzstd=enabled -Dshader-cache=enabled -Dxmlconfig=enabled -Dglvnd=false -Dgallium-rusticl=false -Dgallium-va=disabled -Dgallium-extra-hud=false -Dvideo-codecs= -Dtools= -Dbuild-tests=false -Dvalgrind=disabled -Dlibunwind=disabled"
|
||||
compile = "PYTHONPATH=/usr/lib/python3.12/site-packages ninja -C output"
|
||||
install = "DESTDIR=/out ninja -C output install"
|
||||
|
||||
[deps]
|
||||
build = ["meson", "samurai", "python3", "pkgconf", "flex", "bison", "mako", "markupsafe", "packaging", "libdrm", "wayland", "wayland-protocols", "expat", "zlib", "zstd", "libffi"]
|
||||
Reference in New Issue
Block a user