Skip to content

Build aarch64 Linux distributions on Debian 13 with a Debian 9 sysroot - #1241

Open
jjhelmus wants to merge 1 commit into
mainfrom
jjh/modern_base_with_sysroot
Open

Build aarch64 Linux distributions on Debian 13 with a Debian 9 sysroot#1241
jjhelmus wants to merge 1 commit into
mainfrom
jjh/modern_base_with_sysroot

Conversation

@jjhelmus

Copy link
Copy Markdown
Contributor

Use modern Debian 13 (Trixie) build containers to build Linux aarch64 distribution with a sysroot from Debian 9 (Stretch) to preserving compatibility with glibc 2.17.

  • Update aarch64 containers to Debian Trixie
  • Create an aarch64 sysroot from Debian Stretch cross-development packages.
  • Configure GNU builds to compile and link against the legacy sysroot.
  • Remove container-specific sysroot flags from sysconfig.

Build aarch64 distributions on Debian Trixie while
preserving glibc 2.17 compatibility through a Debian Stretch sysroot.
Keep the host tools isolated from target libraries and remove sysroot
flags from installed Python configuration.
@jjhelmus jjhelmus added platform:linux Specific to the Linux platform arch:aarch64 python:all Select all Python versions build:all labels Aug 27, 2026
@jjhelmus

Copy link
Copy Markdown
Contributor Author

This approach could also be applied to x86-64 with a Trixie build image and sysroot constructed from Jessie's *-amd64-cross packages.

Separating the build host from the target sysroot allows the LLVM package to be built for Trixie rather than an older Debian release. LLVM is a host tool, so it only needs to run in the modern build container. The GCC toolchain currently embedded in the LLVM package does need to be considered. It can likely be removed and replaced by Debian -cross packages in the sysroot.

@jjhelmus
jjhelmus requested review from EliteTK and zanieb August 27, 2026 22:22
@jjhelmus

Copy link
Copy Markdown
Contributor Author

Jessie's *-amd64-cross packages
I checked and Jessie predates Debian's cross-toolchain packages. The sysroot could be constructed from regular packages and copied into a sysroot. Some fixup for absolute symlinks and embedded paths might be needed.

# sysconfig would make downstream extension builds search a nonexistent root.
for flag in os.environ.get("EXTRA_TARGET_CFLAGS", "").split():
if flag.startswith("--sysroot="):
replace_in_all(flag, "")

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This actually misses the contents of lib/python3.14/_sysconfig_vars_*.json, it's just metadata though, sysconfig doesn't read it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

arch:aarch64 build:all platform:linux Specific to the Linux platform python:all Select all Python versions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants