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

Build fails with b2 when Windows username contains non-ASCII characters #158

Closed
JackBoosY opened this issue May 25, 2022 · 1 comment · Fixed by #316
Closed

Build fails with b2 when Windows username contains non-ASCII characters #158

JackBoosY opened this issue May 25, 2022 · 1 comment · Fixed by #316
Labels
bug Something isn't working os:windows Issue on Windows OS.

Comments

@JackBoosY
Copy link

Environment and version details

  • Operating System+version: Windows 10
  • Compiler+version: Visual Studio 2017 or later
  • Shell: cmd
  • B2 Version: 4.7-git
  • B2 Configuration:
notice: found boost-build.jam at F:/vcpkg/packages/boost-build_x64-windows/tools/boost-build/boost-build.jam
notice: loading B2 from F:/vcpkg/packages/boost-build_x64-windows/tools/boost-build/src/kernel/bootstrap.jam
notice: Searching 'C:\WINDOWS' 'C:\Users\usr' 'C:\Users\usr' 'F:/vcpkg/packages/boost-build_x64-windows/tools/boost-build/src/kernel' 'F:/vcpkg/packages/boost-build_x64-windows/tools/boost-build/src/kernel' 'F:/vcpkg/packages/boost-build_x64-windows/tools/boost-build/src/util' 'F:/vcpkg/packages/boost-build_x64-windows/tools/boost-build/src/build' 'F:/vcpkg/packages/boost-build_x64-windows/tools/boost-build/src/tools' 'F:/vcpkg/packages/boost-build_x64-windows/tools/boost-build/src/contrib' 'F:/vcpkg/packages/boost-build_x64-windows/tools/boost-build/src/.' for site-config configuration file 'site-config.jam'.
notice: Configuration file 'site-config.jam' not found in 'C:\WINDOWS' 'C:\Users\usr' 'C:\Users\usr' 'F:/vcpkg/packages/boost-build_x64-windows/tools/boost-build/src/kernel' 'F:/vcpkg/packages/boost-build_x64-windows/tools/boost-build/src/kernel' 'F:/vcpkg/packages/boost-build_x64-windows/tools/boost-build/src/util' 'F:/vcpkg/packages/boost-build_x64-windows/tools/boost-build/src/build' 'F:/vcpkg/packages/boost-build_x64-windows/tools/boost-build/src/tools' 'F:/vcpkg/packages/boost-build_x64-windows/tools/boost-build/src/contrib' 'F:/vcpkg/packages/boost-build_x64-windows/tools/boost-build/src/.'.
notice: Searching 'C:\Users\usr' 'C:\Users\usr' 'F:/vcpkg/packages/boost-build_x64-windows/tools/boost-build/src/kernel' 'F:/vcpkg/packages/boost-build_x64-windows/tools/boost-build/src/kernel' 'F:/vcpkg/packages/boost-build_x64-windows/tools/boost-build/src/util' 'F:/vcpkg/packages/boost-build_x64-windows/tools/boost-build/src/build' 'F:/vcpkg/packages/boost-build_x64-windows/tools/boost-build/src/tools' 'F:/vcpkg/packages/boost-build_x64-windows/tools/boost-build/src/contrib' 'F:/vcpkg/packages/boost-build_x64-windows/tools/boost-build/src/.' for user-config configuration file 'user-config.jam'.
notice: Configuration file 'user-config.jam' not found in 'C:\Users\usr' 'C:\Users\usr' 'F:/vcpkg/packages/boost-build_x64-windows/tools/boost-build/src/kernel' 'F:/vcpkg/packages/boost-build_x64-windows/tools/boost-build/src/kernel' 'F:/vcpkg/packages/boost-build_x64-windows/tools/boost-build/src/util' 'F:/vcpkg/packages/boost-build_x64-windows/tools/boost-build/src/build' 'F:/vcpkg/packages/boost-build_x64-windows/tools/boost-build/src/tools' 'F:/vcpkg/packages/boost-build_x64-windows/tools/boost-build/src/contrib' 'F:/vcpkg/packages/boost-build_x64-windows/tools/boost-build/src/.'.
Jamroot.jam:107: in modules.load from module Jamfile<F:\vcpkg\packages\boost-build_x64-windows\tools\boost-build>
warning: Bison generator program 'bison' not found. Skipping grammar build.
F:/vcpkg/packages/boost-build_x64-windows/tools/boost-build/src/build\project.jam:372: in load-jamfile from module project
F:/vcpkg/packages/boost-build_x64-windows/tools/boost-build/src/build\project.jam:64: in load from module project
F:/vcpkg/packages/boost-build_x64-windows/tools/boost-build/src/build\project.jam:142: in project.find from module project
F:/vcpkg/packages/boost-build_x64-windows/tools/boost-build/src\build-system.jam:618: in load from module build-system
F:/vcpkg/packages/boost-build_x64-windows/tools/boost-build/src/kernel\modules.jam:294: in import from module modules
F:/vcpkg/packages/boost-build_x64-windows/tools/boost-build/src/kernel/bootstrap.jam:139: in boost-build from module
F:/vcpkg/packages/boost-build_x64-windows/tools/boost-build/boost-build.jam:8: in module scope from module
warning: No toolsets are configured.
warning: Configuring default toolset "msvc".
warning: If the default is wrong, your build may not work correctly.
warning: Use the "toolset=xxxxx" option to override our guess.
warning: For more configuration options, please consult
warning: https://www.bfgroup.xyz/b2/manual/release/index.html#bbv2.overview.configuration
notice: [msvc-cfg] msvc-14.1 detected, command: 'C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Tools\MSVC\14.16.27023\bin\Hostx64\arm\cl.exe'
notice: will use 'C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Tools\MSVC\14.16.27023\bin\Hostx64\arm\cl.exe' for msvc, condition <toolset>msvc-14.1
notice: [generate-setup-cmd] 14.16.27023 is 14.1
notice: [generate-setup-cmd] 14.16.27023 is 14.1
notice: [generate-setup-cmd] 14.16.27023 is 14.1
notice: [generate-setup-cmd] 14.16.27023 is 14.1
notice: [generate-setup-cmd] 14.16.27023 is 14.1
notice: [msvc-cfg] condition: '<toolset>msvc-14.1/<architecture>x86/<address-model>32', setup: 'C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Auxiliary\Build\vcvars32.bat'
notice: [msvc-cfg] condition: '<toolset>msvc-14.1/<architecture>/<address-model>32', setup: 'C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Auxiliary\Build\vcvars32.bat'
notice: [msvc-cfg] condition: '<toolset>msvc-14.1/<architecture>x86/<address-model>64', setup: 'C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Auxiliary\Build\vcvars64.bat'
notice: [msvc-cfg] condition: '<toolset>msvc-14.1/<architecture>/<address-model>64', setup: 'C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Auxiliary\Build\vcvars64.bat'
notice: [msvc-cfg] condition: '<toolset>msvc-14.1/<architecture>x86/<address-model>', setup: 'C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Auxiliary\Build\vcvars64.bat'
notice: [msvc-cfg] condition: '<toolset>msvc-14.1/<architecture>/<address-model>', setup: 'C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Auxiliary\Build\vcvars64.bat'
notice: [msvc-cfg] condition: '<toolset>msvc-14.1/<architecture>ia64/<address-model>64', setup: 'C:/Program Files (x86)/Microsoft Visual Studio/2017/Enterprise/VC/Auxiliary/Build/vcvarsall.bat'
notice: [msvc-cfg] condition: '<toolset>msvc-14.1/<architecture>ia64/<address-model>', setup: 'C:/Program Files (x86)/Microsoft Visual Studio/2017/Enterprise/VC/Auxiliary/Build/vcvarsall.bat'
notice: [msvc-cfg] condition: '<toolset>msvc-14.1/<architecture>arm/<address-model>32', setup: 'C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Auxiliary\Build\vcvarsx86_arm.bat'
notice: [msvc-cfg] condition: '<toolset>msvc-14.1/<architecture>arm/<address-model>64', setup: 'C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Auxiliary\Build\vcvarsx86_arm64.bat'
...found 1 target...

Brief problem description

When using b2.exe to build other boost components, because b2 needs to use the Windows api GetTempPathA to find the temporary directory, and the username in %TMP% contains non-ASCII characters, this leads to the failure of writing temporary files to this directory, As a result, subsequent reading of this temporary file fa

Related vcpkg issue: microsoft/vcpkg#24473

Steps to reproduce the issue

  1. Create a account which name contains non-ASCII characters.
  2. Build b2.
  3. Build other boost components such as boost-regex.

Actual behavior summary

Failed to read temporary file.

If a project of yours is blocked due to this bug, please, mention it explicitly.

         Usage requirements from stage:  <relevant>address-model <relevant>architecture <relevant>asynch-exceptions <relevant>cxxstd <relevant>cxxstd-dialect <relevant>debug-store <relevant>debug-symbols <relevant>deduced-address-model <relevant>deduced-architecture <relevant>exception-handling <relevant>extern-c-nothrow <relevant>inlining <relevant>instruction-set <relevant>link <relevant>lto <relevant>lto-mode <relevant>optimization <relevant>pch <relevant>rtti <relevant>runtime-debugging <relevant>runtime-link <relevant>segmented-stacks <relevant>threading <relevant>toolset <relevant>toolset-msvc:vendor <relevant>toolset-msvc:version <relevant>variant <relevant>warnings <relevant>warnings-as-errors <relevant>windows-api
...patience...
...found 261 targets...
...updating 12 targets...
msvc.write-setup-script D:\src\vcpkg\buildtrees\boost-exception\x64-windows-rel\boost\standalone\msvc\2f9fc86aaa675882ac74655a32fbce46\msvc-setup.bat
The system cannot find the file specified.

    type "C:\Users\王蔚健\AppData\Local\Temp\jam38f4bad5.000" > "D:\src\vcpkg\buildtrees\boost-exception\x64-windows-rel\boost\standalone\msvc\2f9fc86aaa675882ac74655a32fbce46\msvc-setup.bat"

...failed msvc.write-setup-script D:\src\vcpkg\buildtrees\boost-exception\x64-windows-rel\boost\standalone\msvc\2f9fc86aaa675882ac74655a32fbce46\msvc-setup.bat...
...removing D:\src\vcpkg\buildtrees\boost-exception\x64-windows-rel\boost\standalone\msvc\2f9fc86aaa675882ac74655a32fbce46\msvc-setup.bat
...skipped <pD:\src\vcpkg\buildtrees\boost-exception\x64-windows-rel\boost\build\98d028da9d4c1b53f1f0565d7f9f6e6f>clone_current_exception_non_intrusive.obj for lack of <pD:\src\vcpkg\buildtrees\boost-exception\x64-windows-rel\boost\standalone\msvc\2f9fc86aaa675882ac74655a32fbce46>msvc-setup.nup...
...failed updating 1 target...
...skipped 1 target...
...updated 9 targets...

Expected behavior summary

Other components should be built successfully.

Is there any way to circumvent this problem temporarily?

Thanks,
Jack.

@grafikrobot
Copy link
Member

In the short term I believe you can set the TEMP end var in your user environment to redirect where that goes. I.e. make it go to a path that doesn't have the unicode chars. In the long term I'm investigating fixing this problem in a future release. But unicode in Windows is filled with landmines. So it's not going to be easy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working os:windows Issue on Windows OS.
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants