From 2e1bc498b51c6738f9e5bfd9b7f41f0ec9af2b8d Mon Sep 17 00:00:00 2001 From: sergio Date: Sun, 14 Jun 2026 17:45:41 -0400 Subject: [PATCH] =?UTF-8?q?selfhost-verify:=20recipes=20cmake=20+=20python?= =?UTF-8?q?3=20desde=20fuente=20(frente=20rust)=20=E2=80=94=20BORRADOR?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Dependencias de build que rustc usa para construir su LLVM bundled (mrustc README: cmake ≥3.4.3 + python3). De-Alpinizan el camino de bootstrap de rust; hoy satisfechas por apk de arranque. - cmake 3.31.6: build vía ./bootstrap (zig cc/c++), enlace dinámico, OpenSSL OFF. - python3 3.12.10: ./configure autotools (zig cc), deps.build=[zlib], --without-ensurepip --disable-test-modules, enlace dinámico. NOTA: ambos están EN VALIDACIÓN — sus builds estaban en fase `configure` (sin errores, zig cc aceptado) al commitear, todavía NO sellados en store. Si la compilación/instalación falla, requerirán ajuste en un commit de seguimiento. zlib (f3ddad6) sí está validado y sellado. Co-Authored-By: Claude Opus 4.8 --- recipes/cmake.toml | 32 ++++++++++++++++++++++++++++++++ recipes/python3.toml | 33 +++++++++++++++++++++++++++++++++ 2 files changed, 65 insertions(+) create mode 100644 recipes/cmake.toml create mode 100644 recipes/python3.toml diff --git a/recipes/cmake.toml b/recipes/cmake.toml new file mode 100644 index 00000000..231d35ae --- /dev/null +++ b/recipes/cmake.toml @@ -0,0 +1,32 @@ +# CMake 3.31.6 — dependencia de build del frente rust (variante b, SDD 11 §7.2b). +# +# rustc construye su LLVM bundled con CMake (mrustc README: "cmake ≥3.4.3, required for building llvm +# in rustc"). El toolchain Alpine lo trae como paquete; esta receta lo construye desde fuente para +# de-Alpinizar el camino de bootstrap de rust. +# +# CMake es una HERRAMIENTA del toolchain (corre en build-time, no se enlaza en el 4/4): no necesita +# casar byte-a-byte con la de Alpine, sólo configurar/generar igual. Build vainilla, sin patches. +# +# CMake trae su propio `bootstrap` (no autotools): compila un cmake mínimo con CC/CXX y luego se +# auto-configura. El sandbox exporta CC="zig cc -mcpu=baseline" / CXX="zig c++ -mcpu=baseline"; el +# bootstrap los respeta. Enlace dinámico (un cmake estático con libc++/libstdc++ es impráctico y no +# aporta nada a una herramienta de build-time; la VM ya tiene libstdc++ runtime). + +name = "cmake" +version = "3.31.6" + +[source] +tarball = "https://github.com/Kitware/CMake/releases/download/v3.31.6/cmake-3.31.6.tar.gz" +sha256 = "653427f0f5014750aafff22727fb2aa60c6c732ca91808cfb78ce22ddd9e55f0" + +[build] +compiler = "zig-cc" +target = "x86_64-linux-musl" +link = "dynamic" + +[build.phases] +# bootstrap = configure de CMake. --parallel acelera el cmake mínimo. -- pasa flags al cmake final; +# CMAKE_USE_OPENSSL=OFF evita depender de openssl-dev (el bootstrap de rust no usa el https de cmake). +configure = "./bootstrap --prefix=/usr --parallel=\"$(nproc)\" -- -DCMAKE_BUILD_TYPE=Release -DCMAKE_USE_OPENSSL=OFF" +compile = "make -j\"$(nproc)\"" +install = "make install DESTDIR=/out" diff --git a/recipes/python3.toml b/recipes/python3.toml new file mode 100644 index 00000000..007286f1 --- /dev/null +++ b/recipes/python3.toml @@ -0,0 +1,33 @@ +# CPython 3.12.10 — dependencia de build del frente rust (variante b, SDD 11 §7.2b). +# +# El bootstrap de rust/LLVM corre scripts python3 (mrustc README: "python3, required for building llvm +# in rustc"). El toolchain Alpine lo trae como paquete; esta receta lo construye desde fuente para +# de-Alpinizar el camino de bootstrap de rust. +# +# python3 es una HERRAMIENTA del toolchain (corre scripts en build-time, no se enlaza en el 4/4): no +# necesita casar byte-a-byte con el de Alpine, sólo interpretar igual. Build vainilla, sin patches. +# +# CPython usa autotools (./configure). zlib viene de recipes/zlib.toml (deps.build → materialize en +# /usr); --without-ensurepip evita la red (pip), --disable-test-modules acorta el build (no se necesita +# el test-suite). Enlace dinámico: el intérprete linkea libpython/libc; estático no aporta a una +# herramienta de build-time y CPython estático es frágil. El sandbox exporta CC="zig cc -mcpu=baseline". + +name = "python3" +version = "3.12.10" + +[source] +tarball = "https://www.python.org/ftp/python/3.12.10/Python-3.12.10.tgz" +sha256 = "15d9c623abfd2165fe816ea1fb385d6ed8cf3c664661ab357f1782e3036a6dac" + +[build] +compiler = "zig-cc" +target = "x86_64-linux-musl" +link = "dynamic" + +[deps] +build = ["zlib"] + +[build.phases] +configure = "./configure --prefix=/usr --without-ensurepip --disable-test-modules --with-ensurepip=no" +compile = "make -j\"$(nproc)\"" +install = "make install DESTDIR=/out"