Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[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
Milestone

Comments

@liukai12345614
Copy link

Setup

  • 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]

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

@dscho
Copy link
Member

dscho commented Dec 11, 2024

  • git version 2.47.0.windows.2

Could you try 2.47.1.windows.1 instead?

@liukai12345614
Copy link
Author

  • git version 2.47.0.windows.2

Could you try 2.47.1.windows.1 instead?

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

@dscho
Copy link
Member

dscho commented Dec 16, 2024

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.

@dscho dscho added this to the Next release milestone Dec 16, 2024
@dscho
Copy link
Member

dscho commented Dec 17, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants