From b2549cb41e24987500a0ca27b521d7ea29039e2b Mon Sep 17 00:00:00 2001 From: Michael Tautschnig Date: Tue, 14 Nov 2023 12:08:16 +0000 Subject: [PATCH] Fix libstdc++-not-found error See https://github.com/diffblue/cbmc/actions/runs/6856483568/job/18643716705?pr=6749 for one example of the failure: cargo-induced clang runs (via the cc crate) weren't finding the C++ library (which ought to be libc++ and not libstdc++ on this MacOS target). This appears to be caused by the minimum build target being too low (where the cc crate is the one setting that minimum). Override that by setting an environment variable. See https://github.com/rust-lang/cc-rs/blob/2d6a3b2119cf5eacc01e1f2877e064a7aede7819/src/lib.rs#L3497C52-L3497C76 for the Rust code implementing the logic. --- .github/workflows/pull-request-check-rust-api.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/pull-request-check-rust-api.yaml b/.github/workflows/pull-request-check-rust-api.yaml index a66a0ef6ecf..35865abac33 100644 --- a/.github/workflows/pull-request-check-rust-api.yaml +++ b/.github/workflows/pull-request-check-rust-api.yaml @@ -102,6 +102,7 @@ jobs: # by the other jobs already present in `pull-request-checks.yaml`. - name: Run Rust API tests run: | + export MACOSX_DEPLOYMENT_TARGET=10.15 VERSION=$(cat src/config.inc | python3 -c "import sys,re;line = [line for line in sys.stdin if re.search(r'CBMC_VERSION = (\d+\.\d+\.\d+)', line)];sys.stdout.write(re.search(r'CBMC_VERSION = (\d+\.\d+\.\d+)', line[0]).group(1))") cd src/libcprover-rust;\ cargo clean;\