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

Atomics are not linked into the binary #109

Closed
link2xt opened this issue Mar 11, 2023 · 3 comments
Closed

Atomics are not linked into the binary #109

link2xt opened this issue Mar 11, 2023 · 3 comments
Labels
upstream Upstream issue

Comments

@link2xt
Copy link

link2xt commented Mar 11, 2023

I have a minimal example at https://github.com/link2xt/openssl-cross-example
It is a binary which links against OpenSSL via openssl-sys which in turn depends on the C code of OpenSSL provided in openssl-src crate.

There is a build script scripts/build.sh in the repository which calls cargo-build.

The build fails with errors like this:

          ld.lld: error: undefined symbol: __atomic_load
          >>> referenced by bio_lib.c:689 (crypto/bio/bio_lib.c:689)
          >>>               bio_lib.o:(BIO_free_all) in archive ...

even though Zig should provide __atomic_load.

@messense
Copy link
Member

Probably due to ziglang/zig#4911 which is a known upstream issue.

@messense messense closed this as not planned Won't fix, can't repro, duplicate, stale Mar 11, 2023
@messense messense added the upstream Upstream issue label Mar 11, 2023
@link2xt
Copy link
Author

link2xt commented Mar 12, 2023

Is there a known workaround?

@link2xt
Copy link
Author

link2xt commented Mar 12, 2023

Probably due to ziglang/zig#4911 which is a known upstream issue.

Does not seem to be related, reported to Zig: ziglang/zig#14889

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
upstream Upstream issue
Projects
None yet
Development

No branches or pull requests

2 participants