Skip to content

install-deps: pin delta build to newer GCC on Ubuntu 20.04 arm64 - #881

Merged
Nox-MSFT merged 1 commit into
developfrom
user/wewilair/fix-ubuntu2004-delta-cxx20
Jun 23, 2026
Merged

install-deps: pin delta build to newer GCC on Ubuntu 20.04 arm64#881
Nox-MSFT merged 1 commit into
developfrom
user/wewilair/fix-ubuntu2004-delta-cxx20

Conversation

@Nox-MSFT

@Nox-MSFT Nox-MSFT commented Jun 1, 2026

Copy link
Copy Markdown
Contributor

The delta library's src/native/build.sh hard-codes triplet-prefixed compiler paths (e.g. /usr/bin/aarch64-linux-gnu-g++) and passes them to CMake via -DCMAKE_C_COMPILER / -DCMAKE_CXX_COMPILER, ignoring the CC/CXX env vars and the unprefixed update-alternatives we already set.

On Ubuntu 20.04 arm64 the default aarch64-linux-gnu-g++ is GCC 9, which lacks the C++20 header that the delta sources require, so the build fails with: fatal error: span: No such file or directory.

Fix: patch the cloned build.sh to honor CC/CXX as fallback defaults, and set CC/CXX (scoped to the child process) only when the triplet's default g++ is actually older than the gcc_ver we just installed. This leaves debian11-arm64 (g++ 10), ubuntu2204-arm64 (g++ 11) and amd64 (already aliased via alternatives) untouched.

@Nox-MSFT
Nox-MSFT requested a review from chgennar June 1, 2026 22:36
@Nox-MSFT
Nox-MSFT marked this pull request as ready for review June 22, 2026 21:06
The delta library's src/native/build.sh hard-codes triplet-prefixed compiler
paths (e.g. /usr/bin/aarch64-linux-gnu-g++) and passes them to CMake via
-DCMAKE_C_COMPILER / -DCMAKE_CXX_COMPILER, ignoring the CC/CXX env vars
and the unprefixed update-alternatives we already set.

On Ubuntu 20.04 arm64 the default aarch64-linux-gnu-g++ is GCC 9, which
lacks the C++20 <span> header that the delta sources require, so the
build fails with: fatal error: span: No such file or directory.

Fix: patch the cloned build.sh to honor CC/CXX as fallback defaults, and
set CC/CXX (scoped to the child process) only when the triplet's default
g++ is actually older than the gcc_ver we just installed. This leaves
debian11-arm64 (g++ 10), ubuntu2204-arm64 (g++ 11) and amd64 (already
aliased via alternatives) untouched.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@Nox-MSFT
Nox-MSFT force-pushed the user/wewilair/fix-ubuntu2004-delta-cxx20 branch from 56038d6 to 9f94969 Compare June 23, 2026 21:51
@Nox-MSFT

Copy link
Copy Markdown
Contributor Author

Rebased onto latest develop

Force-pushed a rebase of this branch onto current develop (was ~10 commits behind). The branch now also contains:

About the earlier container-job (debian:11, arm64) failure

That failure was not a code/compiler problem — it was a transient apt mirror error while fetching gdb:

Err:9 ... gdb arm64 10.1-1.7  Error reading from server - read (104: Connection reset by peer)
E: Failed to fetch .../gdb_10.1-1.7_arm64.deb

debian:11 ships g++ 10, which already supports the C++20 <span> this PR is about, so debian11-arm64 is a healthy target. The job failed only because this branch predated #885's apt-retry hardening. The rebase pulls that in, so the re-triggered run should be resilient to the flaky download. (No need to drop debian:11, arm64 from the matrix.)

Note on scope — merge vs. supersede

develop's CI now excludes ubuntu:20.04 + arm64 (the exact combination this PR fixes), citing the GCC‑9/<span> issue and Ubuntu 20.04 being EOL (April 2025). As a result, after the rebase this PR has no effect on CI; it only benefits manual/local delta-handler builds on Ubuntu 20.04 arm64.

Two coherent options for maintainers:

  • Merge — to keep manual Ubuntu 20.04 arm64 delta builds working, or
  • Close as superseded — if Ubuntu 20.04 arm64 is no longer a supported target given the EOL exclusion.

@Nox-MSFT
Nox-MSFT merged commit c83ba14 into develop Jun 23, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants