You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[MSVC] Report error: git\t\unit-tests\clar\clar.c(209,1): error C1083: Cannot open include file: 'clar.suite': No such file or directory on build step
#5308
Open
liukai12345614 opened this issue
Dec 11, 2024
· 4 comments
Which version of Git for Windows are you using? Is it 32-bit or 64-bit?
64-bit
$ git --version --build-options
git version 2.47.0.windows.2
Which version of Windows are you running? Vista, 7, 8, 10? Is it 32-bit or 64-bit?
Windows Server 2022 Datacenter 21H2 64-bit Visual Studio 2022 v17.12.0
Description:
After executing the command "msbuild /m /p:Platform=x64 /p:Configuration=Release git.sln /t:Rebuild 2>&1", an error is reported:
C:\gitP\git-for-windows\git\t\unit-tests\clar\clar.c(209,1): error C1083: Cannot open include file: 'clar.suite': No such file or directory (C:\repos\msvc\src\vctools\Compiler\CxxFE\sl\p1\c\p0prepro.c:2139) [C:\gitP\git-for-windows\git\contrib\buildsystems\out\unit-tests-lib.vcxproj]
C:\gitP\git-for-windows\git\t\unit-tests\unit-test.h(3,1): error C1083: Cannot open include file: 'clar-decls.h': No such file or directory (C:\repos\msvc\src\vctools\Compiler\CxxFE\sl\p1\c\p0prepro.c:2139) [C:\gitP\git-for-windows\git\contrib\buildsystems\out\unit-tests-lib.vcxproj]
C:\gitP\git-for-windows\git\t\unit-tests\unit-test.h(3,1): error C1083: Cannot open include file: 'clar-decls.h': No such file or directory (C:\repos\msvc\src\vctools\Compiler\CxxFE\sl\p1\c\p0prepro.c:2139) [C:\gitP\git-for-windows\git\contrib\buildsystems\out\unit-tests-lib.vcxproj]
C:\gitP\git-for-windows\git\t\unit-tests\clar\clar.c(209,60): fatal error C1083: Cannot open include file: 'clar.suite': No such file or directory (C:\repos\msvc\src\vctools\Compiler\CxxFE\sl\p1\c\p0prepro.c:2139) [C:\gitP\git-for-windows\git\contrib\buildsystems\out\unit-tests-lib.vcxproj]
C:\gitP\git-for-windows\git\t\unit-tests\clar\clar.c(209,60): error C1083: Cannot open include file: 'clar.suite': No such file or directory (C:\repos\msvc\src\vctools\Compiler\CxxFE\sl\p1\c\p0prepro.c:2139) [C:\gitP\git-for-windows\git\contrib\buildsystems\out\unit-tests-lib.vcxproj]
Hi dscho, the sha used in step 3 git -C "C:\gitP\git-for-windows\git" checkout 2cd2243 is the same as the sha of 2.47.1.windows.1, so the version I use should be 2.47.1.windows.1
The file clar.suite should be written as part of the CMake invocation.
However, it looks as if it is written to the build directory, while the #include expects it in the source directory. In CI builds we reuse the source directory as build directory, which is the reason why this was not caught earlier.
The bug is fixed in 30bf9f0, which looks like it will be part of Git v2.48.0.
Setup
64-bit
$ git --version --build-options
git version 2.47.0.windows.2
Windows Server 2022 Datacenter 21H2 64-bit Visual Studio 2022 v17.12.0
Description:
After executing the command "msbuild /m /p:Platform=x64 /p:Configuration=Release git.sln /t:Rebuild 2>&1", an error is reported:
C:\gitP\git-for-windows\git\t\unit-tests\clar\clar.c(209,1): error C1083: Cannot open include file: 'clar.suite': No such file or directory (C:\repos\msvc\src\vctools\Compiler\CxxFE\sl\p1\c\p0prepro.c:2139) [C:\gitP\git-for-windows\git\contrib\buildsystems\out\unit-tests-lib.vcxproj]
C:\gitP\git-for-windows\git\t\unit-tests\unit-test.h(3,1): error C1083: Cannot open include file: 'clar-decls.h': No such file or directory (C:\repos\msvc\src\vctools\Compiler\CxxFE\sl\p1\c\p0prepro.c:2139) [C:\gitP\git-for-windows\git\contrib\buildsystems\out\unit-tests-lib.vcxproj]
C:\gitP\git-for-windows\git\t\unit-tests\unit-test.h(3,1): error C1083: Cannot open include file: 'clar-decls.h': No such file or directory (C:\repos\msvc\src\vctools\Compiler\CxxFE\sl\p1\c\p0prepro.c:2139) [C:\gitP\git-for-windows\git\contrib\buildsystems\out\unit-tests-lib.vcxproj]
C:\gitP\git-for-windows\git\t\unit-tests\clar\clar.c(209,60): fatal error C1083: Cannot open include file: 'clar.suite': No such file or directory (C:\repos\msvc\src\vctools\Compiler\CxxFE\sl\p1\c\p0prepro.c:2139) [C:\gitP\git-for-windows\git\contrib\buildsystems\out\unit-tests-lib.vcxproj]
C:\gitP\git-for-windows\git\t\unit-tests\clar\clar.c(209,60): error C1083: Cannot open include file: 'clar.suite': No such file or directory (C:\repos\msvc\src\vctools\Compiler\CxxFE\sl\p1\c\p0prepro.c:2139) [C:\gitP\git-for-windows\git\contrib\buildsystems\out\unit-tests-lib.vcxproj]
Repro steps:
1.Open a Windows Command Prompt
2.git -C "C:\gitP" clone --no-checkout https://github.com/git-for-windows/git git-for-windows\git
3.git -C "C:\gitP\git-for-windows\git" checkout 2cd2243
4.set VSCMD_SKIP_SENDTELEMETRY=1 & "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\Tools\VsDevCmd.bat" -host_arch=amd64 -arch=amd64 & set CL= /Bcapture_repro C:\a_work_temp\rwc_project_logs\Git\preprocessed_repro_setup & set LINK= /onfailrepro:C:\a_work_temp\rwc_project_logs\Git\link_repro_setup
5.set PATH=C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin;%PATH%
6.cd /d C:\gitP\git-for-windows\git\compat\vcbuild
7.vcpkg_install.bat x64-windows 2>&1
8.cd /d C:\gitP\git-for-windows\git\contrib\buildsystems\out
9.cmake -G "Visual Studio 17 2022" -A x64 -DCMAKE_SYSTEM_VERSION=10.0.22621.0 ..
10.msbuild /m /p:Platform=x64 /p:Configuration=Release git.sln /t:Rebuild
The text was updated successfully, but these errors were encountered: