esp-rs / rust-build

Installation tools and workflows for deploying/building Rust fork esp-rs/rust with Xtensa and RISC-V support
MIT License
248 stars 35 forks source link

Breakage when building `core`. #272

Open shymega opened 3 weeks ago

shymega commented 3 weeks ago

Hi,

I'm creating a Nix Flake for the Rust toolchains for the ESP32.

Whilst rustc is working, I get quite a lot of low-level errors when building a simple example from the template. Attached is a log.

I've uploaded the example here, and the Flake can be found here.

Any ideas?

cargo-build-logs.txt

MabezDev commented 3 weeks ago

I don't know anything about Nix, so I can't really help here. I would recommend making sure you can build a project for your host OS, and then moving on to try and cross compile for esp32.

shymega commented 3 weeks ago

Yeah, I'm not certain if it's a Nix issue or not. Is it normal for std and core to need building?

I'm going to try setting RUST_SRC_PATH.

MabezDev commented 3 weeks ago

For std/core on esp32, yes we need to build it ourselves using build-std feature of cargo.

shymega commented 3 weeks ago

OK. Well, looking at the RUST_SRC_PATH env set, it's not valid.

shymega commented 3 weeks ago

By the looks of things, my derivation is a bit wonky. I think we should keep this issue open for now, though.

My end-goal is to add credits and Actions workflows to my Flake, and add details to the esp-rs wiki.

Shall we discuss on the Matrix room later on?