-
Notifications
You must be signed in to change notification settings - Fork 7.3k
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
esp-2021r2-patch2-8.4.0 not working if user folder has a space in it (IDFGH-6735) #8364
Comments
Hi @apiesse, thanks for reporting this. It's interesting to hear that having a directory with space in its path worked for you in older versions of ESP-IDF. This is explicitly not supported and there were several places in the build system where spaces were not handled correctly. We have fixed these issues in Could you please check the following:
|
Thanks for the reply @igrr . |
I see, looks like it might be a ccache issue. Are you building using |
This is working both from command line and Eclipse! |
Thanks for confirming that disabling the cache helps. I'm afraid we can't add support for spaces in paths to existing v4.x release because it introduces certain breaking changes to project CMakeLists.txt files. So by fixing spaces in paths, we unfortunately also have a chance of breaking some projects. Because of that, we decided to include this change only in v5.0. However the issue with ccache seems to be unrelated, and I think it can be fixed by upgrading ccache to a more recent version. We'll try to reproduce the issue and upgrade ccache version in the existing v4.x releases. In the meantime, you can re-enable ccache ( |
@igrr I also encountered a similar problem, I put 'esp-idf' and '.espressif' in 'C:\Program Files...', and then 'kconfiglib.KconfigError: D: /.../project/esp/project/template-app/build/kconfigs_projbuild.in:1: 'C:/Program' not found (in 'source "C:/Program"').', I use esp-idf v4.4 |
- primary reason: 4.6.2 fixes errors if the user's home directory contains a space - alternative fix: the CCACHE_DIR env var can be set to something without a space in it, or set to TMP which properly escapes the home dir name - there may be other issues with spaces in filenames on builds in other parts of ESP-IDF, see espressif#8364 for more info tested locally on windows only, use at your own risk
I kept running into this (damn you windows for using a space in my home directory name and making it really hard to change, why...) Here's a couple workarounds from my travels:
More info from https://ccache.dev/releasenotes.html#_ccache_4_6_2
The upstream ccache fix for this is probably this PR: ccache/ccache#1124
$env:CCACHE_DIR=$env:TMP; idf.py build
$env:IDF_CCACHE_ENABLE=0; idf.py build Hope that helps. Bonus: It might be cool to get a hint from idf.py that the user's home directory contains a space in the filename, and warn about potential issues with that. It was hard to track down that this was a ccache / path spaces bug. In the future, other stuff could break too (spaces in home directory names is evil), so this breadcrumb could help devs reach the solution quicker. Thanks! |
Thanks @binary1230 for sharing your findings and creating a PR for this. Space support for ccache is really good news. We handle your PR soon. |
- primary reason: 4.6.2 fixes errors if the user's home directory contains a space - alternative fix: the CCACHE_DIR env var can be set to something without a space in it, or set to TMP which properly escapes the home dir name - there may be other issues with spaces in filenames on builds in other parts of ESP-IDF, see #8364 for more info tested locally on windows only, use at your own risk Closes #9656
Environment
Problem Description
I've just updated a project from esp-idf-v4.3.2 to esp-idf-v4.4 and I have the following error message:
As you can guess, the user directory is "C:\Users\Marco Mariotti", but somehow the space in it is no longer escaped.
The error was not present in esp-idf-v4.3.2 (using esp-2021r2-8.4.0 toolchain).
The text was updated successfully, but these errors were encountered: