Virtual-environments: Boost.Build fails to run on Windows Server 2019 (Visual Studio 2019).

Created on 2 Nov 2019  路  10Comments  路  Source: actions/virtual-environments

Describe the bug
The installed Boost.Build from Boost 1.69.0 does not work properly.

Virtual environments affected

  • [ ] macOS 10.14
  • [ ] Ubuntu 16.04 LTS
  • [ ] Ubuntu 18.04 LTS
  • [ ] Windows Server 2016 R2
  • [x] Windows Server 2019

Expected behavior
Boost and Boost.Build should find the C++ compiler from Visual Studio automatically and properly build C++ projects using Boost.Build as a build system.

Actual behavior
There seem to be several problems.

  1. The environment variables BOOST_ROOT and BOOST_BUILD_PATH seem to not be properly quoted. The paths include spaces and so required proper quoting to work properly.
  2. Boost 1.70.0 is the first version that supports Visual Studio 2019, but the version of Boost installed is Boost 1.69.0.
C++ Windows awaiting-deployment bug

Most helpful comment

@tee3 Thank you for details. I could reproduce the bug if BOOST_ROOT contains a space in its name. I will let you know once the bug is resolved

Example:

jobs:
  build:
    runs-on: windows-latest

    steps:
    - name: Boost
      run: |
          cmd /s /c "`"C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\Tools\vsdevcmd.bat`" -no_logo && set" | Foreach-Object {
                  if ($_ -match '^([^=]+)=(.*)') {
                      [System.Environment]::SetEnvironmentVariable($matches[1], $matches[2])
                  }
          }
          git clone https://github.com/tee3/github-actions-test-cases.git
          cd github-actions-test-cases\github-actions-virtual-environments-issue-74
          cmd /c mklink /D C:\Boost $env:BOOST_ROOT
          Rename-Item C:\Boost\boost C:\Boost\boost_old
          cmd /c mklink /D C:\Boost\boost C:\Boost\include\boost
          b2.exe -sBOOST_ROOT="C:\Boost" toolset="msvc-14.1"
      shell: pwsh

Output:
image

All 10 comments

Hello @tee3

Could you please provide steps to reproduce the issue?

Thanks for taking a look at this. I put together a test case in a commit https://github.com/tee3/github-actions-test-cases/commit/b6682f9036ae29c8529d993c7566edb8914dc62b in my GitHub Actions Test Cases repository (https://github.com/tee3/github-actions-test-cases).

The GitHub Actions status for this can be seen at https://github.com/tee3/github-actions-test-cases/commit/b6682f9036ae29c8529d993c7566edb8914dc62b/checks?check_suite_id=406320312.

@tee3 Thank you for details. I could reproduce the bug if BOOST_ROOT contains a space in its name. I will let you know once the bug is resolved

Example:

jobs:
  build:
    runs-on: windows-latest

    steps:
    - name: Boost
      run: |
          cmd /s /c "`"C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\Tools\vsdevcmd.bat`" -no_logo && set" | Foreach-Object {
                  if ($_ -match '^([^=]+)=(.*)') {
                      [System.Environment]::SetEnvironmentVariable($matches[1], $matches[2])
                  }
          }
          git clone https://github.com/tee3/github-actions-test-cases.git
          cd github-actions-test-cases\github-actions-virtual-environments-issue-74
          cmd /c mklink /D C:\Boost $env:BOOST_ROOT
          Rename-Item C:\Boost\boost C:\Boost\boost_old
          cmd /c mklink /D C:\Boost\boost C:\Boost\include\boost
          b2.exe -sBOOST_ROOT="C:\Boost" toolset="msvc-14.1"
      shell: pwsh

Output:
image

@tee3 boost 1.72 has been added to the image and ROOT directories were updated. Please see the docs
https://github.com/actions/virtual-environments/releases/tag/win19%2F20200203.0
Could you check it, please?

Hello, @tee3

name: CI
on: [push]

jobs:
  build:
    runs-on: [windows-latest]
    steps:
      - name:  Boost
        run: |
          cd /d %USERPROFILE%\Desktop
          git clone https://github.com/tee3/github-actions-test-cases.git
          cd github-actions-test-cases\github-actions-virtual-environments-issue-74
          b2 toolset="msvc-14.2"
        shell: cmd

boost

Thanks, this works for me now! What is the process for closing issues? Should I be closing it or do you when you are complete?

@tee3 Thank you. Please push the button Close issue at the bottom of the page.

@erenon , if the issue still persist for you, feel free to create the separate issue with repro steps

Was this page helpful?
0 / 5 - 0 ratings

Related issues

frankieroberto picture frankieroberto  路  4Comments

ydnar picture ydnar  路  3Comments

matthewfeickert picture matthewfeickert  路  3Comments

shogo82148 picture shogo82148  路  3Comments

adamsiembida picture adamsiembida  路  3Comments