Oscar
12/25/2025, 12:27 AM> [build 6/6] RUN ldd /app/node_modules/.../baml.linux-x64-musl.node && exit 1:
0.122 /lib/ld-musl-x86_64.so.1 (0x7ffffff5a000)
0.123 libgcc_s.so.1 => /usr/lib/libgcc_s.so.1 (0x7ffffccaf000)
0.123 libc.so.6 => /lib/ld-musl-x86_64.so.1 (0x7ffffff5a000)
0.123 ld-linux-x86-64.so.2 => /lib/ld-linux-x86-64.so.2 (0x7ffffcca8000)
0.123 Error relocating /app/node_modules/.../baml.linux-x64-musl.node: __register_atfork: symbol not found
...
Admittedly, I'm a bit out of my depth here - but my understanding is that we shouldn't be seeing dynamic linking libraries with a musl output? This lead me to napi-rs.
Poking around the docs there, I see a nice example on how to do cross-compilation, curiously, I notice they are using the -x (equivalent to --cross-compile) [option](https://github.com/napi-rs/cross-build/blob/77d4d8cd22fff4d27588a35d8cd2f26be9b39bd4/.github/workflows/pure-rust-build-on-linux.yml#L33) for the musl targets (instead of --use-napi-cross). I wonder if reflecting this change would fix the issue?
I've attempted to try this locally, but I'm having a hard time getting the build to work - would anybody mind lending me a hand with this?
Oh, and Merry Christmas! 🎄Perryman
12/26/2025, 11:58 PMVaibhav (BAML 🐑)
12/29/2025, 5:34 PMOscar
12/30/2025, 10:44 AM--use-napi-cross):
require("@boundaryml/baml");
...
Error: Error loading shared library ld-linux-x86-64.so.2:
...
With the one I built locally (on my aarch64 mac) (with pnpm build:napi-release --target x86_64-unknown-linux-musl -x instead), the require executes as expected:
require("./baml.linux-x64-musl.node");
Now this isn't really my wheelhouse, but if it looks like it works... it probably works? 🤞 I'm wondering what the next steps are here, do you want me to make a PR updating the pipeline?Vaibhav (BAML 🐑)
12/30/2025, 1:38 PMOscar
12/30/2025, 5:02 PMVaibhav (BAML 🐑)
12/30/2025, 5:03 PMVaibhav (BAML 🐑)
12/30/2025, 5:04 PMapt-get update && apt-get install -y zigVaibhav (BAML 🐑)
12/30/2025, 5:04 PMaaronv (BAML)
12/30/2025, 5:05 PMaaronv (BAML)
12/30/2025, 5:55 PMaaronv (BAML)
12/30/2025, 6:12 PMaaronv (BAML)
12/30/2025, 6:39 PMaaronv (BAML)
12/30/2025, 6:42 PMaaronv (BAML)
12/30/2025, 6:42 PM