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

Protobuf 3.6 build failure with MSVC2017 #4963

Closed
IvanPizhenko opened this issue Jul 25, 2018 · 6 comments
Closed

Protobuf 3.6 build failure with MSVC2017 #4963

IvanPizhenko opened this issue Jul 25, 2018 · 6 comments
Assignees

Comments

@IvanPizhenko
Copy link

IvanPizhenko commented Jul 25, 2018

What version of protobuf and what language are you using?
Version: v3.6.0
Language: C++

What operating system (Linux, Windows, ...) and version?
Windows 2008 Server R2 x64

What runtime / compiler are you using (e.g., python version or gcc version)
Visual Studio 2017 15.7.5
x64 Native Toolset

What did you do?
Steps to reproduce the behavior:

  1. Downloaded and unpacked protobuf-all-3.6.0.zip
  2. Followed instructions in cmake/README.md to set up NMake makefile based build (both debug and release configurations)
  3. Run Debug build with nmake

What did you expect to see
Build success

What did you see instead?
Debug assertion failure message box pops up.

---------------------------
Microsoft Visual C++ Runtime Library
---------------------------
Debug Error!

Program: ...protobuf-original\protobuf-3.6.0\cmake\build\debug\protoc.exe

abort() has been called

(Press Retry to debug the application)

---------------------------
Abort   Retry   Ignore   
---------------------------

Last console outputs:

Scanning dependencies of target gmock
[ 48%] Building CXX object CMakeFiles/gmock.dir/L_/build/protobuf-original/protobuf-3.6.0/third_party/googletest/googlem
ock/src/gmock-all.cc.obj
gmock-all.cc
[ 48%] Building CXX object CMakeFiles/gmock.dir/L_/build/protobuf-original/protobuf-3.6.0/third_party/googletest/googlet
est/src/gtest-all.cc.obj
gtest-all.cc
[ 48%] Linking CXX static library gmock.lib
[ 48%] Built target gmock
Scanning dependencies of target gmock_main
[ 48%] Building CXX object CMakeFiles/gmock_main.dir/L_/build/protobuf-original/protobuf-3.6.0/third_party/googletest/go
oglemock/src/gmock_main.cc.obj
gmock_main.cc
[ 49%] Linking CXX static library gmock_main.lib
[ 49%] Built target gmock_main
[ 49%] Generating L:/build/protobuf-original/protobuf-3.6.0/src/google/protobuf/map_lite_unittest.pb.cc
[libprotobuf FATAL L:\build\protobuf-original\protobuf-3.6.0\src\google\protobuf\generated_message_reflection.cc:2372] C
HECK failed: file != NULL:
NMAKE : fatal error U1077: '.\protoc.exe' : return code '0x3'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\VC\Tools\MSVC\14.14.26428\
bin\HostX64\x64\nmake.exe"' : return code '0x2'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\VC\Tools\MSVC\14.14.26428\
bin\HostX64\x64\nmake.exe"' : return code '0x2'
Stop.

L:\build\protobuf-original\protobuf-3.6.0\cmake\build\debug>

Anything else we should know about your project / environment

  1. Nothing special, just followed standard build instructions, and the build has failed.
  2. Release build was good. Issue is with debug build only.
  3. CMake bootstrap output (if this can be useful):
L:\build\protobuf-original\protobuf-3.6.0\cmake\build\debug>cmake -G "NMake Makefiles" ^     -DCMAKE_BUILD_TYPE=Debug ^
     -DCMAKE_INSTALL_PREFIX=../../../../install ^     ../..
-- The C compiler identification is MSVC 19.14.26433.0
-- The CXX compiler identification is MSVC 19.14.26433.0
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Professional/VC/Tools/MSVC/14.14.26
428/bin/Hostx64/x64/cl.exe
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Professional/VC/Tools/MSVC/14.14.26
428/bin/Hostx64/x64/cl.exe -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Professional/VC/Tools/MSVC/14.14.
26428/bin/Hostx64/x64/cl.exe
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Professional/VC/Tools/MSVC/14.14.
26428/bin/Hostx64/x64/cl.exe -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Looking for pthread.h
-- Looking for pthread.h - not found
-- Found Threads: TRUE
-- Could NOT find ZLIB (missing: ZLIB_LIBRARY ZLIB_INCLUDE_DIR)
-- Configuring done
-- Generating done
-- Build files have been written to: L:/build/protobuf-original/protobuf-3.6.0/cmake/build/debug

Stack trace:

protoc.exe!issue_debug_notification(const wchar_t * const message) Line 28
	at minkernel\crts\ucrt\src\appcrt\internal\report_runtime_error.cpp(28)
protoc.exe!__acrt_report_runtime_error(const wchar_t * message) Line 154
	at minkernel\crts\ucrt\src\appcrt\internal\report_runtime_error.cpp(154)
protoc.exe!abort() Line 61
	at minkernel\crts\ucrt\src\appcrt\startup\abort.cpp(61)
protoc.exe!terminate() Line 59
	at minkernel\crts\ucrt\src\appcrt\misc\terminate.cpp(59)
[External Code]
protoc.exe!google::protobuf::internal::call_once<std::once_flag &,void (__cdecl&)(void)>(std::once_flag & <args_0>, void(*)() <args_1>) Line 92
	at l:\build\protobuf-original\protobuf-3.6.0\src\google\protobuf\stubs\once.h(92)
protoc.exe!protobuf_google_2fprotobuf_2fdescriptor_2eproto::protobuf_AssignDescriptorsOnce() Line 1090
	at l:\build\protobuf-original\protobuf-3.6.0\src\google\protobuf\descriptor.pb.cc(1090)
protoc.exe!google::protobuf::FileOptions::GetMetadata() Line 8823
	at l:\build\protobuf-original\protobuf-3.6.0\src\google\protobuf\descriptor.pb.cc(8823)
protoc.exe!google::protobuf::Message::GetDescriptor() Line 336
	at l:\build\protobuf-original\protobuf-3.6.0\src\google\protobuf\message.h(336)
protoc.exe!google::protobuf::compiler::Parser::ParseOption(google::protobuf::Message * options, const google::protobuf::compiler::Parser::LocationRecorder & options_location, const google::protobuf::FileDescriptorProto * containing_file, google::protobuf::compiler::Parser::OptionStyle style) Line 1327
	at l:\build\protobuf-original\protobuf-3.6.0\src\google\protobuf\compiler\parser.cc(1327)
protoc.exe!google::protobuf::compiler::Parser::ParseTopLevelStatement(google::protobuf::FileDescriptorProto * file, const google::protobuf::compiler::Parser::LocationRecorder & root_location) Line 654
	at l:\build\protobuf-original\protobuf-3.6.0\src\google\protobuf\compiler\parser.cc(654)
protoc.exe!google::protobuf::compiler::Parser::Parse(google::protobuf::io::Tokenizer * input, google::protobuf::FileDescriptorProto * file) Line 573
	at l:\build\protobuf-original\protobuf-3.6.0\src\google\protobuf\compiler\parser.cc(573)
protoc.exe!google::protobuf::compiler::SourceTreeDescriptorDatabase::FindFileByName(const std::basic_string<char,std::char_traits<char>,std::allocator<char> > & filename, google::protobuf::FileDescriptorProto * output) Line 155
	at l:\build\protobuf-original\protobuf-3.6.0\src\google\protobuf\compiler\importer.cc(155)
protoc.exe!google::protobuf::DescriptorPool::TryFindFileInFallbackDatabase(const std::basic_string<char,std::char_traits<char>,std::allocator<char> > & name) Line 1856
	at l:\build\protobuf-original\protobuf-3.6.0\src\google\protobuf\descriptor.cc(1856)
protoc.exe!google::protobuf::DescriptorPool::FindFileByName(const std::basic_string<char,std::char_traits<char>,std::allocator<char> > & name) Line 1423
	at l:\build\protobuf-original\protobuf-3.6.0\src\google\protobuf\descriptor.cc(1423)
protoc.exe!google::protobuf::compiler::CommandLineInterface::ParseInputFiles(google::protobuf::DescriptorPool * descriptor_pool, std::vector<google::protobuf::FileDescriptor const *,std::allocator<google::protobuf::FileDescriptor const *> > * parsed_files) Line 1046
	at l:\build\protobuf-original\protobuf-3.6.0\src\google\protobuf\compiler\command_line_interface.cc(1046)
protoc.exe!google::protobuf::compiler::CommandLineInterface::Run(int argc, const char * const * argv) Line 863
	at l:\build\protobuf-original\protobuf-3.6.0\src\google\protobuf\compiler\command_line_interface.cc(863)
protoc.exe!main(int argc, char * * argv) Line 99
	at l:\build\protobuf-original\protobuf-3.6.0\src\google\protobuf\compiler\main.cc(99)
[External Code]
@IvanPizhenko IvanPizhenko changed the title Protobuf build failure with MSVC2017 Protobuf 3.6 build failure with MSVC2017 Jul 25, 2018
@IvanPizhenko
Copy link
Author

IvanPizhenko commented Jul 25, 2018

Maybe duplicate of #4773 and #4679.
I can see fix already merged, but when we can expect official release?

@xfxyjwf
Copy link
Contributor

xfxyjwf commented Jul 25, 2018

An upcoming 3.6.1 release will include the fix.

@IvanPizhenko
Copy link
Author

Is there any planned release date for 3.6.1?

@acozzette
Copy link
Member

I am working on the release now and expect to get it done early next week, or maybe as early as tomorrow.

@IvanPizhenko
Copy link
Author

Thank you!

@acozzette
Copy link
Member

The 3.6.1 version has been released, so this should be fixed now.

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

3 participants