Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unable to find dynamic system library 'atomic' #252

Closed
xutianyi1999 opened this issue May 21, 2024 · 3 comments
Closed

unable to find dynamic system library 'atomic' #252

xutianyi1999 opened this issue May 21, 2024 · 3 comments

Comments

@xutianyi1999
Copy link

OS: Ubuntu 22.04
Rust: nightly-x86_64-unknown-linux-gnu
cargo-zigbuild-0.18.4
ziglang-0.12.0

Build command: cargo zigbuild --release --target armv7-unknown-linux-gnueabihf

Error message

 error: unable to find dynamic system library 'atomic' using strategy 'no_fallback'. searched paths:
            /home/runner/work/fubuki-test/fubuki-test/target/armv7-unknown-linux-gnueabihf/release/deps/libatomic.so
            /home/runner/work/fubuki-test/fubuki-test/target/release/deps/libatomic.so
            /home/runner/work/fubuki-test/fubuki-test/target/armv7-unknown-linux-gnueabihf/release/build/libmimalloc-sys-ca91151723eed5d5/out/libatomic.so
            /home/runner/work/fubuki-test/fubuki-test/target/armv7-unknown-linux-gnueabihf/release/build/netstack-lwip-e8f8aeaad777c356/out/libatomic.so
            /home/runner/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/armv7-unknown-linux-gnueabihf/lib/libatomic.so
            /home/runner/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/armv7-unknown-linux-gnueabihf/lib/libatomic.so

All build message

libatomic link instruction

println!("cargo:rustc-link-lib=dylib=atomic");
@messense
Copy link
Member

Nothing we can do here, zig has some known issue for atomic, for example ziglang/zig#14889.

@messense messense closed this as not planned Won't fix, can't repro, duplicate, stale May 21, 2024
@messense

This comment was marked as outdated.

@messense
Copy link
Member

messense commented May 21, 2024

scratch that, it should be fixed in https://github.com/purpleprotocol/mimalloc_rust/blob/a9c410c248859d3f55fbb7d29a88f28cdf296f6b/libmimalloc-sys/build.rs#L58-L61 because armv7 and later does not require libatomic.

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

No branches or pull requests

2 participants