actions / runner-images

GitHub Actions runner images
MIT License
9.98k stars 3.02k forks source link

Unresolved external symbol in the C++ standard library for builds on image 20220814.1 #6091

Closed DSMitten closed 2 years ago

DSMitten commented 2 years ago

Description

Our build pipelines started failing today with the rollout of image 20220814.1 for windows-latest VM images.

We use vcpkg in our repo, and install the benchmark library with it, and build one of our target exes against that library. The library calls something in the standard library that uses _Find_unchecked which calls __std_find_trivial. The error is a linker error so somehow it is finding a forward declaration in the header file but not actually building the function, so by the time we are linking it, we hit unresolved external symbol errors.

We are completely blocked from building due to this. It doesn't repro on our local dev machines. Some of us have VS2022 17.2, some 17.3. None of us are hitting this build error locally - it only happens on the VM images.

Platforms affected

Virtual environments affected

Image version and build link

20220814.1

https://outlookweb.visualstudio.com/Outlook%20Web/_build/results?buildId=584985&view=logs&j=2678756e-65ab-598a-5894-e8f6dcceee25&t=9302dfd4-b676-4014-979a-8e5ff127e473

All of our builds are failing when built on machines with the new image because we link against the vcpkg benchmark library, and somehow it is compiling against in the standard library, fidns __std_find_trivial forward declared, but doesn't actually compile the function, resulting in a linker error due to an unresolved external symbol.

Is it regression?

20220808.1

Expected behavior

'benchmark' vcpkg package can be used as a dependency and linked successfully

Actual behavior

Build fails because google benchmark library included with vcpkg somehow has an unresolved external symbol from the standard library. This doesn't repro in the previous image or on our local dev machines.

Creating library [our target path].lib and object [our target path].exp

[error] benchmark.lib(benchmark_register.cc.obj) : error LNK2019: unresolved external symbol __std_find_trivial_1 referenced in function "char const __cdecl std::_Find_unchecked<char const ,unsigned char>(char const ,char const const,unsigned char const &)" (??$_Find_unchecked@PEBDE@std@@YAPEBDPEBDQEBDAEBE@Z)

[error] src\plat\win\win32\app\test\perftest_GoogleBenchmark\olkwin32-test-perf.exe : fatal error LNK1120: 1 unresolved externals

Repro steps

The only repro we know of is to build our project.

al-cheb commented 2 years ago

Hey @DSMitten. We don't have access to the link. Please provide minimal steps to reproduce the issue.

DSMitten commented 2 years ago

This only reproduces on this VM image. It doesn't repro on local dev machines or on last week's image.

Is it possible to find out what changed between the images? Different Visual Studio version, compiler version, or standard library?

al-cheb commented 2 years ago

@DSMitten , Different Visual Studio version, compiler version, or standard library? - yep, you can find them in https://github.com/actions/runner-images/pull/6078

DDoS commented 2 years ago

We're also having this issue with a few different Windows builds. It started failing without any changes on our side. We're also using vcpkg. From what I can tell this started when the image was upgraded to VS 17.3.

Here's the error for one project:

         FAILED: BuildIT/BuildITCore.dll BuildITCore.lib 
         cmd.exe /C "cd . && "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe" -E vs_link_dll --intdir=CMakeFiles\BuildITCore.dir --rc=C:\PROGRA~2\WI3CF2~1\10\bin\100226~1.0\x64\rc.exe --mt=C:\PROGRA~2\WI3CF2~1\10\bin\100226~1.0\x64\mt.exe --manifests  -- C:\PROGRA~1\MICROS~2\2022\ENTERP~1\VC\Tools\MSVC\1432~1.313\bin\HostX64\x64\link.exe /nologo @CMakeFiles\BuildITCore.rsp  /out:BuildIT\BuildITCore.dll /implib:BuildITCore.lib /pdb:BuildIT\BuildITCore.pdb /dll /version:0.0 /machine:x64 /debug /INCREMENTAL  && cmd.exe /C "cd /D D:\a\1\s\out\build\msvc-release && "C:\Program Files\PowerShell\7\pwsh.exe" -noprofile -executionpolicy Bypass -file C:/vcpkg/scripts/buildsystems/msbuild/applocal.ps1 -targetBinary D:/a/1/s/out/build/msvc-release/BuildIT/BuildITCore.dll -installedDir D:/a/1/s/out/build/msvc-release/vcpkg_installed/x64-windows/bin -OutVariable out""
         LINK Pass 1: command "C:\PROGRA~1\MICROS~2\2022\ENTERP~1\VC\Tools\MSVC\1432~1.313\bin\HostX64\x64\link.exe /nologo @CMakeFiles\BuildITCore.rsp /out:BuildIT\BuildITCore.dll /implib:BuildITCore.lib /pdb:BuildIT\BuildITCore.pdb /dll /version:0.0 /machine:x64 /debug /INCREMENTAL /MANIFEST /MANIFESTFILE:CMakeFiles\BuildITCore.dir/intermediate.manifest CMakeFiles\BuildITCore.dir/manifest.res" failed (exit code 1120) with the following output:
            Creating library BuildITCore.lib and object BuildITCore.exp
##[error]UVAtlas.lib(meshoptimizeboundaries.cpp.obj)(0,0): Error LNK2001: unresolved external symbol __std_find_trivial_4
     2>UVAtlas.lib(meshoptimizeboundaries.cpp.obj) : error LNK2001: unresolved external symbol __std_find_trivial_4 [D:\a\1\s\win\BuildITCore\BuildITCore.vcxproj]
##[error]UVAtlas.lib(isochartmesh.cpp.obj)(0,0): Error LNK2001: unresolved external symbol __std_find_trivial_4
     2>UVAtlas.lib(isochartmesh.cpp.obj) : error LNK2001: unresolved external symbol __std_find_trivial_4 [D:\a\1\s\win\BuildITCore\BuildITCore.vcxproj]
##[error]UVAtlas.lib(mergecharts.cpp.obj)(0,0): Error LNK2001: unresolved external symbol __std_find_trivial_4
     2>UVAtlas.lib(mergecharts.cpp.obj) : error LNK2001: unresolved external symbol __std_find_trivial_4 [D:\a\1\s\win\BuildITCore\BuildITCore.vcxproj]
##[error]UVAtlas.lib(meshpartitionchart.cpp.obj)(0,0): Error LNK2001: unresolved external symbol __std_find_trivial_4
     2>UVAtlas.lib(meshpartitionchart.cpp.obj) : error LNK2001: unresolved external symbol __std_find_trivial_4 [D:\a\1\s\win\BuildITCore\BuildITCore.vcxproj]
##[error]UVAtlas.lib(progressivemesh.cpp.obj)(0,0): Error LNK2001: unresolved external symbol __std_find_trivial_4
     2>UVAtlas.lib(progressivemesh.cpp.obj) : error LNK2001: unresolved external symbol __std_find_trivial_4 [D:\a\1\s\win\BuildITCore\BuildITCore.vcxproj]
##[error]UVAtlas.lib(mergecharts.cpp.obj)(0,0): Error LNK2019: unresolved external symbol __std_find_trivial_8 referenced in function "struct Isochart::ISOCHARTVERTEX * const * __cdecl std::_Find_unchecked<struct Isochart::ISOCHARTVERTEX * const *,struct Isochart::ISOCHARTVERTEX *>(struct Isochart::ISOCHARTVERTEX * const *,struct Isochart::ISOCHARTVERTEX * const * const,struct Isochart::ISOCHARTVERTEX * const &)" (??$_Find_unchecked@PEBQEAUISOCHARTVERTEX@Isochart@@PEAU12@@std@@YAPEBQEAUISOCHARTVERTEX@Isochart@@PEBQEAU12@QEBQEAU12@AEBQEAU12@@Z)
     2>UVAtlas.lib(mergecharts.cpp.obj) : error LNK2019: unresolved external symbol __std_find_trivial_8 referenced in function "struct Isochart::ISOCHARTVERTEX * const * __cdecl std::_Find_unchecked<struct Isochart::ISOCHARTVERTEX * const *,struct Isochart::ISOCHARTVERTEX *>(struct Isochart::ISOCHARTVERTEX * const *,struct Isochart::ISOCHARTVERTEX * const * const,struct Isochart::ISOCHARTVERTEX * const &)" (??$_Find_unchecked@PEBQEAUISOCHARTVERTEX@Isochart@@PEAU12@@std@@YAPEBQEAUISOCHARTVERTEX@Isochart@@PEBQEAU12@QEBQEAU12@AEBQEAU12@@Z) [D:\a\1\s\win\BuildITCore\BuildITCore.vcxproj]
##[error]UVAtlas.lib(meshpartitionchart.cpp.obj)(0,0): Error LNK2001: unresolved external symbol __std_find_trivial_8
     2>UVAtlas.lib(meshpartitionchart.cpp.obj) : error LNK2001: unresolved external symbol __std_find_trivial_8 [D:\a\1\s\win\BuildITCore\BuildITCore.vcxproj]
##[error]BuildIT\BuildITCore.dll(0,0): Error LNK1120: 2 unresolved externals
     2>BuildIT\BuildITCore.dll : fatal error LNK1120: 2 unresolved externals [D:\a\1\s\win\BuildITCore\BuildITCore.vcxproj]

And the error from another project:

FAILED: bin/libSlabSmartNative.dll lib/SlabSmartNative.lib 
cmd.exe /C "cd . && "C:\Program Files\CMake\bin\cmake.exe" -E vs_link_dll --intdir=CMakeFiles\SlabSmartNative.dir --rc=C:\PROGRA~2\WI3CF2~1\10\bin\100226~1.0\x64\rc.exe --mt=C:\PROGRA~2\WI3CF2~1\10\bin\100226~1.0\x64\mt.exe --manifests  -- C:\PROGRA~1\MICROS~2\2022\ENTERP~1\VC\Tools\MSVC\1432~1.313\bin\HostX64\x64\link.exe /nologo CMakeFiles\SlabSmartNative.dir\src\PointCloud.cpp.obj CMakeFiles\SlabSmartNative.dir\src\CloudCull.cpp.obj CMakeFiles\SlabSmartNative.dir\src\CloudFilter.cpp.obj CMakeFiles\SlabSmartNative.dir\src\CpeCloudReaderWriter.cpp.obj CMakeFiles\SlabSmartNative.dir\src\FloorAnalysis.cpp.obj CMakeFiles\SlabSmartNative.dir\src\FlsCloudReader.cpp.obj CMakeFiles\SlabSmartNative.dir\src\CloudRegistration.cpp.obj  /out:bin\libSlabSmartNative.dll /implib:lib\SlabSmartNative.lib /pdb:bin\libSlabSmartNative.pdb /dll /version:0.0 /machine:x64 /debug /INCREMENTAL  lib\SlabshotFFA.lib  lib\BuildITCore.lib  lib\cpelib.lib  lib\FARO.RLY.1.3.0.lib  lib\FocusPortableScanReader.lib  vcpkg_installed\x64-windows-static-release\lib\qhullstatic_r.lib  vcpkg_installed\x64-windows-static-release\lib\UVAtlas.lib  lib\LevMarq.lib  vcpkg_installed\x64-windows-static-release\lib\ceres.lib  vcpkg_installed\x64-windows-static-release\lib\glog.lib  vcpkg_installed\x64-windows-static-release\lib\gflags_static.lib  vcpkg_installed\x64-windows-static-release\lib\opencv_imgproc.lib  vcpkg_installed\x64-windows-static-release\lib\opencv_core.lib  lib\FocusScanData.lib  lib\FocusScanCalib.lib  msvc_19.32_cxx_64_md_relwithdebinfo\tbb12.lib  vcpkg_installed\x64-windows-static-release\lib\opencv_calib3d.lib  vcpkg_installed\x64-windows-static-release\lib\opencv_features2d.lib  vcpkg_installed\x64-windows-static-release\lib\opencv_flann.lib  vcpkg_installed\x64-windows-static-release\lib\opencv_imgcodecs.lib  lib\FocusRawDataRead.lib  lib\FocusDataStructures.lib  lib\AttributeContainer.lib  lib\FocusAlgorithms.lib  lib\ErrorHandling.lib  lib\DataStructures.lib  vcpkg_installed\x64-windows-static-release\lib\opencv_imgproc.lib  vcpkg_installed\x64-windows-static-release\lib\ceres.lib  vcpkg_installed\x64-windows-static-release\lib\glog.lib  dbghelp.lib  vcpkg_installed\x64-windows-static-release\lib\gflags_static.lib  shlwapi.lib  vcpkg_installed\x64-windows-static-release\lib\opencv_core.lib  vcpkg_installed\x64-windows-static-release\lib\zlib.lib  kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib  && cmd.exe /C "cd /D D:\a\1\s\out\build\windows-x64-release && "C:\Program Files\PowerShell\7\pwsh.exe" -noprofile -executionpolicy Bypass -file C:/vcpkg/scripts/buildsystems/msbuild/applocal.ps1 -targetBinary D:/a/1/s/out/build/windows-x64-release/bin/libSlabSmartNative.dll -installedDir D:/a/1/s/out/build/windows-x64-release/vcpkg_installed/x64-windows-static-release/bin -OutVariable out""
LINK Pass 1: command "C:\PROGRA~1\MICROS~2\2022\ENTERP~1\VC\Tools\MSVC\1432~1.313\bin\HostX64\x64\link.exe /nologo CMakeFiles\SlabSmartNative.dir\src\PointCloud.cpp.obj CMakeFiles\SlabSmartNative.dir\src\CloudCull.cpp.obj CMakeFiles\SlabSmartNative.dir\src\CloudFilter.cpp.obj CMakeFiles\SlabSmartNative.dir\src\CpeCloudReaderWriter.cpp.obj CMakeFiles\SlabSmartNative.dir\src\FloorAnalysis.cpp.obj CMakeFiles\SlabSmartNative.dir\src\FlsCloudReader.cpp.obj CMakeFiles\SlabSmartNative.dir\src\CloudRegistration.cpp.obj /out:bin\libSlabSmartNative.dll /implib:lib\SlabSmartNative.lib /pdb:bin\libSlabSmartNative.pdb /dll /version:0.0 /machine:x64 /debug /INCREMENTAL lib\SlabshotFFA.lib lib\BuildITCore.lib lib\cpelib.lib lib\FARO.RLY.1.3.0.lib lib\FocusPortableScanReader.lib vcpkg_installed\x64-windows-static-release\lib\qhullstatic_r.lib vcpkg_installed\x64-windows-static-release\lib\UVAtlas.lib lib\LevMarq.lib vcpkg_installed\x64-windows-static-release\lib\ceres.lib vcpkg_installed\x64-windows-static-release\lib\glog.lib vcpkg_installed\x64-windows-static-release\lib\gflags_static.lib vcpkg_installed\x64-windows-static-release\lib\opencv_imgproc.lib vcpkg_installed\x64-windows-static-release\lib\opencv_core.lib lib\FocusScanData.lib lib\FocusScanCalib.lib msvc_19.32_cxx_64_md_relwithdebinfo\tbb12.lib vcpkg_installed\x64-windows-static-release\lib\opencv_calib3d.lib vcpkg_installed\x64-windows-static-release\lib\opencv_features2d.lib vcpkg_installed\x64-windows-static-release\lib\opencv_flann.lib vcpkg_installed\x64-windows-static-release\lib\opencv_imgcodecs.lib lib\FocusRawDataRead.lib lib\FocusDataStructures.lib lib\AttributeContainer.lib lib\FocusAlgorithms.lib lib\ErrorHandling.lib lib\DataStructures.lib vcpkg_installed\x64-windows-static-release\lib\opencv_imgproc.lib vcpkg_installed\x64-windows-static-release\lib\ceres.lib vcpkg_installed\x64-windows-static-release\lib\glog.lib dbghelp.lib vcpkg_installed\x64-windows-static-release\lib\gflags_static.lib shlwapi.lib vcpkg_installed\x64-windows-static-release\lib\opencv_core.lib vcpkg_installed\x64-windows-static-release\lib\zlib.lib kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib /MANIFEST /MANIFESTFILE:CMakeFiles\SlabSmartNative.dir/intermediate.manifest CMakeFiles\SlabSmartNative.dir/manifest.res" failed (exit code 1120) with the following output:
tbb12.lib(allocator.cpp.obj) : MSIL .netmodule or module compiled with /GL found; restarting link with /LTCG; add /LTCG to the link command line to improve linker performance
LINK : warning LNK4075: ignoring '/INCREMENTAL' due to '/LTCG' specification
   Creating library lib\SlabSmartNative.lib and object lib\SlabSmartNative.exp
ceres.lib(problem_impl.cc.obj) : error LNK2001: unresolved external symbol __std_find_trivial_8
glog.lib(logging.cc.obj) : error LNK2001: unresolved external symbol __std_find_trivial_8
ceres.lib(trust_region_minimizer.cc.obj) : error LNK2001: unresolved external symbol __std_find_trivial_4
ceres.lib(reorder_program.cc.obj) : error LNK2001: unresolved external symbol __std_find_trivial_4
glog.lib(logging.cc.obj) : error LNK2001: unresolved external symbol __std_find_trivial_1
bin\libSlabSmartNative.dll : fatal error LNK1120: 3 unresolved externals
equeim commented 2 years ago

I also experience similar error when linking to Qt built by vcpkg using x64-windows-static triplet (on GitHub Actions):

  Qt6Networkd.lib(qtlsbackend.cpp.obj) : error LNK2019: unresolved external symbol __std_find_trivial_8 referenced in function "class QTlsBackend * * __cdecl __std_find_trivial<class QTlsBackend *,unsigned __int64>(class QTlsBackend * *,class QTlsBackend * *,unsigned __int64)" (??$__std_find_trivial@PEAVQTlsBackend@@_K@@YAPEAPEAVQTlsBackend@@PEAPEAV0@0_K@Z)
  Qt6Cored.lib(qobject.cpp.obj) : error LNK2001: unresolved external symbol __std_find_trivial_8
  Qt6Networkd.lib(qhsts.cpp.obj) : error LNK2019: unresolved external symbol __std_find_trivial_1 referenced in function "char const * __cdecl __std_find_trivial<char const ,char>(char const *,char const *,char)" (??$__std_find_trivial@$$CBDD@@YAPEBDPEBD0D@Z)
  Qt6Cored.lib(qstring.cpp.obj) : error LNK2019: unresolved external symbol __std_find_trivial_4 referenced in function "int const * __cdecl __std_find_trivial<int const ,int>(int const *,int const *,int)" (??$__std_find_trivial@$$CBHH@@YAPEBHPEBH0H@Z)
mknejp commented 2 years ago

We get similar errors using Catch2 and vcpkg

Catch2.lib(catch_matchers_string.cpp.obj) : error LNK2019: unresolved external symbol __std_find_trivial_1 referenced in function "char const * __cdecl std::_Find_unchecked<char const *,unsigned char>(char const *,char const * const,unsigned char const &)"
Catch2.lib(catch_reporter_spec_parser.cpp.obj) : error LNK2001: unresolved external symbol __std_find_trivial_1

A local build with cleared binary cache using vcpkg d293ac220 and VS Professional 17.3.1 succeeds.

AenBleidd commented 2 years ago

I can confirm that this happens with the latest update of WIndows image: https://github.com/BOINC/boinc-apps/runs/7871981783?check_suite_focus=true

fwosar commented 2 years ago

We are experiencing the same issue with vcpkg and Crypto++:

cryptopp-static.lib(oaep.cpp.obj) : error LNK2019: unresolved external symbol ___std_find_trivial_1@12 referenced in function "unsigned char * __cdecl __std_find_trivial<unsigned char,int>(unsigned char *,unsigned char *,int)" (??$__std_find_trivial@EH@@YAPAEPAE0H@Z)

It started happening with the latest runner image update. Is there any way to pin the runner image used in a workflow? Because the current situation is kinda awkward and prevents us from creating any builds using our workflow-based build pipeline.

lisaong commented 2 years ago

hey @al-cheb , here's a minimal repro that builds a catch2 test using vcpkg @ 23cc584

MSBuild version 17.3.0+f67e3d35e for .NET Framework
  Checking Build System
  Building Custom Rule D:/a/accera-llvm-canary/accera-llvm-canary/CMakeLists.txt
  test.cpp
Catch2.lib(catch_matchers_string.cpp.obj) : error LNK2019: unresolved external symbol __std_find_trivial_1 referenced in function "char const * __cdecl std::_Find_unchecked<char const *,unsigned char>(char const *,char const * const,unsigned char const &)" (??$_Find_unchecked@PEBDE@std@@YAPEBDPEBDQEBDAEBE@Z) [D:\a\accera-llvm-canary\accera-llvm-canary\build\tests.vcxproj]
Catch2.lib(catch_reporter_spec_parser.cpp.obj) : error LNK2001: unresolved external symbol __std_find_trivial_1 [D:\a\accera-llvm-canary\accera-llvm-canary\build\tests.vcxproj]
D:\a\accera-llvm-canary\accera-llvm-canary\build\Release\tests.exe : fatal error LNK1120: 1 unresolved externals [D:\a\accera-llvm-canary\accera-llvm-canary\build\tests.vcxproj]

Github action: https://github.com/lisaong/accera-llvm-canary/runs/7890007951?check_suite_focus=true

Steps: https://github.com/lisaong/accera-llvm-canary/blob/main/.github/workflows/repro.yml

al-cheb commented 2 years ago

@AenBleidd, Do you have any ideas why cmake picks up MSVC/14.32.31326 instead of MSVC/14.33.31629 ?

AenBleidd commented 2 years ago

@al-cheb, I don't have an answer for you. I believe, cmake picks up the compiler that is set 'by default' on the system. I can assume that it's an issue with MSVC configuration/installation. Maybe. MSVC/14.32.31326 was installed after MSVC/14.33.31629 in the provisioning script. But I'm not an expert here.

friendlyanon commented 2 years ago

CMake's VS selection logic is implemented in cmVSSetupHelper.cxx. In cmVSSetupAPIHelper::EnumerateAndChooseVSInstance(), you can see that it fetches the installed VS versions via COM or falls back to VsWhere. If CMake knows what version it's looking for, then it will pick the first one in the order that the previous facilities return them.

al-cheb commented 2 years ago

Could someone try this workaround?

- run: |
          Set-Location "C:\Program Files (x86)\Microsoft Visual Studio\Installer\"
          $InstallPath = "C:\Program Files\Microsoft Visual Studio\2022\Enterprise"
          $componentsToRemove= @(
            "Microsoft.VisualStudio.Component.VC.14.32.17.2.ARM"
            "Microsoft.VisualStudio.Component.VC.14.32.17.2.ARM.Spectre"
            "Microsoft.VisualStudio.Component.VC.14.32.17.2.ARM64"
            "Microsoft.VisualStudio.Component.VC.14.32.17.2.ARM64.Spectre"
            "Microsoft.VisualStudio.Component.VC.14.32.17.2.x86.x64"
            "Microsoft.VisualStudio.Component.VC.14.32.17.2.x86.x64.Spectre"
            "Microsoft.VisualStudio.Component.VC.14.32.17.2.ATL"
            "Microsoft.VisualStudio.Component.VC.14.32.17.2.ATL.Spectre"
            "Microsoft.VisualStudio.Component.VC.14.32.17.2.ATL.ARM"
            "Microsoft.VisualStudio.Component.VC.14.32.17.2.ATL.ARM.Spectre"
            "Microsoft.VisualStudio.Component.VC.14.32.17.2.ATL.ARM64"
            "Microsoft.VisualStudio.Component.VC.14.32.17.2.ATL.ARM64.Spectre"
            "Microsoft.VisualStudio.Component.VC.14.32.17.2.MFC"
            "Microsoft.VisualStudio.Component.VC.14.32.17.2.MFC.Spectre"
            "Microsoft.VisualStudio.Component.VC.14.32.17.2.MFC.ARM"
            "Microsoft.VisualStudio.Component.VC.14.32.17.2.MFC.ARM.Spectre"
            "Microsoft.VisualStudio.Component.VC.14.32.17.2.MFC.ARM64"
            "Microsoft.VisualStudio.Component.VC.14.32.17.2.MFC.ARM64.Spectre"
          )
          [string]$workloadArgs = $componentsToRemove | ForEach-Object {" --remove " +  $_}
          $Arguments = ('/c', "vs_installer.exe", 'modify', '--installPath', "`"$InstallPath`"",$workloadArgs, '--quiet', '--norestart', '--nocache')
          # should be run twice
          $process = Start-Process -FilePath cmd.exe -ArgumentList $Arguments -Wait -PassThru -WindowStyle Hidden
          $process = Start-Process -FilePath cmd.exe -ArgumentList $Arguments -Wait -PassThru -WindowStyle Hidden
AenBleidd commented 2 years ago

I can

AenBleidd commented 2 years ago

@al-cheb, please track build process here: https://github.com/BOINC/boinc-apps/actions/runs/2881893859

al-cheb commented 2 years ago

@AenBleidd, Thank you. I hope we can start a new deployment with fix on Monday.

fwosar commented 2 years ago

Can confirm that the workaround appears to work for us as well.

al-cheb commented 2 years ago

The new Windows Server 2022 image has been deployed.

AenBleidd commented 2 years ago

I can confirm this issue is resolved with the new Windows Server 2022 image without any workaround. @al-cheb, thanks for the quick fix!

eladmaimoni commented 2 years ago

@al-cheb @AenBleidd

I stumbled upon this thread while google-searching this linker issue. It appeared in a small executable that uses vcpkg after upgrading to Visual Studio 2022 17.3.3.

Can you please explain what exactly is the issue? what is the workaround?

vkaytsanov commented 1 year ago

@al-cheb Issue still persists, even with the provided workaround. Not using vckpg, but submodules

Build FAILED.

       "D:\a\Lib\Lib\Projects\UnitTests\UnitTests.vcxproj" (Build target) (1) ->
       "D:\a\Lib\Lib\Projects\Engine\Engine.vcxproj" (default target) (2) ->
       "D:\a\Lib\Lib\Projects\ShaderCompiler\ShaderCompiler.vcxproj" (default target) (8) ->
       (Link target) -> 
         SPIRV-Tools-opt.lib(cfg.obj) : error LNK2001: unresolved external symbol __std_find_trivial_4 [D:\a\Lib\Lib\Projects\ShaderCompiler\ShaderCompiler.vcxproj]
         SPIRV-Tools-opt.lib(loop_fusion.obj) : error LNK2001: unresolved external symbol __std_find_trivial_4 [D:\a\Lib\Lib\Projects\ShaderCompiler\ShaderCompiler.vcxproj]
         SPIRV-Tools.lib(validate_mode_setting.obj) : error LNK2001: unresolved external symbol __std_find_trivial_4 [D:\a\Lib\Lib\Projects\ShaderCompiler\ShaderCompiler.vcxproj]
         spirv-cross-cored.lib(spirv_cfg.obj) : error LNK2001: unresolved external symbol __std_find_trivial_4 [D:\a\Lib\Lib\Projects\ShaderCompiler\ShaderCompiler.vcxproj]
         SPIRV-Tools-opt.lib(loop_descriptor.obj) : error LNK2001: unresolved external symbol __std_find_trivial_4 [D:\a\Lib\Lib\Projects\ShaderCompiler\ShaderCompiler.vcxproj]
         SPIRV-Tools-opt.lib(loop_peeling.obj) : error LNK2001: unresolved external symbol __std_find_trivial_4 [D:\a\Lib\Lib\Projects\ShaderCompiler\ShaderCompiler.vcxproj]
         SPIRV-Tools-opt.lib(merge_return_pass.obj) : error LNK2001: unresolved external symbol __std_find_trivial_4 [D:\a\Lib\Lib\Projects\ShaderCompiler\ShaderCompiler.vcxproj]
         SPIRV-Tools-opt.lib(loop_dependence.obj) : error LNK2001: unresolved external symbol __std_find_trivial_8 [D:\a\Lib\Lib\Projects\ShaderCompiler\ShaderCompiler.vcxproj]
         SPIRV-Tools-opt.lib(loop_fusion.obj) : error LNK2001: unresolved external symbol __std_find_trivial_8 [D:\a\Lib\Lib\Projects\ShaderCompiler\ShaderCompiler.vcxproj]
         SPIRV-Tools.lib(validate_cfg.obj) : error LNK2001: unresolved external symbol __std_find_trivial_8 [D:\a\Lib\Lib\Projects\ShaderCompiler\ShaderCompiler.vcxproj]
         SPIRV-Tools-opt.lib(merge_return_pass.obj) : error LNK2001: unresolved external symbol __std_find_trivial_8 [D:\a\Lib\Lib\Projects\ShaderCompiler\ShaderCompiler.vcxproj]
         SPIRV-Tools-opt.lib(types.obj) : error LNK2001: unresolved external symbol __std_find_trivial_8 [D:\a\Lib\Lib\Projects\ShaderCompiler\ShaderCompiler.vcxproj]
         SPIRV-Tools-opt.lib(dominator_tree.obj) : error LNK2001: unresolved external symbol __std_find_trivial_8 [D:\a\Lib\Lib\Projects\ShaderCompiler\ShaderCompiler.vcxproj]
         SPIRV-Tools-opt.lib(decoration_manager.obj) : error LNK2001: unresolved external symbol __std_find_trivial_8 [D:\a\Lib\Lib\Projects\ShaderCompiler\ShaderCompiler.vcxproj]
         SPIRV-Tools-opt.lib(loop_descriptor.obj) : error LNK2001: unresolved external symbol __std_find_trivial_8 [D:\a\Lib\Lib\Projects\ShaderCompiler\ShaderCompiler.vcxproj]
         SPIRV-Tools-opt.lib(dead_insert_elim_pass.obj) : error LNK2001: unresolved external symbol __std_find_trivial_8 [D:\a\Lib\Lib\Projects\ShaderCompiler\ShaderCompiler.vcxproj]
         SPIRV-Tools-opt.lib(local_access_chain_convert_pass.obj) : error LNK2001: unresolved external symbol __std_find_trivial_8 [D:\a\Lib\Lib\Projects\ShaderCompiler\ShaderCompiler.vcxproj]
         SPIRV-Tools-opt.lib(loop_unswitch_pass.obj) : error LNK2001: unresolved external symbol __std_find_trivial_8 [D:\a\Lib\Lib\Projects\ShaderCompiler\ShaderCompiler.vcxproj]
         SPIRV-Tools.lib(assembly_grammar.obj) : error LNK2019: unresolved external symbol __std_find_trivial_1 referenced in function "char const * __cdecl __std_find_trivial<char const ,char>(char const *,char const *,char)" (??$__std_find_trivial@$$CBDD@@YAPEBDPEBD0D@Z) [D:\a\Lib\Lib\Projects\ShaderCompiler\ShaderCompiler.vcxproj]
         D:\a\Lib\Lib\Tools\..\Projects\..\Build\Debug\ShaderCompiler.Windows.dll : fatal error LNK1120: 3 unresolved externals [D:\a\Lib\Lib\Projects\ShaderCompiler\ShaderCompiler.vcxproj]
Anton-V-K commented 1 year ago

I'm facing same/similar issue when linking against jsoncpp (x64-windows-static or x86-windows-static) with VS2022 17.3.4:

jsoncpp.lib(json_reader.cpp.obj) : error LNK2001: unresolved external symbol ___std_find_trivial_1@12

I'm not using pre-configured image, just vcpkg and built-in integration with VS2022. I wonder what is the cause of such issue and how can it be resolved? Judging from comments it seems to be caused by a bug in MSVC compiler, or am I overlooking something?

vkaytsanov commented 1 year ago

@Anton-V-K I suggest you to try to change the runner from windows-latest to windows-2019 as specified in the docs https://docs.github.com/en/actions/using-jobs/choosing-the-runner-for-a-job

This is how I resolved my issue

Jasper-Li commented 1 year ago

I'm facing same/similar issue when linking against jsoncpp (x64-windows-static or x86-windows-static) with VS2022 17.3.4:

jsoncpp.lib(json_reader.cpp.obj) : error LNK2001: unresolved external symbol ___std_find_trivial_1@12

I'm not using pre-configured image, just vcpkg and built-in integration with VS2022. I wonder what is the cause of such issue and how can it be resolved? Judging from comments it seems to be caused by a bug in MSVC compiler, or am I overlooking something?

I have the same issue on linking jsoncpp in static mode with VS2022 17.0.4, while it works in VS2022 17.3.6. The jsoncpp static lib is built in VS2022 17.3.6. I will try to upgrade my VS2022.