From ca78607d2fe8d3276c71c246c813535d7aa904e3 Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Sat, 9 Nov 2024 03:16:17 +0100 Subject: [PATCH] try installing libstdc++ 4 --- _build.sh | 25 +++++++++++++++++++------ _ci-linux-debian.sh | 7 +++++++ 2 files changed, 26 insertions(+), 6 deletions(-) diff --git a/_build.sh b/_build.sh index d4b4bd598..ac68a4e14 100755 --- a/_build.sh +++ b/_build.sh @@ -1127,13 +1127,26 @@ build_single_target() { # https://packages.debian.org/testing/all/libstdc++-13-dev-arm64-cross/filelist # /usr/aarch64-linux-gnu/include/c++/13/ tmp="$(find "/usr/${_TRIPLETSH}/include/c++" -mindepth 1 -maxdepth 1 -type d | head -n 1 || true)" - if [ -z "${tmp}" ]; then - >&2 echo '! Error: Failed to detect g++-cross env root.' - exit 1 + if [ -n "${tmp}" ]; then + _CXXFLAGS_GLOBAL+=" -I${tmp}" + _CXXFLAGS_GLOBAL+=" -I${tmp}/${_TRIPLETSH}" + _CXXFLAGS_GLOBAL+=" -I${tmp}/backward" + else + # https://packages.debian.org/trixie/arm64/libstdc++-12-dev/filelist + # /usr/include/c++/12/algorithm + # /usr/include/aarch64-linux-gnu/c++/12/ext/opt_random.h + tmp1="$(find "/usr/include/c++" -mindepth 1 -maxdepth 1 -type d | head -n 1 || true)" + tmp2="$(find "/usr/include/${_TRIPLETSH}/c++" -mindepth 1 -maxdepth 1 -type d | head -n 1 || true)" + if [ -n "${tmp1}" ] && \ + [ -n "${tmp2}" ]; then + _CXXFLAGS_GLOBAL+=" -I${tmp1}" + _CXXFLAGS_GLOBAL+=" -I${tmp2}" + _CXXFLAGS_GLOBAL+=" -I${tmp1}/backward" + else + >&2 echo '! Error: Failed to detect g++-cross env root.' + exit 1 + fi fi - _CXXFLAGS_GLOBAL+=" -I${tmp}" - _CXXFLAGS_GLOBAL+=" -I${tmp}/${_TRIPLETSH}" - _CXXFLAGS_GLOBAL+=" -I${tmp}/backward" fi fi diff --git a/_ci-linux-debian.sh b/_ci-linux-debian.sh index 22e63f915..899393b82 100755 --- a/_ci-linux-debian.sh +++ b/_ci-linux-debian.sh @@ -100,6 +100,13 @@ elif [[ "${CW_CONFIG:-}" = *'linux'* ]]; then extra+=" libc6-dev-arm64-cross" fi [[ "${CW_CONFIG:-}" = *'r64'* ]] && extra+=" libc6-dev-riscv64-cross" + + if [ "$(uname -m)" = 'aarch64' ]; then + extra+=" libc6-dev-amd64-cross libstdc++${CW_GCCSUFFIX}-dev-amd64-cross" + else + extra+=" libc6-dev-arm64-cross libstdc++${CW_GCCSUFFIX}-dev-arm64-cross" + fi + [[ "${CW_CONFIG:-}" = *'r64'* ]] && extra+=" libc6-dev-riscv64-cross libstdc++${CW_GCCSUFFIX}-dev-riscv64-cross" fi if [[ "${CW_CONFIG:-}" = *'boringssl'* ]] || [[ "${CW_CONFIG:-}" = *'awslc'* ]]; then if [ "$(uname -m)" = 'aarch64' ]; then