Skip to content

b2 would not respect windows sdk environment variable loaded by VS Command Prompt #470

@elfive

Description

@elfive

Make sure you completed the following tasks

Environment and version details

  • Operating System+version: Windows 10 x64 22H2 19045.5737
  • Compiler+version: msvc-14.0
  • Shell: cmd
  • B2 Version: B2 5.3.3 (OS=NT, jobs=16)
  • B2 Configuration: Output of b2 --toolset=msvc-14.0 architecture=x86 address-model=64 variant=release link=static runtime-link=shared --build-dir="D:\Libraries\build\static\vs2015\boost-1.74.0\x64\Release" install --prefix="D:\Libraries\lib\static\vs2015\boost-1.74.0\x64\Release" threading=multi --build-type=complete -sBOOST_PYTHON_STATIC_LIB=1 python="3.11" -sZLIB_SOURCE="D:/Libraries/source/zlib-1.3.1" -sBZIP2_SOURCE="D:/Libraries/source/bzip2-1.0.8" -q -a --reconfigure --no-cmake-config --debug-configuration >> logs.txt
  • Boost Version: 1.74.0

[logs.txt](https://github.com/user-attachments/files/23379133/logs.txt)

Brief problem description

without windows sdk 10.0.26100.0 installed, everything works, compile without error.
but with windows sdk 10.0.26100.0 installed, error occurred,
I tried override environment variable related to windows sdk after vcvarsall.bat amd64 8.1 loaded, not working.

Steps to reproduce the issue

  1. install Visual Studio 2015 and Windows SDK 8.1, boost 1.74.0 should build without any problem
  2. Install Windows SDK 10.0.26100.0
  3. Open cmd.exe
  4. Run vcvarsall.bat amd64 8.1
  5. Change to boost-1.74.0 source directory and run command (of course, minimal command b2 also lead to the same problem): b2 --toolset=msvc-14.0 architecture=x86 address-model=64 variant=release link=static runtime-link=shared --build-dir="D:\Libraries\build\static\vs2015\boost-1.74.0\x64\Release" install --prefix="D:\Libraries\lib\static\vs2015\boost-1.74.0\x64\Release" threading=multi --build-type=complete -sBOOST_PYTHON_STATIC_LIB=1 python="3.11" -sZLIB_SOURCE="D:/Libraries/source/zlib-1.3.1" -sBZIP2_SOURCE="D:/Libraries/source/bzip2-1.0.8" -q -a --reconfigure --no-cmake-config

Actual behavior summary

When I run the b2 command, b2 compile should load specified environment instead of load the latest windows sdk environment installed and I think it shouldn't.


[logs_with_d2.txt](https://github.com/user-attachments/files/23379315/logs_with_d2.txt)

Expected behavior summary

b2 should load correct environment.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions