Closed
Description
Platform
Linux 65fe86937035 5.4.0-73-generic #82-Ubuntu SMP Wed Apr 14 17:39:42 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux`
Description
I'm trying to cross-compile a Rust application that depends on ethers-rs with the help of rust-musl-cross
. However, compilation fails and after some debugging, I found ethers-rs to be the one causing the error.
I'm not opening this issue on ethers-rs as that library can be compiled outside rust-musl-cross
without issues.
Steps to Reproduce
Create a Dockerfile
anywhere with the following content:
FROM messense/rust-musl-cross:x86_64-musl
RUN git clone https://github.com/gakonst/ethers-rs && \
cd ethers-rs && \
cargo build
Run:
$ docker build .
Expected Result
Compilation succeeds.
Actual Result
Compilation fails with:
Compiling ethers-contract-abigen v0.2.2 (/home/rust/src/ethers-rs/ethers-contract/ethers-contract-abigen)
Compiling ethers-providers v0.2.2 (/home/rust/src/ethers-rs/ethers-providers)
Compiling ethers-contract-derive v0.2.2 (/home/rust/src/ethers-rs/ethers-contract/ethers-contract-derive)
Compiling ethers-contract v0.2.2 (/home/rust/src/ethers-rs/ethers-contract)
thread 'rustc' panicked at 'Failed to get crate data for crate179', compiler/rustc_metadata/src/creader.rs:136:32
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
error: internal compiler error: unexpected panic
note: the compiler unexpectedly panicked. this is a bug.
note: we would appreciate a bug report: https://github.com/rust-lang/rust/issues/new?labels=C-bug%2C+I-ICE%2C+T-compiler&template=ice.md
note: rustc 1.52.1 (9bc8c42bb 2021-05-09) running on x86_64-unknown-linux-gnu
note: compiler flags: -C embed-bitcode=no -C debuginfo=2 -C linker=x86_64-unknown-linux-musl-gcc -C incremental --crate-type lib
note: some of the compiler flags provided by cargo are hidden
query stack during panic:
end of query stack
error: could not compile `ethers-contract`
To learn more, run the command again with --verbose.
Metadata
Metadata
Assignees
Labels
No labels