Skip to content

fix: fetch BoringSSL with CMake older than 3.24 - #1144

Merged
0xShug0 merged 1 commit into
0xShug0:mainfrom
Liquid4All:httplib-cmake-pre-3-24
Oct 30, 2026
Merged

0xShug0 merged 1 commit into
0xShug0:mainfrom
Liquid4All:httplib-cmake-pre-3-24

Conversation

@ykhrustalev

Copy link
Copy Markdown
Contributor

Problem
DOWNLOAD_EXTRACT_TIMESTAMP is new in CMake 3.24, but the root CMakeLists.txt accepts 3.20. Older CMake folds it into URL_HASH, so -DAUDIOCPP_BUILD_NATIVE_MODEL_MANAGER=ON with the bundled BoringSSL fails to configure on CMake 3.22 and 3.23 (the pinned BoringSSL needs 3.22), e.g. Ubuntu 22.04's packaged 3.22.1.

Solution

  • Collects the BoringSSL fetch arguments in AUDIOCPP_BORINGSSL_FETCH_ARGS, the pattern ggml already uses for KleidiAI
  • Appends DOWNLOAD_EXTRACT_TIMESTAMP TRUE only when CMAKE_VERSION is 3.24 or newer; older CMake already keeps the archive timestamps, so behavior is unchanged

Testing

  • Linux, CUDA 12.8, CMake 3.22.1: without this change, configuring with -DAUDIOCPP_BUILD_NATIVE_MODEL_MANAGER=ON fails with URL_HASH is set to SHA256=...;DOWNLOAD_EXTRACT_TIMESTAMP;TRUE but must be ALGO=value; with it, configure is clean and audiocpp_server, audiocpp_cli and audiocpp_model_manager build
  • macOS, Metal (M3 Max), CMake 3.22.3: the same failure without this change; with it, configure succeeds and audiocpp_model_manager builds
  • macOS, Metal (M3 Max), CMake 4.1.6: configure prints no CMP0135 warning, and audiocpp_server, audiocpp_cli and audiocpp_model_manager build
  • macOS, both CMake versions: all 8,635 extracted BoringSSL source files keep the archive timestamp, and audiocpp_model_manager info qwen3_asr_0_6b_q8_0 --remote succeeds over HTTPS (state ok, 1,151,279,968 bytes)
# CMake 3.22.3 (nixpkgs 22.05) first on PATH: fails before, configures and builds after
scripts/build_metal.sh --native-model-manager --target audiocpp_model_manager
# CMake 4.1.6
scripts/build_metal.sh --native-model-manager --target audiocpp_server --target audiocpp_cli --target audiocpp_model_manager
build/macos-metal-release/bin/audiocpp_model_manager info qwen3_asr_0_6b_q8_0 --remote

DOWNLOAD_EXTRACT_TIMESTAMP is new in CMake 3.24. Older versions, which the
root CMakeLists.txt still accepts, fold it into URL_HASH and fail to
configure, so the option is passed only to a CMake that knows it.
@0xShug0
0xShug0 merged commit 141ec6f into 0xShug0:main Oct 30, 2026
7 checks passed
@0xShug0

0xShug0 commented Oct 30, 2026

Copy link
Copy Markdown
Owner

@ykhrustalev Thanks! PR merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants