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