Bug #89264 Compile report error
Submitted: 16 Jan 2018 13:31 Modified: 17 Jan 2018 12:46
Reporter: zongshuai yan Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Server: Compiling Severity:S3 (Non-critical)
Version:8.0.3 OS:CentOS (7.0)
Assigned to: CPU Architecture:Any

[16 Jan 2018 13:31] zongshuai yan
Description:
[ 77%] Built target protoclib
Linking CXX executable ../../runtime_output_directory/protoc
/home/rdb/mysql-8.0.3-rc/extra/protobuf/protobuf-2.6.1/src/google/protobuf/compiler/command_line_interface.cc:412: error: undefined reference to 'google::protobuf::compiler::ZipWriter::ZipWriter(google::protobuf::io::ZeroCopyOutputStream*)'
/home/rdb/mysql-8.0.3-rc/extra/protobuf/protobuf-2.6.1/src/google/protobuf/compiler/command_line_interface.cc:416: error: undefined reference to 'google::protobuf::compiler::ZipWriter::Write(std::string const&, std::string const&)'
/home/rdb/mysql-8.0.3-rc/extra/protobuf/protobuf-2.6.1/src/google/protobuf/compiler/command_line_interface.cc:419: error: undefined reference to 'google::protobuf::compiler::ZipWriter::WriteDirectory()'
/home/rdb/mysql-8.0.3-rc/extra/protobuf/protobuf-2.6.1/src/google/protobuf/compiler/command_line_interface.cc:412: error: undefined reference to 'google::protobuf::compiler::ZipWriter::~ZipWriter()'
/home/rdb/mysql-8.0.3-rc/extra/protobuf/protobuf-2.6.1/src/google/protobuf/compiler/command_line_interface.cc:412: error: undefined reference to 'google::protobuf::compiler::ZipWriter::~ZipWriter()'
/home/rdb/mysql-8.0.3-rc/extra/protobuf/protobuf-2.6.1/src/google/protobuf/compiler/plugin.pb.cc:441: error: undefined reference to 'google::protobuf::internal::ReflectionOps::Merge(google::protobuf::Message const&, google::protobuf::Message*)'
/home/rdb/mysql-8.0.3-rc/extra/protobuf/protobuf-2.6.1/src/google/protobuf/compiler/plugin.pb.cc:801: error: undefined reference to 'google::protobuf::internal::ReflectionOps::Merge(google::protobuf::Message const&, google::protobuf::Message*)'
/home/rdb/mysql-8.0.3-rc/extra/protobuf/protobuf-2.6.1/src/google/protobuf/compiler/plugin.pb.cc:1089: error: undefined reference to 'google::protobuf::internal::ReflectionOps::Merge(google::protobuf::Message const&, google::protobuf::Message*)'
/home/rdb/mysql-8.0.3-rc/extra/protobuf/protobuf-2.6.1/src/google/protobuf/compiler/cpp/cpp_generator.cc:101: error: undefined reference to 'google::protobuf::compiler::cpp::FileGenerator::FileGenerator(google::protobuf::FileDescriptor const*, google::protobuf::compiler::cpp::Options const&)'
/home/rdb/mysql-8.0.3-rc/extra/protobuf/protobuf-2.6.1/src/google/protobuf/compiler/cpp/cpp_generator.cc:108: error: undefined reference to 'google::protobuf::compiler::cpp::FileGenerator::GenerateHeader(google::protobuf::io::Printer*)'
/home/rdb/mysql-8.0.3-rc/extra/protobuf/protobuf-2.6.1/src/google/protobuf/compiler/cpp/cpp_generator.cc:116: error: undefined reference to 'google::protobuf::compiler::cpp::FileGenerator::GenerateSource(google::protobuf::io::Printer*)'
/home/rdb/mysql-8.0.3-rc/extra/protobuf/protobuf-2.6.1/src/google/protobuf/compiler/cpp/cpp_generator.cc:101: error: undefined reference to 'google::protobuf::compiler::cpp::FileGenerator::~FileGenerator()'
/home/rdb/mysql-8.0.3-rc/extra/protobuf/protobuf-2.6.1/src/google/protobuf/compiler/cpp/cpp_generator.cc:101: error: undefined reference to 'google::protobuf::compiler::cpp::FileGenerator::~FileGenerator()'
/home/rdb/mysql-8.0.3-rc/extra/protobuf/protobuf-2.6.1/src/google/protobuf/descriptor.pb.cc:938: error: undefined reference to 'google::protobuf::internal::ReflectionOps::Merge(google::protobuf::Message const&, google::protobuf::Message*)'
/home/rdb/mysql-8.0.3-rc/extra/protobuf/protobuf-2.6.1/src/google/protobuf/message.cc:81: error: undefined reference to 'google::protobuf::internal::ReflectionOps::Copy(google::protobuf::Message const&, google::protobuf::Message*)'
/home/rdb/mysql-8.0.3-rc/extra/protobuf/protobuf-2.6.1/src/google/protobuf/message.cc:89: error: undefined reference to 'google::protobuf::internal::ReflectionOps::Clear(google::protobuf::Message*)'
/home/rdb/mysql-8.0.3-rc/extra/protobuf/protobuf-2.6.1/src/google/protobuf/message.cc:93: error: undefined reference to 'google::protobuf::internal::ReflectionOps::IsInitialized(google::protobuf::Message const&)'
/home/rdb/mysql-8.0.3-rc/extra/protobuf/protobuf-2.6.1/src/google/protobuf/message.cc:97: error: undefined reference to 'google::protobuf::internal::ReflectionOps::FindInitializationErrors(google::protobuf::Message const&, std::string const&, std::vector<std::string, std::allocator<std::string> >*)'
/home/rdb/mysql-8.0.3-rc/extra/protobuf/protobuf-2.6.1/src/google/protobuf/message.cc:113: error: undefined reference to 'google::protobuf::internal::ReflectionOps::DiscardUnknownFields(google::protobuf::Message*)'
collect2: error: ld returned 1 exit status
make[2]: *** [runtime_output_directory/protoc] Error 1
make[1]: *** [extra/protobuf/CMakeFiles/protoc.dir/all] Error 2
make: *** [all] Error 2

How to repeat:
1、
cmake ../ -DCMAKE_INSTALL_PREFIX=/home/rdb \
-DWITH_INNOBASE_STORAGE_ENGINE=1 \
-DENABLED_LOCAL_INFILE=1 \
-DEXTRA_CHARSETS=all \
-DDEFAULT_CHARSET=utf8 \
-DDEFAULT_COLLATION=utf8_general_ci \
-DWITH_DEBUG=1 
2、make
[16 Jan 2018 13:33] zongshuai yan
category is compiling
[16 Jan 2018 14:23] MySQL Verification Team
Thank you for the bug report. I couldn't repeat on CentOS 7:

miguel@tikal:~/Downloads/mysql-8.0.3-rc $ cmake ./ -DCMAKE_INSTALL_PREFIX=/home/rdb -DWITH_INNOBASE_STORAGE_ENGINE=1 -DENABLED_LOCAL_INFILE=1 -DEXTRA_CHARSETS=all -DDEFAULT_CHARSET=utf8 -DDEFAULT_COLLATION=utf8_general_ci -DWITH_DEBUG=1  -DWITH_BOOST=/home/miguel/Downloads/mysql-8.0.3-rc/boost/boost_1_64_0/> cmake-out.txt
miguel@tikal:~/Downloads/mysql-8.0.3-rc $ make > compile_8.txt
/home/miguel/Downloads/mysql-8.0.3-rc/extra/libevent/buffer.c:39:0: warning: "_GNU_SOURCE" redefined [enabled by default]
 #define _GNU_SOURCE
 ^
<command-line>:0:0: note: this is the location of the previous definition
/usr/bin/ar: creating /home/miguel/Downloads/mysql-8.0.3-rc/libmysql/libmysqlclient.a
miguel@tikal:~/Downloads/mysql-8.0.3-rc $ ./runtime_output_directory/mysqld --version
/home/miguel/Downloads/mysql-8.0.3-rc/runtime_output_directory/mysqld  Ver 8.0.3-rc-debug-log for Linux on x86_64 (Source distribution)
miguel@tikal:~/Downloads/mysql-8.0.3-rc $ cat /etc/centos-release
CentOS Linux release 7.4.1708 (Core)
miguel@tikal:~/Downloads/mysql-8.0.3-rc $
[16 Jan 2018 14:31] MySQL Verification Team
cmake

Attachment: cmake-out.txt (text/plain), 18.07 KiB.

[16 Jan 2018 14:32] MySQL Verification Team
make

Attachment: compile_8.txt (text/plain), 201.41 KiB.

[17 Jan 2018 12:44] zongshuai yan
it may be the fault of code that was download. it is ok,when download again。