Repository navigation
Pin OPENSSL_ROOT_DIR in CI so the llama.cpp cold build finds OpenSSL - #1602
Conversation
llama.cpp's vendored cpp-httplib compiles with LLAMA_OPENSSL=ON and includes <openssl/err.h>. Homebrew's openssl@3 is not on CMake's default search path on the macOS runners, so find_package(OpenSSL) intermittently misses on a cold rust-cache and the llama-cpp-sys-2 build fails to compile cpp-httplib. Install openssl@3 and export OPENSSL_ROOT_DIR in both the test:all and test:e2e jobs so OpenSSL is located deterministically on every runner. Co-Authored-By: Claude Opus 4.8 <[email protected]>
|
APPROVE — correct root cause, canonical fix, and it's self-validated by its own cold-cache run. This is the right permanent kill for the flake that's been costing re-runs on #1600/#1601. Root cause is precisely diagnosed
The mechanism is canonical and correctly scoped
Applied to both jobs, self-validatingThe identical block lands in both Scope
Net: correct diagnosis + minimal, deterministic, self-proven fix. This ends the re-run-until-green waste. Approve. |
Summary
Kills the recurring
test:allflake where the Rust build fails with:Root cause
llama-cpp-sys-2builds vendoredllama.cpp, whoseCMakeLists.txtsetsoption(LLAMA_OPENSSL "..." ON)by default. With that on, the vendoredcpp-httplibcompiles withCPPHTTPLIB_OPENSSL_SUPPORTand#include <openssl/err.h>. On themacos-latestrunners, Homebrew'sopenssl@3is present but not on CMake's default search path, sofind_package(OpenSSL)intermittently fails to locate it and the compile errors on the missing header.It presents as intermittent because
swatinem/rust-cacheskips the compile entirely on a warm cache — the failure only surfaces on a cold cache (eviction, or a fork PR, which can't read the base repo's cache), which is exactly when a re-run "fixes" it. The crate'sbuild.rsonly forwardsCMAKE_*-prefixed env vars as CMake defines, soLLAMA_OPENSSL=OFFcan't be passed to disable it — the correct fix is to make OpenSSL discoverable.Fix
In both the
test:allandtest:e2ejobs, installopenssl@3and pinOPENSSL_ROOT_DIRto its Homebrew prefix sofind_package(OpenSSL)succeeds deterministically:No product code changes; runtime behavior is unaffected (the daemon does not use cpp-httplib — this only makes the vendored build compile reliably).
Validation
This PR is raised from a fork, so its own CI runs on a cold cache and rebuilds
llama-cpp-sys-2— a greentest:allhere directly exercises and confirms the fix (the very build that previously flaked).