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>
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.