Bug #100417 Explanation of source configuration option "-DWITH_LIBEVENT=string" is Inaccurat
Submitted: 4 Aug 2020 1:53 Modified: 4 Aug 2020 19:54
Reporter: Yasuhiro Horimoto Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Documentation Severity:S3 (Non-critical)
Version:5.7.31 OS:Any
Assigned to: Jon Stephens CPU Architecture:Any

[4 Aug 2020 1:53] Yasuhiro Horimoto
Description:
Hello,

About "-DWITH_LIBEVENT" option has been explained as below in https://dev.mysql.com/doc/refman/5.7/en/source-configuration-options.html#option_cmake_wit....

> If you specify system or yes, the system libevent library is used if present.
> If the system library is not found, the bundled libevent library is used.

However,  since mysql-server 5.7.31, if the system library is not found, the bundled libevent library is not used even if we specify "system" into "-DWITH_LIBEVENT".

In the above situation build of mysql-server 5.7.31 become an error.

Thanks,

How to repeat:
1.
wget http://security.ubuntu.com/ubuntu/pool/main/m/mysql-5.7/mysql-5.7_5.7.31.orig.tar.gz

2.
tar -zxvf mysql-5.7_5.7.31.orig.tar.gz

3.
cd mysql-5.7.31

4.
cmake -DCMAKE_INSTALL_PREFIX=/usr \
	-DCMAKE_VERBOSE_MAKEFILE=ON \
	-DMYSQL_UNIX_ADDR=/var/run/mysqld/mysqld.sock \
	-DCMAKE_BUILD_TYPE=RelWithDebInfo \
	-DBUILD_CONFIG=mysql_release \
	-DWITH_LIBWRAP=ON \
	-DWITH_ZLIB=system \
	-DWITH_LZ4=system \
	-DWITH_EDITLINE=system \
	-DWITH_LIBEVENT=system \
	-DWITH_BOOST=../boost \
	-DCOMPILATION_COMMENT="(Ubuntu)" \
	-DMYSQL_SERVER_SUFFIX="-0ubuntu0.18.04.1" \
	-DINSTALL_LAYOUT=DEB \
	-DINSTALL_DOCDIR=share/mysql/docs \
	-DINSTALL_DOCREADMEDIR=share/mysql \
	-DINSTALL_INCLUDEDIR=include/mysql \
	-DINSTALL_INFODIR=share/mysql/docs \
	-DINSTALL_LIBDIR=lib/x86_64-linux-gnu \
	-DINSTALL_MANDIR=share/man \
	-DINSTALL_MYSQLSHAREDIR=share/mysql \
	-DINSTALL_MYSQLTESTDIR=lib/mysql-test \
	-DINSTALL_PLUGINDIR=lib/mysql/plugin \
	-DINSTALL_SBINDIR=sbin \
	-DINSTALL_SCRIPTDIR=bin \
	-DINSTALL_SUPPORTFILESDIR=share/mysql \
	-DSYSCONFDIR=/etc/mysql \
	-DWITH_EMBEDDED_SERVER=ON \
	-DWITH_ARCHIVE_STORAGE_ENGINE=ON \
	-DWITH_BLACKHOLE_STORAGE_ENGINE=ON \
	-DWITH_FEDERATED_STORAGE_ENGINE=ON \
	-DWITH_INNODB_MEMCACHED=1 \
	-DWITH_EXTRA_CHARSETS=all .

Suggested fix:
We suggest that we add "Note" as below.

Note:

The bundled libevent library is not used even if you specify system since MySQL 5.7.31.
If the system library is not found, the build of MySQL 5.7.31 fails.
[4 Aug 2020 6:00] MySQL Verification Team
Hello Yasuhiro Horimoto,

Thank you for the report and feedback.

regards,
Umesh
[4 Aug 2020 18:55] Jon Stephens
I'll take this one.
[4 Aug 2020 19:57] Jon Stephens
This was done as part of the fix for BUG#98679, and also affects MySQL 8.0.21 (and later).

So noted in the documentation for this option.

Closed.