-
-
Notifications
You must be signed in to change notification settings - Fork 63
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
Issue using async_trait
with zigbuild
for x86_64-unknown-linux-gnu
#4
Comments
I can reproduce this issue on Ubuntu 20.04, but it seems to work fine on macOS. |
So this issue is caused by Cargo using the same linker when First create the cargo +nightly zigbuild --target x86_64-unknown-linux-gnu -Ztarget-applies-to-host |
With commit 407e2e4, if you don't specify a glibc version it'll skip setting up zig as linker and just use system linker instead when the cross target is exactly the same as the host target. That should avoid having to use the |
With #9 which is released in v0.5.2, the only workaround is switching to nightly Rust, cargo-zigbuild will take care of enabling the |
Hi! 👋 First of all, thanks a lot for this awesome project!
I'm trying to use
cargo zigbuild
with this project that uses theasync_trait
crate from Ubuntu on x86_64.When I use
cargo zigbuild --target aarch64-unknown-linux-gnu
, it works without any error. Same withcargo build --target x86_64-unknown-linux-gnu
.However, when I run
cargo zigbuild --target x86_64-unknown-linux-gnu
, I get a pretty lengthy error about async functions not supported in traits, and that thiserror cannot allocate memory in static TLS block.Error trace from compilation:
For reference, here is one of the traits that
cargo zigbuild
complains about:The text was updated successfully, but these errors were encountered: