Bug #100938 Compilation failed on ubuntu
Submitted: 24 Sep 2020 9:17 Modified: 28 Sep 2020 13:45
Reporter: Sukan M Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Compiling Severity:S2 (Serious)
Version:8.0.21 OS:Ubuntu (18.02)
Assigned to: Tor Didriksen CPU Architecture:x86

[24 Sep 2020 9:17] Sukan M
Description:
Compiling from source is getting failed on ubuntu 18.04. It is failed with below error,
[ 47%] Building CXX object sql/CMakeFiles/sql_main.dir/field.cc.o
^@/home/sukan/mysql-8.0.21/sql/field.cc: In member function ‘const char* Field_typed_array::get_index_name() const’:
/home/sukan/mysql-8.0.21/sql/field.cc:9887:40: error: passing ‘const Key_map {aka const Bitmap<256>}’ as ‘this’ argument discards qualifiers [-fpermissive]
   uint key = part_of_key.get_first_set();
                                        ^
In file included from /home/sukan/mysql-8.0.21/sql/field.h:55:0,
                 from /home/sukan/mysql-8.0.21/sql/field.cc:25:
/home/sukan/mysql-8.0.21/sql/sql_bitmap.h:132:8: note:   in call to ‘uint Bitmap<default_width>::get_first_set() [with unsigned int default_width = 256; uint = unsigned int]’
   uint get_first_set() { return bitmap_get_first_set(&map); }
        ^~~~~~~~~~~~~
sql/CMakeFiles/sql_main.dir/build.make:1075: recipe for target 'sql/CMakeFiles/sql_main.dir/field.cc.o' failed
make[2]: *** [sql/CMakeFiles/sql_main.dir/field.cc.o] Error 1
CMakeFiles/Makefile2:11423: recipe for target 'sql/CMakeFiles/sql_main.dir/all' failed
make[1]: *** [sql/CMakeFiles/sql_main.dir/all] Error 2
Makefile:162: recipe for target 'all' failed
make: *** [all] Error 2

How to repeat:
wget https://dev.mysql.com/get/Downloads/MySQL-8.0/mysql-8.0.21.tar.gz
tar -zxvf <<downloadedfile>>
cd <<folder>>
mkdir bld
cd bld
cmake .. -DMAX_INDEXES=255 -DDOWNLOAD_BOOST=1 -DWITH_BOOST=/tmp/
make
[24 Sep 2020 9:54] MySQL Verification Team
Thank you for the bug report.
[28 Sep 2020 13:45] Paul DuBois
Posted by developer:
 
Fixed in 8.0.23.

A compilation failure on Unbuntu was corrected.