Open vapourismo opened 4 months ago
This is a known problem, but thanks for opening an issue for tracking this!
This issue exists due to Cargo configuration unification: once a config file in one of the parent directories sets the target, we cannot unset it again. We need to use the host triple for the build script. --target HOST
is probably not happening, and unsetting configuration settings is not there yet.
So in your case there is no way around removing the offending cargo config, sadly.
Summary
When the crate that depends on
hermit
contains a Cargo configuration (e.g..cargo/config.toml
), the compilation of the kernel in the build script of thehermit
crate will use that configuration.How to reproduce a failure
Check out this branch which contains a minimal example to reproduce the issue. It contains a Cargo configuration which sets the build target to
riscv64gc-unknown-hermit
.Now when you run
cargo build
, the build fails duringhermit
's build script. It looks like it's compiling things for the wrong architecture.