Bug #110217 failed to compile in mysql_release mode

Submitted: 27 Feb 2023 6:16 Modified: 28 Feb 2023 1:47
Reporter: alex xing (OCA) Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: Compiling Severity:S3 (Non-critical)
Version:8.0.32 OS:Debian
Assigned to: CPU Architecture:Any

[27 Feb 2023 6:16] alex xing
Description:
failed to compile in mysql_release mode

gcc (Debian 10.2.1-6) 10.2.1 20210110
g++ (Debian 10.2.1-6) 10.2.1 20210110
cmake version 3.18.4
OS: debian 11.5

cmake .. -DCMAKE_BUILD_TYPE=mysql_release -DWITH_BOOST=../boost/boost_1_77_0  -DCMAKE_EXE_LINKER_FLAGS="-ljemalloc"  -DFORCE_INSOURCE_BUILD=1 -DCMAKE_INSTALL_PREFIX=mysql  -DWITH_EMBEDDED_SERVER=0 -DWITH_SAFEMALLOC=OFF

err log:
[ 52%] Built target mysqlgcs
In file included from /home/xingying01/innosql-8.0.32/include/my_alloc.h:42,
                 from /home/xingying01/innosql-8.0.32/sql/sql_plugin_ref.h:27,
                 from /home/xingying01/innosql-8.0.32/sql/sql_plugin.h:35,
                 from /home/xingying01/innosql-8.0.32/include/mysql/plugin.h:35,
                 from /home/xingying01/innosql-8.0.32/plugin/semisync/semisync.h:27,
                 from /home/xingying01/innosql-8.0.32/plugin/semisync/semisync_replica.h:28,
                 from /home/xingying01/innosql-8.0.32/plugin/semisync/semisync_replica.cc:23:
/home/xingying01/innosql-8.0.32/plugin/semisync/semisync_replica.cc: In member function ‘int ReplSemiSyncSlave::slaveReply(MYSQL*, const char*, my_off_t)’:
/home/xingying01/innosql-8.0.32/plugin/semisync/semisync_replica.cc:114:12: error: ‘opt_debug_sync_timeout’ was not declared in this scope
  114 |     assert(opt_debug_sync_timeout > 0);
      |            ^~~~~~~~~~~~~~~~~~~~~~
/home/xingying01/innosql-8.0.32/include/my_dbug.h:173:7: note: in definition of macro ‘DBUG_EXECUTE_IF’
  173 |       a1                                 \
      |       ^~
[ 52%] Built target routertest_harness_stdx_io_file_handle
[ 52%] Linking CXX executable ../../../runtime_output_directory/mysql_keyring_encryption_test
[ 52%] Built target component_mysqlbackup
[ 52%] Linking CXX shared module ../../../plugin_output_directory/component_test_pfs_notification.so
/home/xingying01/innosql-8.0.32/plugin/semisync/semisync_replica.cc:115:13: error: ‘debug_sync_set_action’ was not declared in this scope
  115 |     assert(!debug_sync_set_action(current_thd, STRING_WITH_LEN(act)));
      |             ^~~~~~~~~~~~~~~~~~~~~
/home/xingying01/innosql-8.0.32/include/my_dbug.h:173:7: note: in definition of macro ‘DBUG_EXECUTE_IF’
  173 |       a1                                 \
      |       ^~
[ 52%] Linking CXX executable ../runtime_output_directory/bug25714
[ 52%] Linking CXX executable ../../runtime_output_directory/hp_test1
[ 52%] Linking CXX executable ../../runtime_output_directory/hp_test2
[ 52%] Built target test_sql_stmt
In file included from /home/xingying01/innosql-8.0.32/include/my_alloc.h:42,
                 from /home/xingying01/innosql-8.0.32/sql/sql_plugin_ref.h:27,
                 from /home/xingying01/innosql-8.0.32/sql/sql_plugin.h:35,
                 from /home/xingying01/innosql-8.0.32/include/mysql/plugin.h:35,
                 from /home/xingying01/innosql-8.0.32/plugin/semisync/semisync.h:27,
                 from /home/xingying01/innosql-8.0.32/plugin/semisync/semisync_replica.h:28,
                 from /home/xingying01/innosql-8.0.32/plugin/semisync/semisync_replica.cc:23:
/home/xingying01/innosql-8.0.32/plugin/semisync/semisync_replica.cc: In member function ‘int ReplSemiSyncSlave::slaveReply(MYSQL*, const char*, my_off_t)’:
/home/xingying01/innosql-8.0.32/plugin/semisync/semisync_replica.cc:114:12: error: ‘opt_debug_sync_timeout’ was not declared in this scope
  114 |     assert(opt_debug_sync_timeout > 0);

How to repeat:
cmake .. -DCMAKE_BUILD_TYPE=mysql_release -DWITH_BOOST=../boost/boost_1_77_0  -DCMAKE_EXE_LINKER_FLAGS="-ljemalloc"  -DFORCE_INSOURCE_BUILD=1 -DCMAKE_INSTALL_PREFIX=mysql  -DWITH_EMBEDDED_SERVER=0 -DWITH_SAFEMALLOC=OFF
[27 Feb 2023 17:17] MySQL Verification Team
Hi,

What version of jemalloc are you using (without jemalloc it compiles ok)?

Thanks
[28 Feb 2023 1:47] alex xing
the version is: 5.2.1-3

root# dpkg -l *je*
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name               Version      Architecture Description
+++-==================-============-============-============================================================
ii  libjemalloc-dev    5.2.1-3      amd64        development files and documentation for jemalloc
ii  libjemalloc2:amd64 5.2.1-3      amd64        general-purpose scalable concurrent malloc(3) implementation

root# apt-get install libjemalloc-dev
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
libjemalloc-dev is already the newest version (5.2.1-3).

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.052 sec. using MySQL 8.4.7-u6-cloud

Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.