Skip to content

Commit

Permalink
Fix libstdc++-not-found error
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
tautschnig committed Nov 14, 2023
1 parent 130fd65 commit 7320b81
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions .github/workflows/pull-request-check-rust-api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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;\
Expand Down

0 comments on commit 7320b81

Please sign in to comment.