From: Remi Gacogne Date: Fri, 14 Mar 2025 13:17:57 +0000 (+0100) Subject: dnsdist: Upgrade clang to 19 in our CI X-Git-Tag: dnsdist-2.0.0-alpha1~2^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e09ac66042ee735e3591105bb9c6bdd54e84d9a4;p=thirdparty%2Fpdns.git dnsdist: Upgrade clang to 19 in our CI To get rid of the `WARNING: Symbolizer buffer too small` warning, which is caused by big backtraces, and fixed in clang >= 15 by using a dynamic symbolizer buffer size. I only upgrade it for dnsdist because of a compatibility issue between `libfaketime` and the ASAN implementation in recent versions of `clang`: https://github.com/wolfcw/libfaketime/issues/365 It seems to be fixed in the `libfaketime` repository. There has not been any release since the fix, but I guess we could compile from a more recent commit. --- diff --git a/.github/workflows/build-and-test-all.yml b/.github/workflows/build-and-test-all.yml index 71ac5f9e81..65b361b432 100644 --- a/.github/workflows/build-and-test-all.yml +++ b/.github/workflows/build-and-test-all.yml @@ -234,6 +234,7 @@ jobs: container: image: "${{ needs.get-runner-container-image.outputs.id }}:${{ needs.get-runner-container-image.outputs.tag }}" env: + CLANG_VERSION: '19' SANITIZERS: ${{ matrix.sanitizers }} UBSAN_OPTIONS: "print_stacktrace=1:halt_on_error=1:suppressions=${{ env.REPO_HOME }}/build-scripts/UBSan.supp" UNIT_TESTS: yes @@ -267,6 +268,8 @@ jobs: python3 -m venv ${REPO_HOME}/.venv . ${REPO_HOME}/.venv/bin/activate && pip install -r ${REPO_HOME}/meson/requirements.txt working-directory: . + - run: ${{ env.INV_CMD }} install-clang + working-directory: . - run: ${{ env.INV_CMD }} install-lld-linker-if-needed working-directory: ./pdns/dnsdistdist/ - run: ${{ env.INV_CMD }} ci-install-rust ${{ env.REPO_HOME }} @@ -765,6 +768,7 @@ jobs: container: image: "${{ needs.get-runner-container-image.outputs.id }}:${{ needs.get-runner-container-image.outputs.tag }}" env: + CLANG_VERSION: '19' UBSAN_OPTIONS: "print_stacktrace=1:halt_on_error=1:suppressions=${{ env.REPO_HOME }}/build-scripts/UBSan.supp" # Disabling (intercept_send=0) the custom send wrappers for ASAN and TSAN because they cause the tools to report a race that doesn't exist on actual implementations of send(), see https://github.com/google/sanitizers/issues/1498 ASAN_OPTIONS: intercept_send=0 diff --git a/tasks.py b/tasks.py index e9de549026..f4bf4abd36 100644 --- a/tasks.py +++ b/tasks.py @@ -178,7 +178,10 @@ def install_clang(c): """ install clang and llvm """ - c.sudo(f'apt-get -y --no-install-recommends install clang-{clang_version} llvm-{clang_version}') + if int(clang_version) >= 14: + c.sudo(f'apt-get -y --no-install-recommends install clang-{clang_version} llvm-{clang_version} llvm-{clang_version}-dev libclang-rt-{clang_version}-dev') + else: + c.sudo(f'apt-get -y --no-install-recommends install clang-{clang_version} llvm-{clang_version} llvm-{clang_version}-dev') @task def install_clang_tidy_tools(c): @@ -187,7 +190,10 @@ def install_clang_tidy_tools(c): @task def install_clang_runtime(c): # this gives us the symbolizer, for symbols in asan/ubsan traces - c.sudo(f'apt-get -y --no-install-recommends install clang-{clang_version}') + # on Debian we need llvm-symbolizer-XX + #c.sudo(f'apt-get -y --no-install-recommends install llvm-symbolizer-{clang_version}') + # on Ubuntu we need llvm-XX instead + c.sudo(f'apt-get -y --no-install-recommends install llvm-{clang_version}') @task def ci_install_rust(c, repo):