Skip to content

fix: keep macOS proc-macro dylibs loadable - #392

Merged
eval-exec merged 1 commit into
eval-exec:mainfrom
tag-und-nacht:fix-strum-macos-build
Sep 16, 2026
Merged

eval-exec merged 1 commit into
eval-exec:mainfrom
tag-und-nacht:fix-strum-macos-build

Conversation

@tag-und-nacht

Copy link
Copy Markdown
Contributor

On macOS 27.0 (Apple Silicon) with Rust 1.96.1, cargo xtask fresh-build --release failed while compiling strum with E0463 for strum_macros.

The underlying loader diagnostic was:
dlopen(.../libstrum_macros-*.dylib): mis-aligned LINKEDIT string pool

Cargo profile stripping was producing malformed proc-macro dylibs. Keep stripping disabled for release artifacts and optimized dev/build dependency overrides; debug = false still avoids embedding debug info.

Verification:

  • Exact CPATH/LIBRARY_PATH + cargo xtask fresh-build --release: passed
  • Full release compile and fresh Lisp generation/byte-compilation: passed
  • cargo test -p xtask: proc-macro compilation passed; 118/125 tests passed, with 7 pre-existing CI-contract/fixture failures unrelated to this change
  • git diff --check: passed

@tag-und-nacht

Copy link
Copy Markdown
Contributor Author

Note: Nix does not currently avoid this: it pins the same Rust 1.96.1 toolchain and does not pin a macOS SDK/linker. The host Apple linker may still be used inside nix develop, so the fix benefits both Nix and non-Nix builds.

@eval-exec eval-exec left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you

@eval-exec
eval-exec merged commit e91006f into eval-exec:main Sep 16, 2026
26 of 32 checks passed
@tag-und-nacht

Copy link
Copy Markdown
Contributor Author

@eval-exec This issue is relevant for macOS users: rust-lang/rust#157750

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