Skip to content

Compilation broken on Windows in the CI #3739

Closed

Description

@StefanStojanovic

node-compile-windows and node-compile-windows-debug have been constantly failing since the weekend began. I'm currently investigating it and the reason seems to be the latest update of VS 2022 to 17.10.0 (everything was fine with 17.9.7). While I'm working on it, those jobs/machines will be down for some time, so just letting everyone know in advance. I'll write update here once I have something.

Activity

  1. targos commented on May 26, 2024

    @targos
    Member

    I tried to compile locally out of curiosity. This is what I get:

      maglev.cc
    C:\Users\mzasso\git\node\deps\v8\src\maglev\maglev-ir.cc(3855): fatal  error C1001: Internal compiler error. [C:\Users\
    mzasso\git\node\tools\v8_gypfiles\v8_base_without_compiler.vcxproj]
      (compiler file 'D:\a\_work\1\s\src\vctools\Compiler\Utc\src\p2\main.c', line 242)
       To work around this problem, try simplifying or changing the program near the locations listed above.
      If possible please provide a repro here: https://developercommunity.visualstudio.com
      Please choose the Technical Support command on the Visual C++
       Help menu, or open the Technical Support help file for more information
        CL!RaiseException()+0x54
        CL!DllGetObjHandler()+0x31a0c
        CL!DllGetObjHandler()+0x448
        CL!DllGetObjHandler()+0x5c2690
        CL!DllGetObjHandler()+0x6cf368
        CL!DllGetObjHandler()+0x7c7a74
        CL!DllGetObjHandler()+0x7bce74
        CL!DllGetObjHandler()+0x6cd960
        CL!DllGetObjHandler()+0x394fbc
        CL!DllGetObjHandler()+0x114b0
        CL!DllGetObjHandler()+0x85d0
        CL!DllGetObjHandler()+0x18c88
        CL!DllGetObjHandler()+0x3fb918
        CL!strtol()+0xac
        CL!BaseThreadInitThunk()+0x30
        CL!RtlUserThreadStart()+0x3c
    
  2. StefanStojanovic commented on May 27, 2024

    @StefanStojanovic
    ContributorAuthor

    I've managed to fix the compilation jobs. The problem was as I suspected the update to VS 17.10.0. Luckily, the VS community edition that we use offers rollback, so I took it back to 17.9.7 and pinned that version. There is also another possibility: to install VS2019 build tools with the exact version and then use VS only for the editor and add workloads, components, etc. from the build tools installation.

    vcbuild.bat and vswhere_usability_wrapper.cmd are written so they only accept the latest version of build tools, so if you have VS 17.10.0, Node will not let you compile with eg v17.9.7 compiler. Since ClangCL is coming (hopefully) soon, I do not think this is worth fixing to support various versions of MSVC, but I'll keep it on my radar just in case.

    The new problem I see now is that node-test-binary-windows-native-suites are constantly failing since yesterday (they were not running 1-2 days before that because of the compilation issue), so I'll dig into that.

  3. StefanStojanovic commented on May 28, 2024

    @StefanStojanovic
    ContributorAuthor

    The fix was applied yesterday and everything seems to be back to normal, Some PRs will need to be rebased to pass the CI, but other than that, everything else is working normally.

    I will keep this issue open for a few more days, in case something goes wrong. Planning to close it on Friday.

  4. targos commented on May 28, 2024

    @targos
    Member

    What's the long term solution ? Is Microsoft aware of the MSVC bug?

  5. VXACDev commented on May 28, 2024

    @VXACDev

    Broken all over the place... The only "solution" with the current MSVC release is to #pragma optimize off/on around the problem function. REALLY not good-- this is impact MANY projects (including Unreal Engine)

  6. swaroop-sridhar commented on May 29, 2024

    @swaroop-sridhar

    Hi @targos @StefanStojanovic:
    I work for the MSVC optimizer team, and we want to look into the above failure and fix it.

    We'd really appreciate if you can provide a repro of the failure (ex: a pre-processed Cpp file and cl command line used) so that we can investigate the compiler error. Please file an issue with the repro at: https://developercommunity.visualstudio.com/cpp/report. Thanks.
    This will help to resolve the issue and unblock the VS-toolset update.

    Thanks.

  7. VXACDev commented on May 30, 2024

    @VXACDev
  8. StefanStojanovic commented on May 30, 2024

    @StefanStojanovic
    ContributorAuthor

    What's the long term solution ? Is Microsoft aware of the MSVC bug?

    I've brought this up in the conversation with my contact at Microsoft. He told me, he'll look into it and get back to me. I've also noticed there is a new version of VS v17.10.1 (still not in Chocolatey, but will be there in a few days probably). I'll try it locally to see if it compiles correctly.

  9. swaroop-sridhar commented on May 30, 2024

    @swaroop-sridhar

    Hi @StefanStojanovic it is still useful if you can file a developer community ticket with the repro at: https://developercommunity.visualstudio.com/cpp/report
    This way, the issue will be officially tracked and resolved.

    Thanks.

  10. targos commented on May 30, 2024

    @targos
    Member

    I tried the new version and it fails as well. I'll need some time to find a way to generate a preprocessed file to submit to the community forums

  11. targos commented on May 31, 2024

    @targos
    Member

    I don't really know what to do. As soon as I add /P to the MSVC arguments, compilation fails saying that it cannot find v8_pch.h.

  12. VXACDev commented on May 31, 2024

    @VXACDev
  13. 42 remaining items

  14. added a commit that references this issue on Aug 14, 2024
  15. targos commented on Aug 15, 2024

    @targos
    Member

    Good news: Visual Studio 17.11.0 was just released and the build works again (at least on my PC)!

  16. StefanStojanovic commented on Aug 16, 2024

    @StefanStojanovic
    ContributorAuthor

    Good news: Visual Studio 17.11.0 was just released and the build works again (at least on my PC)!

    I tested it as well and it works for me too. We can wait a week or two, for safety and then unblock VS upgrade in the CI and eventually reenable GH action for building Windows.

  17. liudonghua123 commented on Aug 17, 2024

    @liudonghua123

    For the vision of Visual Studio used in windows-latest/window-2022 environment, you can check it on https://github.com/actions/runner-images/blob/main/images/windows/Windows2022-Readme.md#visual-studio-enterprise-2022.

    And from the commit history, the update frequence seems to be a week.

  18. richardlau commented on Aug 17, 2024

    @richardlau
    Member

    For the vision of Visual Studio used in windows-latest/window-2022 environment, you can check it on https://github.com/actions/runner-images/blob/main/images/windows/Windows2022-Readme.md#visual-studio-enterprise-2022.

    actions/runner-images#10448

  19. targos commented on Aug 31, 2024

    @targos
    Member
  20. targos commented on Aug 31, 2024

    @targos
    Member

    GH Actions runs are green. @StefanStojanovic I let you close this as soon as Jenkins hosts are updated.

  21. StefanStojanovic commented on Sep 2, 2024

    @StefanStojanovic
    ContributorAuthor

    Thanks for enabling that @targos that's great! However, updating Jenkins CI won't be as straightforward as removing the Chocoaltey pin for VS and upgrading. While working on nodejs/node#54655 I did a lot of builds for all of the combinations (MSVC/ClangCL + x64/ARM64). I noticed that VS 17.11 MSVC + ARM64 doesn't compile (on VS 17.9 all works fine). The error I get is this:

    E:\work\node\deps\ngtcp2\nghttp3\lib\nghttp3_ringbuf.c(38,14): error C2169: '__popcnt': intrinsic function, cannot be defined [E:\work\node\deps\ngtcp2\nghttp3.vcxproj]
    E:\work\node\deps\ngtcp2\ngtcp2\lib\ngtcp2_ringbuf.c(36,21): error C2169: '__popcnt': intrinsic function, cannot be defined [E:\work\node\deps\ngtcp2\ngtcp2.vcxproj]
    

    I'm OOF this week, so when I'm back I'll open an issue for this, but we'll probably need to submit a fix upstream since this problem is with the dependency.

  22. StefanStojanovic commented on Dec 2, 2024

    @StefanStojanovic
    ContributorAuthor

    This was handled a long time ago, just not closed. Closing it now. Also there was another blocker (v17.12) which has its own issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions