[MSVC] protobuf failed to run test on Windows
#19584 opened on Dec 10, 2024
Description
What version of protobuf and what language are you using? Version: main Language: C++
What operating system (Linux, Windows, ...) and version? Windows Server 2022 Datacenter 21H2 What runtime / compiler are you using (e.g., python version or gcc version) VS 2022 What did you do? Steps to reproduce the behavior:
- git clone https://github.com/protocolbuffers/protobuf C:\gitP\google\protobuf
- Open VS2022 x64 Native Tools command.
- set CL=/std:c++17
- mkdir C:\gitP\google\protobuf\build_amd64 & cd C:\gitP\google\protobuf\build_amd64
- cmake -G "Visual Studio 17 2022" -A x64 -DCMAKE_SYSTEM_VERSION=10.0.22621.0 ..
- msbuild /m /p:Platform=x64 /p:Configuration=Release protobuf.sln /t:Rebuild
- cd /d C:\gitP\google\protobuf\build_amd64\Release
- .\tests.exe
- mkdir C:\gitP\google\protobuf\build_amd64_ltcg & cd C:\gitP\google\protobuf\build_amd64_ltcg
- cmake -G "Visual Studio 17 2022" -A x64 -DCMAKE_SYSTEM_VERSION=10.0.22621.0 -DCMAKE_EXE_LINKER_FLAGS="/LTCG" -DCMAKE_C_FLAGS="/GL" -DCMAKE_CXX_FLAGS="/GL" ..
- msbuild /m /p:Platform=x64 /p:Configuration=Release protobuf.sln /t:Rebuild
- cd /d C:\gitP\google\protobuf\build_amd64_ltcg\Release
- .\tests.exe
What did you expect to see all tests passed.
What did you see instead? F0000 00:00:1733798696.078170 7892 command_line_interface_unittest.cc:342] Check failed: File::GetContents(path, &file_contents, true) is OK (NOT_FOUND: Could not open file) *** Check failure stack trace: *** @ 00007FF6E87C4679 (unknown) @ 00007FF6E8219580 (unknown) @ 00007FF6E8219086 (unknown) @ 00007FF6E81FE676 (unknown) @ 00007FF6E878E51B (unknown) @ 00007FF6E878E406 (unknown) @ 00007FF6E87B68A0 (unknown) @ 00007FF6E87B6C76 (unknown) @ 00007FF6E87B75F8 (unknown) @ 00007FF6E878E55B (unknown) @ 00007FF6E878E4E6 (unknown) @ 00007FF6E87B6F46 (unknown) @ 00007FF6E88374E9 (unknown) @ 00007FF6E87FFB70 (unknown) @ 00007FFDEC5A4CB0 (unknown) @ 00007FFDED59EDCB (unknown)
[ RUN ] EditionMessageTest.ParseFromFileDescriptor F0000 00:00:1733798697.752301 8600 googletest.cc:122] Check failed: mkdir(name_.c_str(), 0777) == 0 File exists *** Check failure stack trace: *** @ 00007FF60D87A6B2 (unknown) @ 00007FF60D31F15C (unknown) @ 00007FF60DC3673B (unknown) @ 00007FF60DC35556 (unknown) @ 00007FF60DC1EAE6 (unknown) @ 00007FF60DC1F2A8 (unknown) @ 00007FF60DC2FD27 (unknown) @ 00007FF60DC369D9 (unknown) @ 00007FF60DC35712 (unknown) @ 00007FF60DC2E748 (unknown) @ 00007FF60DC7A560 (unknown) @ 00007FFDEC5A4CB0 (unknown) @ 00007FFDED59EDCB (unknown)
Detailed logs (using commit 75581bf): the logs when run step 8: commit_75581bf_step8.txt
the logs when run step 13: commit_75581bf_step13.txt
The below 2 logs which is using commit 0361a59 Test.log.8.txt Test.log.13.txt
Make sure you include information that can help us debug (full error message, exception listing, stack trace, logs).
Anything else we should know about your project / environment VS 2022