From f089a3762649b432ac5e33b9a63a60cd3a1096ab Mon Sep 17 00:00:00 2001 From: Alessandro Decina Date: Wed, 24 Apr 2024 20:58:45 +1000 Subject: [PATCH] chore(ci): fix bpf-linker link failure on macos Force bpf-linker to always be rebuilt/relinked. Before this change we were always installing latest llvm from brew, but not always rebuilding bpf-linker, which could lead to: Run cargo install bpf-linker --git https://github.com/aya-rs/bpf-linker.git --rev 821f92990074cb7e950e25129dcd55e20424cede --no-default-features Updating git repository `https://github.com/aya-rs/bpf-linker.git` Ignored package `bpf-linker v0.9.10 (https://github.com/aya-rs/bpf-linker.git?rev=821f92990074cb7e950e25129dcd55e20424cede#821f9299)` is already installed, use --force to override And then: warning: integration-test@0.1.0: error: linking with `bpf-linker` failed: signal: 6 (SIGABRT) warning: integration-test@0.1.0: = note: dyld[17642]: Library not loaded: '/usr/local/opt/z3/lib/libz3.4.12.dylib' warning: integration-test@0.1.0: Referenced from: '/Users/runner/.cargo/bin/bpf-linker' --- .github/workflows/ci.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8945649f..acf8a0df 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -256,9 +256,10 @@ jobs: - name: bpf-linker if: runner.os == 'macOS' - # NB: rustc doesn't ship libLLVM.so on macOS, so disable proxying (default feature). + # NB: rustc doesn't ship libLLVM.so on macOS, so disable proxying (default feature). We also + # --force so that bpf-linker gets always relinked against the latest LLVM installed by brew. # Remove --rev when LLVM18 is released. - run: cargo install bpf-linker --git https://github.com/aya-rs/bpf-linker.git --rev 821f92990074cb7e950e25129dcd55e20424cede --no-default-features + run: cargo install --force bpf-linker --git https://github.com/aya-rs/bpf-linker.git --rev 821f92990074cb7e950e25129dcd55e20424cede --no-default-features - name: Download debian kernels if: runner.arch == 'ARM64'