Eoan FTBFS with gcc-9 and MySQL 8
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
clickhouse (Ubuntu) |
Fix Released
|
Medium
|
Unassigned | ||
Eoan |
Fix Released
|
Medium
|
Unassigned | ||
gcc-9 (Ubuntu) |
Fix Released
|
Medium
|
Unassigned | ||
Eoan |
Fix Released
|
Medium
|
Unassigned |
Bug Description
C and C++ differ in the form of types being defined. While C++ structs are defined also as new types, in C you have to explicitly typedef the struct to have a new type. From clickhouse source code, we are getting:
----
[ 6%] Building CXX object libs/libmysqlxx
cd /<<BUILDDIR>
In file included from /<<BUILDDIR>
/<<BUILDDIR>
using MYSQL = st_mysql;
In file included from /<<BUILDDIR>
/usr/include/
} MYSQL;
----
If I edit file libs/libmysqlxx
//struct st_mysql;
//using MYSQL = st_mysql;
//
//struct st_mysql_res;
//using MYSQL_RES = st_mysql_res;
//
//using MYSQL_ROW = char**;
//
//struct st_mysql_field;
//using MYSQL_FIELD = st_mysql_field;
and add
#include <mysql/mysql.h>
I solve the issue, as MYSQL, MYSQL_RES, MYSQL_ROW and MYSQL_FIELD types are defined by the mysql.h header file (as C++ would expect).
----
Unfortunately doing that with gcc-9 was not successful not because of the change, per se, but gcc-9 crashed during clickhouse compilation. When changing gcc-9 to gcc-8 as the default compiler (Ubuntu Eoan userland) I was able to compile clickhouse libmysqlxx library successfully.
Changed in clickhouse (Ubuntu): | |
status: | New → In Progress |
importance: | Undecided → Medium |
assignee: | nobody → Rafael David Tinoco (rafaeldtinoco) |
Changed in mysql-8.0 (Ubuntu Eoan): | |
status: | Fix Released → In Progress |
Changed in clickhouse (Ubuntu Eoan): | |
status: | Fix Released → In Progress |
Changed in mysql-8.0 (Ubuntu Eoan): | |
status: | In Progress → Invalid |
Changed in mysql-8.0 (Ubuntu Eoan): | |
assignee: | Gianfranco Costamagna (costamagnagianfranco) → nobody |
Changed in gcc-9 (Ubuntu Eoan): | |
assignee: | Gianfranco Costamagna (costamagnagianfranco) → nobody |
no longer affects: | mysql-8.0 (Ubuntu Eoan) |
no longer affects: | mysql-8.0 (Ubuntu) |
Changed in clickhouse (Ubuntu Eoan): | |
status: | In Progress → Fix Committed |
status: | Fix Committed → Fix Released |
Changed in gcc-9 (Ubuntu Eoan): | |
status: | In Progress → Fix Released |
Changed in clickhouse (Ubuntu Eoan): | |
assignee: | Gianfranco Costamagna (costamagnagianfranco) → nobody |
I have opened the following issue upstream:
https:/ /github. com/yandex/ ClickHouse/ issues/ 6552
Explaining what was discovered and asking what would be the best alternative to address the issue (particularly interested why we were not facing this before).