Skip to content

buildenv: fix corecrypto image build (archive layout and missing cmake inputs) - #136

Open
Rogue911 wants to merge 1 commit into
NyaMisty:newfrom
Rogue911:fix/buildenv-and-ldid-ios26
Open

Rogue911 wants to merge 1 commit into
NyaMisty:newfrom
Rogue911:fix/buildenv-and-ldid-ios26

Conversation

@Rogue911

Copy link
Copy Markdown

The buildenv image no longer builds. Apple's public corecrypto archive changed shape,
and two files that its CMake configuration expects are not present in it. Each failure
stops the docker build before the compiler image is produced, so the project cannot be
built from a clean checkout.

Three independent problems, each fixed in buildenv/Dockerfile:

1. The archive no longer extracts to corecrypto/

unzip corecrypto.zip now produces a year-suffixed directory (corecrypto-2024/) plus a
__MACOSX/ metadata directory, so the following WORKDIR /buildenv/corecrypto fails. The
fix removes the metadata directory and normalises the name only when needed, so it keeps
working if Apple reverts to the old layout:

&& rm -rf __MACOSX && (test -d corecrypto || mv corecrypto-*/ corecrypto)

2. scripts/code-coverage.cmake is referenced but not shipped

corecrypto's CMakeLists.txt does include(scripts/code-coverage.cmake). That file is not
part of the archive; it is an external helper from
StableCoder/cmake-scripts, normally added
through a submodule or build step that the public download does not include. The fix
fetches it into scripts/ before configuring.

3. CoreCryptoSources.cmake expects corecrypto_static/ccrng_static.c

The archive ships ccrng_static.c at the top level instead, so configuration fails on a
missing source. The fix symlinks it into the expected path rather than editing Apple's
CMake files, which keeps the change minimal and survives content updates.

Notes

  • No source, build flag or output changes — this only makes the dependency image build
    again. The resulting compiler image produces the same binary as before.
  • Verified by building buildenv/ from a clean checkout. All three failures occur while
    configuring and building corecrypto, which completes with these fixes and stops before
    them without. The image produced from this Dockerfile then compiles the project using the
    same command the CI workflow uses (make -f ../Makefile -j3 from build/), finishing
    with only the pre-existing -Wreturn-type warnings.

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.
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.

1 participant