From 3c07e54d9037a6fa2256c68180bb37880173d9da Mon Sep 17 00:00:00 2001 From: nodemode-ai Date: Tue, 1 Dec 2026 17:30:46 -0500 Subject: [PATCH] fix(style): build the style module unstripped so macOS loads it On macOS 26 and newer, rustc 1.97's strip leaves the library's LINKEDIT string pool misaligned and dyld refuses it (mis-aligned LINKEDIT string pool). The release profile and its build-override now set strip = false, as every other Rust build in the family does. The CHANGELOG's 0.15.0 section lists the fix. --- CHANGELOG.md | 1 + native/formcite-style/Cargo.toml | 5 +++++ native/formcite-style/HASHOUT_LOG.md | 7 +++++++ 3 files changed, 13 insertions(+) create mode 100644 native/formcite-style/HASHOUT_LOG.md diff --git a/CHANGELOG.md b/CHANGELOG.md index e44f17b..0706620 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -24,6 +24,7 @@ FormCite now builds into a desktop app for macOS, Windows and Linux, and the win - **The Needs a title view** had lost the line height of its rows. They have it again. - **On a Mac, if the system menu could not be built,** the window's own menu bar now opens in its place. - **Stopping the engine now closes the dock's tabs and their tokens** instead of leaving them to the next start. +- **On a Mac with macOS 26 or newer, building FormCite stopped** right after the citation style engine was built: the engine could not load it ("mis-aligned LINKEDIT string pool"). The style engine is now built the way the family's other Rust parts are, so it loads. ### Known issues - Each agent tab leaves a revoked token named after it, such as "Claude Code tab", in Connections after the tab closes. There is no way to delete one yet. diff --git a/native/formcite-style/Cargo.toml b/native/formcite-style/Cargo.toml index 7a02173..bb56f50 100644 --- a/native/formcite-style/Cargo.toml +++ b/native/formcite-style/Cargo.toml @@ -21,3 +21,8 @@ serde_json = "1" opt-level = 3 lto = "thin" codegen-units = 16 +strip = false + +[profile.release.build-override] +strip = false +debug = false diff --git a/native/formcite-style/HASHOUT_LOG.md b/native/formcite-style/HASHOUT_LOG.md new file mode 100644 index 0000000..8fe3820 --- /dev/null +++ b/native/formcite-style/HASHOUT_LOG.md @@ -0,0 +1,7 @@ +# formcite-style HASHOUT_LOG + +The living log of the citation style module (Rust, Hayagriva behind pyo3). The build and the regression gate are in `docs/STYLE_ENGINE_BUILD.md`. + +## Cargo.toml ยท the release build is not stripped (v0.15.0) {#style-no-strip} + +On the owner's Mac (macOS 26 or newer, rustc 1.97.1), `./build_app` built the module with `maturin develop --release` and the import then failed: `dlopen(... formcite_style.abi3.so): mis-aligned LINKEDIT string pool, fileOffset=0x0072AD3C`. Cargo's release profile strips debug information by default since 1.77, and on Apple targets rustc strips by rewriting the linked library with its bundled `rust-objcopy`, which can leave the LC_SYMTAB string pool 4 bytes off an 8-byte boundary; newer macOS dyld refuses such a library (rust-lang/rust#157750, fixed upstream in Rust 1.98). Apple's linker writes the pool aligned, so the release profile now sets `strip = false`, and `[profile.release.build-override]` sets `strip = false` and `debug = false` so the build scripts and proc macros rustc loads are never stripped either. This is the family's setting: FormVis's `native/formvis-kernels` and every app's `src-tauri` already carry it. The module carries no debug information either way; the library is somewhat larger with its symbols kept. Linux was rebuilt with the new profile (`cargo build --release --locked`, 2 m 13 s); the macOS load was not run here.