Bug #84013 compile mysql5.7.16 failed with “event_base_loopbreak was not declared ”
Submitted: 30 Nov 2016 7:05 Modified: 1 Dec 2016 0:39
Reporter: zte zte Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Server: Compiling Severity:S2 (Serious)
Version:mysql5.7.16 OS:SUSE (12)
Assigned to: CPU Architecture:Any

[30 Nov 2016 7:05] zte zte
Description:
compile mysql5.7.16 failed with “/rapid/plugin/x/ngs/src/time_socket_events.cc:164:32: error: ‘event_base_loopbreak’ was not declared in this scope”.

error message is:
[ 73%] Building CXX object rapid/plugin/x/CMakeFiles/xplugin.dir/ngs/src/time_socket_events.cc.o
/home/yzs/mysql-5.7.16/rapid/plugin/x/ngs/src/time_socket_events.cc: In member function ‘void ngs::Time_and_socket_events::break_loop()’:
/home/yzs/mysql-5.7.16/rapid/plugin/x/ngs/src/time_socket_events.cc:164:32: error: ‘event_base_loopbreak’ was not declared in this scope
   event_base_loopbreak(m_evbase);
                                ^
rapid/plugin/x/CMakeFiles/xplugin.dir/build.make:1009: recipe for target 'rapid/plugin/x/CMakeFiles/xplugin.dir/ngs/src/time_socket_events.cc.o' failed
make[2]: *** [rapid/plugin/x/CMakeFiles/xplugin.dir/ngs/src/time_socket_events.cc.o] Error 1
CMakeFiles/Makefile2:4330: recipe for target 'rapid/plugin/x/CMakeFiles/xplugin.dir/all' failed
make[1]: *** [rapid/plugin/x/CMakeFiles/xplugin.dir/all] Error 2
Makefile:140: recipe for target 'all' failed
make: *** [all] Error 2

How to repeat:
1、cd BUILD
2、
   cmake .. \
   -DWITH_DEBUG=0 \
   -DCMAKE_INSTALL_PREFIX=/home/yzs \
   -DDEFAULT_CHARSET=utf8 \
   -DDEFAULT_COLLATION=utf8_general_ci \
   -DWITH_EXTRA_CHARSETS:STRING=all \
   -DWITH_MYISAM_STORAGE_ENGINE=1 \
   -DWITH_INNOBASE_STORAGE_ENGINE=1 \
   -DWITH_MEMORY_STORAGE_ENGINE=1 \
   -DWITH_NDBCLUSTER_STORAGE_ENGINE=0 \
   -DWITH_NDB_JAVA=0 \
   -DENABLED_LOCAL_INFILE=1
3、make

Suggested fix:
Add appropriate header files in time_socket_events.cc
[30 Nov 2016 10:19] MySQL Verification Team
Thank you for the bug report.

miguel@ural:~/Downloads/mysql-5.7.16 $ cat /etc/SuSE-release
openSUSE 42.1 (x86_64)
VERSION = 42.1
CODENAME = Malachite
# /etc/SuSE-release is deprecated and will be removed in the future, use /etc/os-release instead

miguel@ural:~/Downloads/mysql-5.7.16 $ cmake ./    -DWITH_DEBUG=0    -DCMAKE_INSTALL_PREFIX=/home/yzs    -DDEFAULT_CHARSET=utf8    -DDEFAULT_COLLATION=utf8_general_ci    -DWITH_EXTRA_CHARSETS:STRING=all    -DWITH_MYISAM_STORAGE_ENGINE=1    -DWITH_INNOBASE_STORAGE_ENGINE=1    -DWITH_MEMORY_STORAGE_ENGINE=1    -DWITH_NDBCLUSTER_STORAGE_ENGINE=0    -DWITH_NDB_JAVA=0    -DENABLED_LOCAL_INFILE=1 -DWITH_BOOST=/home/miguel/boost_1_59_0/
-- Running cmake version 3.3.2
-- Configuring with MAX_INDEXES = 64U
-- SIZEOF_VOIDP 8
-- MySQL 5.7.16
-- Packaging as: mysql-5.7.16-Linux-x86_64
-- Local boost dir /home/miguel/boost_1_59_0
-- Found /home/miguel/boost_1_59_0/boost/version.hpp 
-- BOOST_VERSION_NUMBER is #define BOOST_VERSION 105900
-- BOOST_INCLUDE_DIR /home/miguel/boost_1_59_0
-- Performing Test HAVE_LLVM_LIBCPP
<CUT>
-- Generating done
-- Build files have been written to: /home/miguel/Downloads/mysql-5.7.16
miguel@ural:~/Downloads/mysql-5.7.16 $ make
Scanning dependencies of target INFO_BIN
[  0%] Built target INFO_BIN
Scanning dependencies of target INFO_SRC
[  0%] Built target INFO_SRC
Scanning dependencies of target abi_check
<CUT>
[100%] Linking CXX executable mysql_embedded
[100%] Built target mysql_embedded
Scanning dependencies of target mysqltest_embedded
[100%] Building CXX object libmysqld/examples/CMakeFiles/mysqltest_embedded.dir/__/__/client/mysqltest.cc.o
[100%] Linking CXX executable mysqltest_embedded
[100%] Built target mysqltest_embedded
Scanning dependencies of target my_safe_process
[100%] Building CXX object mysql-test/lib/My/SafeProcess/CMakeFiles/my_safe_process.dir/safe_process.cc.o
[100%] Linking CXX executable my_safe_process
[100%] Built target my_safe_process
miguel@ural:~/Downloads/mysql-5.7.16 $ 
miguel@ural:~/Downloads/mysql-5.7.16 $ sql/mysqld --version
sql/mysqld  Ver 5.7.16 for Linux on x86_64 (Source distribution)
miguel@ural:~/Downloads/mysql-5.7.16 $
[1 Dec 2016 0:39] zte zte
The environment is SUSE 12.
yzs@Suselinux12:~/mysql-5.7.16/BUILD> uname -a
Linux Suselinux12 3.12.49-11-default #1 SMP Wed Nov 11 20:52:43 UTC 2015 (8d714a0) x86_64 x86_64 x86_64 GNU/Linux

yzs@Suselinux12:~/mysql-5.7.16/BUILD> lsb_release -a
LSB Version:    n/a
Distributor ID: SUSE LINUX
Description:    SUSE Linux Enterprise Server 12 SP1
Release:        12.1
Codename:       n/a