Skip to content

ci: stop three macOS arm64 dylibs from colliding in the *-libraries merge - #388

Merged
bernardladenthin merged 1 commit into
bernardladenthin:mainfrom
linking12:fix/macos-dylib-artifact-collision
Aug 13, 2026
Merged

ci: stop three macOS arm64 dylibs from colliding in the *-libraries merge#388
bernardladenthin merged 1 commit into
bernardladenthin:mainfrom
linking12:fix/macos-dylib-artifact-collision

Conversation

@linking12

@linking12 linking12 commented Aug 12, 2026

Copy link
Copy Markdown

All three macOS arm64 build jobs write net/ladenthin/llama/Mac/aarch64/libjllama.dylib (none passes -DOS_NAME/-DOS_ARCH, so CMakeLists auto-detects the same subdir), and all three uploaded under a name ending in -libraries. The package, publish-snapshot and publish-release jobs then download pattern: "*-libraries" with merge-multiple: true into one directory, so three different dylibs land on one path.

The published dylib is consequently a hybrid: its ad-hoc linker signature no longer matches its own __TEXT pages, and macOS SIGKILLs any process that loads it. Verified on 5.0.6, 5.0.7-20260810.011118-18 and 5.0.7-20260811.201306-19 (66/4078 and 1141/4097 code pages fail their stored hashes); 5.0.7-20260801.013705-16 loads only because its foreign bytes happen to fall outside the signed range.

macOS arm64 is the only / with more than one artifact in the glob, which is why it is the only broken platform. Windows already avoids this by naming its MSVC variants outside the glob; this applies the same treatment to macOS:

macos-15-libraries -> macos-15-no-metal (test-only)
macos-14-libraries -> macos-14-metal (test-only)
macos-15-metal-libraries -> macos-15-metal (shipped, selected explicitly)

The variant that ships is now chosen by an explicit download step rather than by which artifact name happens to match a glob. macos-15-metal is the only build with both Metal and GGML_NATIVE=OFF, and it is what the current (corrupt) jars already report in their Mach-O header (minos 15.0 / sdk 15.5), so shipping it keeps the intended behaviour.

Summary

Test plan

  • Affected unit / integration tests pass locally
  • CI is green on this branch
  • Docs / CHANGELOG updated where applicable

Related issues / PRs

Checklist

  • I have read CONTRIBUTING.md and CODE_OF_CONDUCT.md
  • My commits follow Conventional Commits
  • No security-sensitive changes (if there are, I have notified the maintainer privately per SECURITY.md)

… merge

All three macOS arm64 build jobs write net/ladenthin/llama/Mac/aarch64/libjllama.dylib
(none passes -DOS_NAME/-DOS_ARCH, so CMakeLists auto-detects the same subdir), and all
three uploaded under a name ending in `-libraries`. The package, publish-snapshot and
publish-release jobs then download `pattern: "*-libraries"` with `merge-multiple: true`
into one directory, so three different dylibs land on one path.

The published dylib is consequently a hybrid: its ad-hoc linker signature no longer
matches its own __TEXT pages, and macOS SIGKILLs any process that loads it. Verified on
5.0.6, 5.0.7-20260810.011118-18 and 5.0.7-20260811.201306-19 (66/4078 and 1141/4097 code
pages fail their stored hashes); 5.0.7-20260801.013705-16 loads only because its foreign
bytes happen to fall outside the signed range.

macOS arm64 is the only <os>/<arch> with more than one artifact in the glob, which is why
it is the only broken platform. Windows already avoids this by naming its MSVC variants
outside the glob; this applies the same treatment to macOS:

  macos-15-libraries       -> macos-15-no-metal   (test-only)
  macos-14-libraries       -> macos-14-metal      (test-only)
  macos-15-metal-libraries -> macos-15-metal      (shipped, selected explicitly)

The variant that ships is now chosen by an explicit download step rather than by which
artifact name happens to match a glob. macos-15-metal is the only build with both Metal
and GGML_NATIVE=OFF, and it is what the current (corrupt) jars already report in their
Mach-O header (minos 15.0 / sdk 15.5), so shipping it keeps the intended behaviour.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@bernardladenthin bernardladenthin changed the title ci: stop three macOS arm64 dylibs from colliding in the *-libraries ci: stop three macOS arm64 dylibs from colliding in the *-libraries merge Aug 13, 2026
@bernardladenthin
bernardladenthin merged commit a31c44c into bernardladenthin:main Aug 13, 2026
1 check failed
@bernardladenthin

Copy link
Copy Markdown
Owner

Ty @linking12 👍

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