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

Response files issues and long path support #315

Open
Kojoley opened this issue May 31, 2023 · 2 comments
Open

Response files issues and long path support #315

Kojoley opened this issue May 31, 2023 · 2 comments
Labels
bug Something isn't working

Comments

@Kojoley
Copy link
Contributor

Kojoley commented May 31, 2023

  1. response-file=auto doesn't always use response files when it should, it probably does not count the compiler path in estimation?
  2. A resulting path still can exceed the limits and b2 will fail with undescriptive message:
    [errno 2] failed to write output file '../../../bin.v2/libs/thread/test/test_condition_timed_wait_times_out.test/emscripten-3.1.37/release/exception-handling-on-js/link-static/target-os-unknown/threading-multi/visibility-hidden/test_condition_timed_wait_times_out.o.rsp': No such file or directory
    
  3. A better fix seems to be to implement long path support https://learn.microsoft.com/en-us/windows/win32/fileio/maximum-file-path-limitation?tabs=registry but it requires to use Unicode WinAPI.
@Kojoley Kojoley added the bug Something isn't working label May 31, 2023
@grafikrobot
Copy link
Member

  1. Correct it's still possible to have too long paths as the compiler can't be part of the calculations for executed commands. And it can't be because the execution can happen in some random shell which B2 can't interpret ahead of time to determine a more accurate answer to how long the command like is. Hence, we guess, with an arbitrary padding.

  2. I guess the error message could be improved.

  3. Even if we did that, and managed to write the response file, how would that help the shell? As the path would be too long for the shell also.

@Kojoley
Copy link
Contributor Author

Kojoley commented Jun 5, 2023

  1. Even if we did that, and managed to write the response file, how would that help the shell? As the path would be too long for the shell also.

https://learn.microsoft.com/en-us/troubleshoot/windows-client/shell-experience/command-line-string-limitation

The maximum length of the string that you can use at the command prompt is 8191 characters.

That's since WinXP, on Win2000 it was 2047 which is still longer that 259.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants