My typst package was recently updated, and I wanted to release a new version. I am using rustler precompiled to precompile the rust bindings to typst.
although the change to the code was minimal, the compilation for 2 targets fails with a segfault.
Compiling typst_nif v0.1.1 (/home/runner/work/typst/typst/native/typst_nif)
error: rustc interrupted by SIGSEGV, printing backtrace
...
help: you can increase rustc's stack size by setting RUST_MIN_STACK=16777216
error: could not compile `typst_nif` (lib)
Caused by:
process didn't exit successfully: `rustc --crate-name typst_nif --edition=2021 src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --crate-type cdylib --emit=dep-info,link -C opt-level=3 -C lto --cfg 'feature="default"' --cfg 'feature="nif_version_2_15"' --check-cfg 'cfg(docsrs,test)' --check-cfg 'cfg(feature, values("default", "nif_version_2_15", "nif_version_2_16", "nif_version_2_17"))' -C metadata=684f38727e91bcf8 --out-dir /target/aarch64-unknown-linux-gnu/release/deps --target aarch64-unknown-linux-gnu -C linker=aarch64-linux-gnu-gcc -C strip=debuginfo -L dependency=/target/aarch64-unknown-linux-gnu/release/deps -L dependency=/target/release/deps --extern comemo=/target/aarch64-unknown-linux-gnu/release/deps/libcomemo-c278774ab144f6c8.rlib --extern rustler=/target/aarch64-unknown-linux-gnu/release/deps/librustler-c7f63b2eafc93dbf.rlib --extern tar=/target/aarch64-unknown-linux-gnu/release/deps/libtar-5166b6795e27638f.rlib --extern time=/target/aarch64-unknown-linux-
Done.
I followed the directions and added a step to the workflow to set the RUST_MIN_STACK
env var,
- name: Set Rust stack size
shell: bash
run: |
echo "RUST_MIN_STACK=16777216" >> $GITHUB_ENV
But alas this doesn’t make a difference.
Has anyone encountered something similar and know how to resolve this?
Thanks,
Herman