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

Google_protobuf failed to build with debug configuration #4409

Closed
shanshan0309 opened this issue Mar 22, 2018 · 8 comments
Closed

Google_protobuf failed to build with debug configuration #4409

shanshan0309 opened this issue Mar 22, 2018 · 8 comments
Assignees

Comments

@shanshan0309
Copy link

Environment:
Windows Server 2016 + VS2017 Update 5 + Google_protobuf master branch latest srouce code

I tried to build Google_protobuf with debug configuration on Windows but failed. Could you please help take a look at this? Thanks in advance!

Steps to Reproduce:

  1. git clone https://github.com/google/protobuf.git D:\Google-Protobuf\src
  2. Open a VS 2017 command prompt and browse to D:\Google-Protobuf
  3. mkdir build_x86 && pushd build_x86
  4. cmake -G "Visual Studio 15 2017" -DCMAKE_SYSTEM_VERSION=10.0.16299.0 ..\src\cmake
  5. popd
  6. msbuild /p:Configuration=Debug;Platform=Win32 build_x86\protobuf.sln /t:Rebuild

Actual result:
3 projects failed. The full log file is attached.
log_x86_build.log

Build FAILED.
"D:\Google-Protobuf\build_x86\protobuf.sln" (Rebuild target) (1) ->
"D:\Google-Protobuf\build_x86\ALL_BUILD.vcxproj.metaproj" (Rebuild target) (2) ->
"D:\Google-Protobuf\build_x86\lite-arena-test.vcxproj.metaproj" (Rebuild target) (16) ->
"D:\Google-Protobuf\build_x86*lite-arena-test.vcxproj*" (Rebuild target) (19) ->
(CustomBuild target) ->
C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\VC\VCTargets\Microsoft.CppCommon.targets(171,5): error MSB6006: "cmd.exe" exited with code 3. [D:\Google-Protobuf\build_x86\lite-arena-test.vcxproj]

"D:\Google-Protobuf\build_x86\protobuf.sln" (Rebuild target) (1) ->
"D:\Google-Protobuf\build_x86\ALL_BUILD.vcxproj.metaproj" (Rebuild target) (2) ->
"D:\Google-Protobuf\build_x86\lite-test.vcxproj.metaproj" (Rebuild target) (20) ->
"D:\Google-Protobuf\build_x86**lite-test.vcxpro**j" (Rebuild target) (21) ->
C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\VC\VCTargets\Microsoft.CppCommon.targets(171,5): error MSB6006: "cmd.exe" exited with code 3. [D:\Google-Protobuf\build_x86\lite-test.vcxproj]

"D:\Google-Protobuf\build_x86\protobuf.sln" (Rebuild target) (1) ->
"D:\Google-Protobuf\build_x86\ALL_BUILD.vcxproj.metaproj" (Rebuild target) (2) ->
"D:\Google-Protobuf\build_x86\tests.vcxproj.metaproj" (Rebuild target) (24) ->
"D:\Google-Protobuf\build_x86*tests.vcxproj*" (Rebuild target) (25) ->
C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\VC\VCTargets\Microsoft.CppCommon.targets(171,5): error MSB6006: "cmd.exe" exited with code 3. [D:\Google-Protobuf\build_x86\tests.vcxproj]

@shanshan0309
Copy link
Author

Hi, any update for this?

@xfxyjwf
Copy link
Contributor

xfxyjwf commented Mar 23, 2018

It seems protoc check-failed when invoked to compile test protos. Relevant error message in the output log:


CustomBuild:
  Building Custom Rule D:/Google-Protobuf/src/cmake/CMakeLists.txt
  CMake does not need to re-run because D:/Google-Protobuf/build_x86/CMakeFiles/generate.stamp is up-to-date.
  Generating D:/Google-Protobuf/src/src/google/protobuf/any_test.pb.cc
  [libprotobuf FATAL D:\Google-Protobuf\src\src\google\protobuf\generated_message_reflection.cc:2372] CHECK failed: file != NULL: 
C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\VC\VCTargets\Microsoft.CppCommon.targets(171,5): error MSB6006: "cmd.exe" exited with code 3. [D:\Google-Protobuf\build_x86\tests.vcxproj]
Done Building Project "D:\Google-Protobuf\build_x86\tests.vcxproj" (Rebuild target(s)) -- FAILED.

@xfxyjwf
Copy link
Contributor

xfxyjwf commented Mar 23, 2018

@shanshan0309 What version of protobuf are you using? Could you try 3.5.2?

@shanshan0309
Copy link
Author

Thanks for looking into this issue, @xfxyjwf. The version of protobuf I currently use is 3.5.1. I don't seem to see the version 3.5.2 from https://github.com/google/protobuf/releases. The latest version is 3.5.1 in this link.

@xfxyjwf
Copy link
Contributor

xfxyjwf commented Mar 26, 2018

I was able to build 3.5.1 with Visual Studio 2017. Can you double check your version number? Your repo instruction seems suggest you are git clone from head, but depending on when you clone, it could be different versions.

@xfxyjwf xfxyjwf self-assigned this Mar 26, 2018
@shanshan0309
Copy link
Author

Thanks, @xfxyjwf. We used the latest revision 416d418 in master branch, but still failed.

@xfxyjwf
Copy link
Contributor

xfxyjwf commented Jun 16, 2018

I think I have identified the cause of the issue:
#4773

@xfxyjwf
Copy link
Contributor

xfxyjwf commented Jun 25, 2018

I'm closing this one. Please follow up the progress in #4773 .

@xfxyjwf xfxyjwf closed this as completed Jun 25, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants