Skip to content
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

Windows path length message is wrong. #293

Closed
Timmmm opened this issue Mar 13, 2024 · 1 comment
Closed

Windows path length message is wrong. #293

Timmmm opened this issue Mar 13, 2024 · 1 comment

Comments

@Timmmm
Copy link

Timmmm commented Mar 13, 2024

I get this error:

  Error: Too long output directory: `\\?\D:\lockfw\target\riscv32imac-esp-espidf\release\build\esp-idf-sys-eac617bcbe734de9\out`. Shorten your project path down to no more than 10 characters (or use WSL2 and its native Linux filesystem). Note that tricks like Windows `subst` do NOT work!       

However as you can see my project path is D:\lockfw which is only 9 characters. But if you search for that error, it's from here:

    #[cfg(windows)]
    {
        if out_dir.len() > 88 {
            report(format!("Too long output directory: `{out_dir}`. Shorten your project path down to no more than 10 characters (or use WSL2 and its native Linux filesystem). Note that tricks like Windows `subst` do NOT work!"))?;
        }
    }

That's checking the length of \\?\D:\lockfw\target\riscv32imac-esp-espidf\release\build\esp-idf-sys-eac617bcbe734de9\out which is 90 characters. So my path has to actually be a maximum of 8 characters!? Three of which are D:\ so I get 5 characters??

That's practically unusable. I think at that point there has to be a better solution. What part of the compilation process needs these really long paths?

I did also try ESP_IDF_PATH_ISSUES=warn and it compiled successfully (as far as I can tell). So maybe the check is just wrong?

@ivmarkov
Copy link
Collaborator

ivmarkov commented Apr 24, 2024

No the check is not wrong (we cant control the fact that Rust normalizes the path even further) and yes, your project path needs to be very short.

Please look at existing closed PRs and bugs. This topic has been discussed at length, including the dangers of setting this parameter to warn.

A real fix (normal path length) is very, very involved as discussed multiple times elsewhere.

@github-project-automation github-project-automation bot moved this from Todo to Done in esp-rs Apr 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

No branches or pull requests

2 participants