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

Long path and Unicode support on Windows 10+ #316

Merged

Conversation

Kojoley
Copy link
Contributor

@Kojoley Kojoley commented Jun 2, 2023

Long path support is still not universal, even after an app has explicitly opted-in via manifest it also requires registry modification or group policies, see https://learn.microsoft.com/en-us/windows/win32/fileio/maximum-file-path-limitation?tabs=registry#enable-long-paths-in-windows-10-version-1607-and-later though Python and Git installers nudges to enable it by their installers for a while.

-X utf8 forces Python to use UTF-8 when its outputs are piped (will be default in 3.15 https://peps.python.org/pep-0686/)

Also had to fix clang-linux and msvc toolsets manifest embedding issues.

Fixes #158

@Kojoley Kojoley force-pushed the feature/windows-long-path-and-unicode branch 14 times, most recently from 70350f2 to 60065db Compare June 2, 2023 23:04
@Kojoley
Copy link
Contributor Author

Kojoley commented Jun 3, 2023

Holy... How many corners I hit there, but it finally works.

Copy link
Member

@grafikrobot grafikrobot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not convinced of the utility of turning on the long-path flag. I'd rather see just the UTF8 changes. And deal with long-path separately if truly needed. Is there some way to get the compiler front-end to link in the RC without having to rely on another external tool?

@Kojoley
Copy link
Contributor Author

Kojoley commented Jun 5, 2023

I'm not convinced of the utility of turning on the long-path flag. I'd rather see just the UTF8 changes. And deal with long-path separately if truly needed.

Why? Most of the things here are to embed manifest file, the cost of enabling long path support is just a single line in manifest file.

Is there some way to get the compiler front-end to link in the RC without having to rely on another external tool?

I don't think there is. Even link.exe calls rc.exe and will fail if you don't have WinSDK in the PATH (that's the roadblock of #159).

@grafikrobot
Copy link
Member

I'm not convinced of the utility of turning on the long-path flag. I'd rather see just the UTF8 changes. And deal with long-path separately if truly needed.

Why? Most of the things here are to embed manifest file, the cost of enabling long path support is just a single line in manifest file.

Because I was thinking that the long-path didn't make a different on shell execution / rsp files. But.. now I see it does :-) (I blame spending last week on wg21 and my brain not entirely recovering yet).

Is there some way to get the compiler front-end to link in the RC without having to rely on another external tool?

I don't think there is. Even link.exe calls rc.exe and will fail if you don't have WinSDK in the PATH (that's the roadblock of #159).

Unfortunate. But I guess it is what it is.

@grafikrobot grafikrobot force-pushed the feature/windows-long-path-and-unicode branch from 60065db to 2d95f55 Compare July 18, 2023 02:56
@Kojoley Kojoley force-pushed the feature/windows-long-path-and-unicode branch from 2d95f55 to e6548ed Compare July 19, 2023 19:30
Long path support is still not universal, even after an app has explicitly opted-in via manifest it also requires registry modification or group policies, see https://learn.microsoft.com/en-us/windows/win32/fileio/maximum-file-path-limitation?tabs=registry#enable-long-paths-in-windows-10-version-1607-and-later though Python and Git installers nudges to enable it by their installers for a while.

`-X utf8` forces Python to use UTF-8 when its outputs are piped (will be default in 3.15 https://peps.python.org/pep-0686/)

Also had to fix clang-linux and msvc toolsets manifest embedding issues.
@Kojoley Kojoley force-pushed the feature/windows-long-path-and-unicode branch from e6548ed to dd43b84 Compare July 19, 2023 20:35
@Kojoley
Copy link
Contributor Author

Kojoley commented Jul 19, 2023

Filed msys2/MINGW-packages#17812 about msys2 fails. I don't think it will be fixed anytime soon so skip the test for now.

@grafikrobot grafikrobot merged commit 2aa8cf8 into bfgroup:main Jul 22, 2023
105 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Build fails with b2 when Windows username contains non-ASCII characters
2 participants