-
Notifications
You must be signed in to change notification settings - Fork 120
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
Fails to build crate on Macos #234
Comments
Also forgot to mention that I use fish as my shell and I had to manually rewrite the paths... This is what I put into my fish config in the end set LIBCLANG_PATH "/Users/royalfoxy/.rustup/toolchains/esp/xtensa-esp32-elf-clang/esp-16.0.0-20230516/esp-clang/lib"
set PATH "/Users/royalfoxy/.rustup/toolchains/esp/xtensa-esp32-elf/esp-12.2.0_20230208/xtensa-esp32-elf/bin:$PATH"
set PATH "/Users/royalfoxy/.rustup/toolchains/esp/xtensa-esp32s2-elf/esp-12.2.0_20230208/xtensa-esp32s2-elf/bin:$PATH"
set PATH "/Users/royalfoxy/.rustup/toolchains/esp/riscv32-esp-elf/esp-12.2.0_20230208/riscv32-esp-elf/bin:$PATH"
set PATH "/Users/royalfoxy/.rustup/toolchains/esp/xtensa-esp32s3-elf/esp-12.2.0_20230208/xtensa-esp32s3-elf/bin:$PATH" I copied these from the env file that gets created which looks like this on my machine export LIBCLANG_PATH="/Users/royalfoxy/.rustup/toolchains/esp/xtensa-esp32-elf-clang/esp-16.0.0-20230516/esp-clang/lib"
export PATH="/Users/royalfoxy/.rustup/toolchains/esp/xtensa-esp32s2-elf/esp-12.2.0_20230208/xtensa-esp32s2-elf/bin:$PATH"
export PATH="/Users/royalfoxy/.rustup/toolchains/esp/xtensa-esp32s3-elf/esp-12.2.0_20230208/xtensa-esp32s3-elf/bin:$PATH"
export PATH="/Users/royalfoxy/.rustup/toolchains/esp/riscv32-esp-elf/esp-12.2.0_20230208/riscv32-esp-elf/bin:$PATH"
export PATH="/Users/royalfoxy/.rustup/toolchains/esp/xtensa-esp32-elf/esp-12.2.0_20230208/xtensa-esp32-elf/bin:$PATH" |
Can you try by generating your project in the drive root, i.e. We are constantly hit by Windows not supporting long-enough paths, and we cannot fix it. But we should fail the build (or warn the user) during the build, that their project path is too long. |
... and possibly hint users to switch to WSL2 for building on Windows, as annoying as it might be. Including utilizing the native Linux filesystem for the project location (which is a key). |
Im on macos... I dont use windows as my platform of choice for dev anymore |
I just tried to build it regardless within my homes folder which should surely work. This is the error I ended up with which looks like a different one and one I got too from another test try. |
I saw in both this log and the original log this line
|
Sorry! I get so much noise around failed builds with just a freshly-generated On to your first log:
It seems that somehow the git clone of ESP IDF did result in a partially cloned repo. Are you behind some proxy by any chance? In any case - that's the reason, but why - I have no idea. In any case, this is not normal, but is not a problem in On to your second log:
So... are you trying to build for the ESP32CXX series, or are you trying to buyild for the original ESP32? It seems you are trying to do the latter, as your target seems to be For ESP32 (xtensa) you need the |
No. It is only in the second log. Check the first log you have attached here. It is a partially cloned git repo. The build doesn't even get to the |
I tried like 6 different times, 5 of those being std templates so I probably got a log or two confused ^^" Regarding espup and the esp_export.sh, I have both where espup is just installed and I ran Oh and yes I am compiling for the original esp32. |
Tried doing another
and printed the path to the console
The path variable is correct, it's not bash nor zsh. In fish instead of : just plain spaces are used |
Fact is, if you see
Well it works for you at home, it doesn't work for you at work, what are the chances that the
Don't want to nit-pick, but I'm asking because the original description of the bug is not mentioning xtensa at all, and only talks about the riscv chips. |
Hm. What is this? It is not part of the build instructions at all?
|
The content of
|
Sooo I apparantly didn't know that you have to add a special flag to I got it running with fish as well by converting this set PATH "/Users/royalfoxy/.rustup/toolchains/esp/xtensa-esp32-elf/esp-12.2.0_20230208/xtensa-esp32-elf/bin" $PATH
set PATH "/Users/royalfoxy/.rustup/toolchains/esp/xtensa-esp32s2-elf/esp-12.2.0_20230208/xtensa-esp32s2-elf/bin" $PATH
set PATH "/Users/royalfoxy/.rustup/toolchains/esp/xtensa-esp32s3-elf/esp-12.2.0_20230208/xtensa-esp32s3-elf/bin" $PATH
set PATH "/Users/royalfoxy/.rustup/toolchains/esp/riscv32-esp-elf/esp-12.2.0_20230208/riscv32-esp-elf/bin" $PATH
set LIBCLANG_PATH "/Users/royalfoxy/.rustup/toolchains/esp/xtensa-esp32-elf-clang/esp-16.0.0-20230516/esp-clang/lib" to set -x PATH "/Users/royalfoxy/.rustup/toolchains/esp/xtensa-esp32-elf/esp-12.2.0_20230208/xtensa-esp32-elf/bin" $PATH
set -x PATH "/Users/royalfoxy/.rustup/toolchains/esp/xtensa-esp32s2-elf/esp-12.2.0_20230208/xtensa-esp32s2-elf/bin" $PATH
set -x PATH "/Users/royalfoxy/.rustup/toolchains/esp/xtensa-esp32s3-elf/esp-12.2.0_20230208/xtensa-esp32s3-elf/bin" $PATH
set -x PATH "/Users/royalfoxy/.rustup/toolchains/esp/riscv32-esp-elf/esp-12.2.0_20230208/riscv32-esp-elf/bin" $PATH
set -x LIBCLANG_PATH "/Users/royalfoxy/.rustup/toolchains/esp/xtensa-esp32-elf-clang/esp-16.0.0-20230516/esp-clang/lib" the subtle |
Thanks for bringing me onto the right track so I could find out what was causing it! Before I just had a million and one ideas what could be wrong like that I didn't install a proper version of python or llvm or it just didn't compile on apples arm for reason but you pointing out it's likely something with clang path got me thinking that just |
I have created a project from the template and have not modified a single thing. I attached the log of
cargo build
below.log.txt
As for my setup, I'm using a macbook with m2 chip and I went through the rust on esp book multiple times to double and triple check if I have everything installed.
below is a list of what I installed and how
rustup toolchain install nightly --component rust-src
brew install llvm
brew install python
cargo install ldproxy
cargo install espup
cargo install espflash
espup install
Note that I could not build the std template while the no_std template worked perfectly fine!
The text was updated successfully, but these errors were encountered: