From 04e78ba4417c8b0cc811ddfe0822fca6c6e7e0a3 Mon Sep 17 00:00:00 2001 From: Rogue911 Date: Mon, 14 Sep 2026 09:47:21 +0200 Subject: [PATCH] buildenv: fix corecrypto image build Apple's public corecrypto archive changed shape and two files its CMake configuration expects are not shipped in it, so `docker build buildenv/` fails before producing the compiler image. - The archive now extracts to a year-suffixed directory plus __MACOSX, so the following WORKDIR misses. Normalise the name only when needed. - CMakeLists.txt includes scripts/code-coverage.cmake, an external helper from StableCoder/cmake-scripts that the download does not contain. - CoreCryptoSources.cmake expects corecrypto_static/ccrng_static.c while the archive ships that file at the top level; symlink it into place rather than editing Apple's CMake files. No source, flag or output changes: this only makes the dependency image build again. --- buildenv/Dockerfile | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/buildenv/Dockerfile b/buildenv/Dockerfile index 20c0458..1d6d1fa 100644 --- a/buildenv/Dockerfile +++ b/buildenv/Dockerfile @@ -8,7 +8,14 @@ RUN mkdir /buildenv WORKDIR /buildenv -RUN curl -JO 'https://developer.apple.com/file/?file=security&agree=Yes' -H 'Referer: https://developer.apple.com/security/' && unzip corecrypto.zip +RUN curl -JO 'https://developer.apple.com/file/?file=security&agree=Yes' -H 'Referer: https://developer.apple.com/security/' && unzip corecrypto.zip && rm -rf __MACOSX && (test -d corecrypto || mv corecrypto-*/ corecrypto) +# Apple's zip references scripts/code-coverage.cmake but doesn't ship it - it's an +# external helper from https://github.com/StableCoder/cmake-scripts that CMakeLists.txt +# assumes is present (normally added via a submodule/build step not included in the zip). +RUN mkdir -p /buildenv/corecrypto/scripts && curl -sL -o /buildenv/corecrypto/scripts/code-coverage.cmake "https://raw.githubusercontent.com/StableCoder/cmake-scripts/main/code-coverage.cmake" +# CoreCryptoSources.cmake references "corecrypto_static/ccrng_static.c" but the public zip +# ships the file flat at the top level - symlink it into place under the expected path. +RUN mkdir -p /buildenv/corecrypto/corecrypto_static && ln -s ../ccrng_static.c /buildenv/corecrypto/corecrypto_static/ccrng_static.c WORKDIR /buildenv/corecrypto RUN mkdir build; cd build; CC=clang CXX=clang++ cmake ..; WORKDIR /buildenv/corecrypto/build