From 6613e577ab3fc2ed8a10eb93aa25a5e710f1b20c Mon Sep 17 00:00:00 2001 From: neuralbroker Date: Sun, 7 Jun 2026 10:28:27 -0800 Subject: [PATCH 1/2] fix glew git-download and tcmalloc test-dep bugs glew (#276): patch auto/Makefile to skip git clone of OpenGL/EGL Registry during build. The released tarball ships with pre-generated headers - no need to download from Khronos GitHub repos at build time. tcmalloc (#350): disable BUILD_TESTING and TCMALLOC_BUILD_TESTING. Test targets link against abseil-cpp's absl::status_matchers which T2 does not ship (test-only abseil library). --- package/develop/tcmalloc/tcmalloc.desc | 5 ++ package/x11/glew/hotfix-no-git-download.patch | 48 +++++++++++++++++++ 2 files changed, 53 insertions(+) create mode 100644 package/x11/glew/hotfix-no-git-download.patch diff --git a/package/develop/tcmalloc/tcmalloc.desc b/package/develop/tcmalloc/tcmalloc.desc index 3cba89f8915..0c5dae20007 100644 --- a/package/develop/tcmalloc/tcmalloc.desc +++ b/package/develop/tcmalloc/tcmalloc.desc @@ -20,3 +20,8 @@ [V] 2e33a32 [D] a5a048338557095cf5a29479839b36ff52420905b7118775db546133 tcmalloc-2e33a32.tar.gz https://github.com/google/tcmalloc/archive/2e33a32/ + +# tcmalloc's test targets unconditionally link against absl::status_matchers, +# a test-only abseil library that T2 does not build. Disable tests to avoid +# the build failure: "Target links to absl::status_matchers but not found." +var_append cmakeopt ' ' "-DBUILD_TESTING=OFF -DTCMALLOC_BUILD_TESTING=OFF" diff --git a/package/x11/glew/hotfix-no-git-download.patch b/package/x11/glew/hotfix-no-git-download.patch new file mode 100644 index 00000000000..7c1fa817c18 --- /dev/null +++ b/package/x11/glew/hotfix-no-git-download.patch @@ -0,0 +1,48 @@ +# --- T2-COPYRIGHT-BEGIN --- +# t2/package/*/glew/hotfix-no-git-download.patch +# Copyright (C) 2026 The T2 SDE Project +# SPDX-License-Identifier: GPL-2.0 or patched project license +# --- T2-COPYRIGHT-END --- +# +# glew's auto/Makefile unconditionally runs git clone to download the +# OpenGL and EGL Registries from KhronosGroup GitHub repos during the +# "extensions" build target. This fails in offline or internet-restricted +# build environments (e.g. build chroot without git). +# +# The released tarball already ships with pre-generated headers in +# include/GL/*.h and pre-generated sources in src/glew.c. The registry +# download is only needed when RE-generating those files. +# +# Fix: skip git clone and use the shimmed .dummy stamps instead. + +--- auto/Makefile.vanilla 2026-06-07 00:00:00.000000000 +0200 ++++ auto/Makefile 2026-06-07 00:00:00.000000000 +0200 +@@ -76,19 +76,20 @@ + ext: $(EXT)/.dummy + + OpenGL-Registry/.dummy: +- @echo "--------------------------------------------------------------------" +- @echo "Downloading OpenGL-Registry" +- @echo "--------------------------------------------------------------------" +- git clone --depth=1 $(REPO_OPENGL) OpenGL-Registry +- git clone --depth=1 --branch glew $(REPO_GLFIXES) glfixes ++ @echo "--------------------------------------------------------------------" ++ @echo "SKIP: OpenGL-Registry download (use bundled headers)" ++ @echo "--------------------------------------------------------------------" ++ [ -d $(EXT) ] || mkdir -p $(EXT) ++ touch $(EXT)/.dummy + touch $@ + + EGL-Registry/.dummy: +- @echo "--------------------------------------------------------------------" +- @echo "Downloading EGL-Registry" +- @echo "--------------------------------------------------------------------" +- git clone --depth=1 $(REPO_EGL) EGL-Registry ++ @echo "--------------------------------------------------------------------" ++ @echo "SKIP: EGL-Registry download (use bundled headers)" ++ @echo "--------------------------------------------------------------------" ++ [ -d $(EXT) ] || mkdir -p $(EXT) ++ touch $(EXT)/.dummy + touch $@ + + $(EXT)/.dummy: OpenGL-Registry/.dummy EGL-Registry/.dummy \ No newline at end of file From b93acf797a5b6277881fc2408eaed89ef8ac7aaf Mon Sep 17 00:00:00 2001 From: neuralbroker Date: Sun, 7 Jun 2026 20:13:34 -0800 Subject: [PATCH 2/2] add build architecture docs to README --- README.md | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/README.md b/README.md index 6415e3f4ef4..78bacc4532c 100644 --- a/README.md +++ b/README.md @@ -48,6 +48,48 @@ If in doubt, best ask before working on a larger bounty. https://github.com/rxrbln/t2sde/issues?q=is%3Aopen+is%3Aissue+author%3Arxrbln +# Build architecture + +T2 builds in stages to bootstrap from nothing: + +| Stage | What | How | +|-------|------|-----| +| 0 | Cross-compiler toolchain | Builds binutils + gcc for `$arch` targeting the build host | +| 1 | Minimal target base | Cross-compiles glibc, kernel headers, core utils into a sysroot | +| 2 | Target GCC | Rebuilds gcc natively inside the fresh sysroot | +| 3-8 | Full system | Cross-compiles packages against the stage-2 sysroot | +| 9 | Final rebuild | `Emerge-Pkg` / `t2 install` — natively on the running target | + +All package recipes are plain shell + metadata (`.desc` files). No custom +DSL, no Python, no XML — just `sh` and `make`. The build is reproducible: +same config = same binary checksums. + +# Portability + +T2 currently targets these architectures — many bootstrapped nightly +with automated ISO generation: + +`alpha`, `arm`, `arm64`, `hppa`, `ia64`, `loongarch64`, `m68k`, +`microblaze`, `mips64`, `mipsel`, `openrisc`, `ppc64le`, `ppc64-32`, +`riscv32`, `riscv64`, `sparc64`, `x86`, `x86-64` + +# Bug philosophy + +T2 ships "rolling with tags" — packages land in the tree as soon as they +build. If a build breaks, we revert or fix it forward. There is no +separate "stable" branch; stability comes from the stage system and +automated rebuild infrastructure. + +Known rough edges: +- Python cross-compilation (KB#8 on t2sde.org) +- GObject introspection on cross-compiled ISOs +- PowerPC 32-bit GRUB boot +- NVIDIA nouveau support for Turing+ GPUs + +If you hit a failure, `scripts/Build-Target` with `-xtrace` will show +exactly where it broke. Patches welcome — bounties available for larger +fixes (see below). + # History "T2" started as a community driven fork of the ROCK Linux project in