Comments (20)
What version of esp-idf-sys
are you using? I believe there was an issue in an older release building libsodium.
from esp-idf-sys.
Just the one that rust-esp32-std-demo uses: 0.21.1
https://github.com/ivmarkov/rust-esp32-std-demo/blob/main/Cargo.toml#L58:
esp-idf-sys = { version = "0.21.1", features = ["binstart"] }
There does seem to be a newer one out.
I'll switch to that, and see if that works.
If so, I'll make a PR for it.
from esp-idf-sys.
If you are on windows, this could also be a long file path issue. Maybe try out the native
feature of esp-idf-sys
if the new version one.
from esp-idf-sys.
It seems that esp-idf-svc
and friends are all on 0.21.
I'll try out the native
feature, and see how that goes.
And failing that, I'll patch the libraries, and bump the version for all of them.
from esp-idf-sys.
Seems I can't build esp-idf-sys
with the native
, as it fails with unable to find Ninja
.
Patching it, and telling it to find ninja
, just results in some weird output.
patched version: (So it's looking for ninja)
from esp-idf-sys.
I'll go install ninja
, and see if it works with that.
from esp-idf-sys.
Ninja is installed, and working.
Seems that it's looking for xtensa-esp32-elf-gcc
.
from esp-idf-sys.
This really shouldn't happen, cmake is somehow not getting the correct PATH
set (both gcc and ninja are automatically installed by the build script).
You could try printing the PATH
variable inside the CMakeLists.txt
file, by adding the line message(STATUS "$ENV{PATH}")
to the beginning of it. Add the line to the CMakeLists.txt
inside the out dir of esp-idf-sys
and try recompiling with cargo build -vv
.
One issue that could cause this is if you have cygpath
in your PATH. Try running cygpath
if it works and your not inside git-bash or the likes, this would probably cause issues. Also try compiling your project with git-bash
itself.
from esp-idf-sys.
Ok, after some troubleshooting, it's definitely because I have cygpath
on my PATH
.
The problematic code is in embuild.
By the looks of it, cygwin (or more specifically, git-bash), does set some env variables that could be looked at, just to make sure the tty is, in fact, from cygwin.
However, that's not all.
That, unfortunately, leads me straight into another issue.
Whether I patch embuild
or if I run it directly from mingw64, the issue is the same:
I'm going to assume the -I args are wrong, so I'll start looking through them.
from esp-idf-sys.
Weird.
Maybe a symlink was supposed to be generated.
I've found the files, but the includes are pointing to a completely different location.
from esp-idf-sys.
I think you're running into windows path length limitations: see Microsoft docs.
from esp-idf-sys.
Ok, after some troubleshooting, it's definitely because I have
cygpath
on myPATH
.The problematic code is in embuild. By the looks of it, cygwin (or more specifically, git-bash), does set some env variables that could be looked at, just to make sure the tty is, in fact, from cygwin.
I've created a new release that should fix this issue. I guess the first workaround that I implemented to circumvent issues with msys or cygwin on Windows was not that great, but these problems should be fixed now.
from esp-idf-sys.
Weird, even after setting the long paths flag, I'm still getting the same error.
I played around with it a bit and got a new error:
I'm a bit lost with this one though...
from esp-idf-sys.
I played around with it a bit and got a new error:
I'm a bit lost with this one though...
This error is unrelated, I'm not sure how it happens but I fixed it by just copying the other binaries (like cargo,
cargo-clippy, cargo-fmt, clippy-driver and rustfmt) from the nightly toolchain to the esp toolchain. I think it has to do with cargo concurrently linking to these executables (the nightly ones are used if the used toolchain doesn't have them).
Note: You have to copy the .dlls too (.pdbs should only be needed for debugging purposes, but why not copy them too).
We should really open an issue for this one upstream, and for the temporary fix in rust-build (maybe).
from esp-idf-sys.
@Jezza The first error is caused by too long build path. Move the project to shorter path. This is known limitation of Windows build via Platform IO. It's quite misleading that it fails on libsodium. The libsodium is the first library which has files on very long paths, so the build fails there.
from esp-idf-sys.
@georgik I'm not building it with Platform IO anymore, I switched to native
.
I also ended up enabling long paths in windows.
The current issue I'm facing is still being unable to find headers:
from esp-idf-sys.
Just FYI @Jezza Long Paths on Windows does not solve the problem. For some unknown reason this setting is ignored during the build.
from esp-idf-sys.
Ah, I see.
Nice to know.
from esp-idf-sys.
With a little bit of research this seems to be a gcc
limitation.
Possible workarounds:
- Use
subst
to assign a virtual drive letter to a path (should work as pointed out here). - Create a directory junction (with
mklink /j
) to shorten the path (not tested). - Moving the project to a directory with a shorter path.
If this is a common issue, it may be worth trying to implement a workaround (for example forcing cmake to use relative paths, creating directory junctions ourselves, etc.).
from esp-idf-sys.
Closing due to inactivity, I hope that by now all the issues are resolved. Please file another if this is not the case.
from esp-idf-sys.
Related Issues (20)
- Failing to add mdns remote component HOT 4
- How to allocate a vector or array in PSRAM HOT 4
- backtrace (of rust code) is incomplete on esp32c6 HOT 17
- Integration with `bevy_ecs` - linker failure `pthread_setcancelstate is not implemented` HOT 5
- Do Rust Native Queues and Mutexes Properly Suspend Tasks HOT 3
- Misaligned struct pointer from esp camera HOT 22
- could not identify the root crate and `ESP_IDF_SYS_ROOT_CRATE` not specified HOT 3
- Time for `espidf_time32`? HOT 4
- Trying to set CONFIG_BOOTLOADER_APP_ROLLBACK_ENABLE=1 not working HOT 2
- esp-idf-sys HOT 1
- esp-idf-sys build started fail on arm mac os HOT 20
- Unable to build on Mac M1 HOT 1
- ...no 'IDF_PYTHON_ENV_PATH' item,Debian 12, std mode, esp-idf-template, idf master HOT 4
- Windows path length message is wrong. HOT 1
- tskNO_AFFINITY missing with esp-idf v5.2.1 HOT 1
- Using custom components introduces a requirement of specifying all components HOT 7
- failed to run custom build command for `esp-idf-sys v0.34.1` HOT 1
- Wrapper for RTC Slow memory HOT 2
- Implementing tinyusb callbacks in rust HOT 1
- Use of mixed i2c legacy and new apis HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from esp-idf-sys.