Hello,
I'm interested in studying the compilation process from Rust to CheriLLVM and I come across your compiler which I am trying to use and make it work. Following the setup instructions in the Readme file, I can successfully compile simple programs (without any dependencies) using both cargo and rustc. Also, I'm able to emit MIR and LLVM-IR files for both aarch64-unknown-freebsd-purecap
and aarch64-unknown-freebsd
targets.
However, when I attempt to compile programs with dependencies, I encounter the following error when compiling with cargo:
error: failed to download from `https://crates.io/api/v1/crates/addr2line/0.13.0/download`
Caused by:
[60] SSL peer certificate or SSH remote key was not OK (SSL certificate problem: unable to get local issuer certificate)
I tried to fix this error by myself, trying several solutions, such as:
- Putting
http.check-revoke = false
inside the .cargo/config.toml
- Putting
net.git-fetch-with-cli = true
inside the .cargo/config.toml
- Disabling firewalls
- Not being behind a proxy
- Updating certificates
- Rebuilding the compiler from scratch
None of these solutions worked for me. Interestingly, I can access these dependencies with curl without any issues. Also, I tried using another cargo version (the one that is installable via rustup) to check if it can access any crate from crates.io (which it does successfully), so I'm suspecting that this might be actually an issue specific to this cargo version. Either it might be searching for certificates in the wrong directories or overlooking some directories when searching for the certificates.
While I am trying to find a solution (or a workaround) that can solve this problem, I want to ask you if you happened to encounter the same error (or a similar one) and how is it possible to solve it? I would greatly appreciate the assistance.
My environment details:
- WSL Environment: Ubuntu-22.04
- Rust version (the one of this repository):
rustc -vV
rustc 1.56.0-dev
binary: rustc
commit-hash: unknown
commit-date: unknown
host: x86_64-unknown-linux-gnu
release: 1.56.0-dev
LLVM version: 11.0.0
- Cargo version (the one of this repository):
cargo -vV
cargo 1.56.0-dev
release: 1.56.0
If any additional details are needed, I can gladly provide them.
Many thanks