Bug #118318 | Compiler errors on openSUSE | ||
---|---|---|---|
Submitted: | 30 May 14:10 | Modified: | 4 Jun 8:34 |
Reporter: | Ян Титаренко | Email Updates: | |
Status: | Unsupported | Impact on me: | |
Category: | MySQL Server | Severity: | S1 (Critical) |
Version: | OS: | Linux (OpenSUSE) | |
Assigned to: | CPU Architecture: | x86 |
[30 May 14:10]
Ян Титаренко
[30 May 15:35]
Terje Røsten
Hi, thanks for report. Build on openSUSE 15.6 requires GCC 13 as seen here: https://github.com/mysql/mysql-server/blob/trunk/CMakeLists.txt#L401 https://github.com/mysql/mysql-server/blob/trunk/packaging/rpm-sles/mysql.spec.in#L132 Please install required packages, and rerun in clean build env. with -DCMAKE_CXX_COMPILER= -DCMAKE_C_COMPILER= options absent.
[2 Jun 11:42]
Ян Титаренко
> cmake -DWITH_SYSTEM_LIBS=TRUE .. -- Running cmake version 3.28.3 -- Found Git: /usr/bin/git (found version "2.43.0") -- CMAKE_MODULE_PATH is /home/yantitarenko5/mysql-server/cmake -- MySQL 9.3.0 -- The C compiler identification is GNU 7.5.0 -- The CXX compiler identification is GNU 7.5.0 for some reasons CMake is picking up GCC 7. I was able to replace symlinks so gcc --version is > gcc --version gcc (GCC) 16.0.0 20250601 (experimental)
[4 Jun 8:34]
Ян Титаренко
After installing GCC 16 I was able to compile some of the source files: >cmake -DCMAKE_CXX_COMPILER=g++-16 -DCMAKE_C_COMPILER=gcc-16 -DWITH_SYSTEM_LIBS=TRUE .. -- Running cmake version 3.28.3 -- Found Git: /usr/bin/git (found version "2.43.0") -- CMAKE_MODULE_PATH is /home/yantitarenko5/mysql-server/cmake -- MySQL 9.3.0 -- The C compiler identification is GNU 16.0.0 -- The CXX compiler identification is GNU 16.0.0 ... [ 4%] Building CXX object libs/mysql/gtid/CMakeFiles/mysql_gtid.dir/tag.cpp.o In file included from /home/yantitarenko5/mysql-server/libs/mysql/gtid/tag.h:33, from /home/yantitarenko5/mysql-server/libs/mysql/gtid/tag.cpp:24: /home/yantitarenko5/mysql-server/libs/mysql/gtid/gtid_format.h:38:6: warning: elaborated-type-specifier for a scoped enum must not use the ‘class’ keyword 38 | enum class Gtid_format : uint8_t { | ~~~~ ^~~~~ | ----- /home/yantitarenko5/mysql-server/libs/mysql/gtid/gtid_format.h:38:24: error: found ‘:’ in nested-name-specifier, expected ‘::’ 38 | enum class Gtid_format : uint8_t { | ^ | :: /home/yantitarenko5/mysql-server/libs/mysql/gtid/gtid_format.h:38:12: error: ‘Gtid_format’ has not been declared 38 | enum class Gtid_format : uint8_t { | ^~~~~~~~~~~ /home/yantitarenko5/mysql-server/libs/mysql/gtid/gtid_format.h:38:34: error: expected unqualified-id before ‘{’ token 38 | enum class Gtid_format : uint8_t { | ^ /home/yantitarenko5/mysql-server/libs/mysql/gtid/gtid_format.h:52:24: error: ‘Gtid_format’ in namespace ‘mysql::gtid’ does not name a type 52 | constexpr inline gtid::Gtid_format enum_max<gtid::Gtid_format>() { | ^~~~~~~~~~~ /home/yantitarenko5/mysql-server/libs/mysql/gtid/tag.h:127:46: error: ‘Gtid_format’ does not name a type 127 | const Gtid_format >id_format) const; | ^~~~~~~~~~~ /home/yantitarenko5/mysql-server/libs/mysql/gtid/tag.h:138:40: error: ‘Gtid_format’ does not name a type 138 | std::size_t get_encoded_length(const Gtid_format >id_format) const; | ^~~~~~~~~~~ /home/yantitarenko5/mysql-server/libs/mysql/gtid/tag.h:163:46: error: ‘Gtid_format’ does not name a type 163 | const Gtid_format >id_format); | ^~~~~~~~~~~ /home/yantitarenko5/mysql-server/libs/mysql/gtid/tag.cpp:67:35: error: ‘Gtid_format’ does not name a type 67 | const Gtid_format >id_format) const { | ^~~~~~~~~~~ /home/yantitarenko5/mysql-server/libs/mysql/gtid/tag.cpp: In member function ‘std::size_t mysql::gtid::Tag::encode_tag(unsigned char*, const int&) const’: /home/yantitarenko5/mysql-server/libs/mysql/gtid/tag.cpp:68:22: error: ‘Gtid_format’ has not been declared 68 | if (gtid_format == Gtid_format::untagged) { | ^~~~~~~~~~~ /home/yantitarenko5/mysql-server/libs/mysql/gtid/tag.cpp: At global scope: /home/yantitarenko5/mysql-server/libs/mysql/gtid/tag.cpp:77:35: error: ‘Gtid_format’ does not name a type 77 | const Gtid_format >id_format) { | ^~~~~~~~~~~ /home/yantitarenko5/mysql-server/libs/mysql/gtid/tag.cpp: In member function ‘std::size_t mysql::gtid::Tag::decode_tag(const unsigned char*, std::size_t, const int&)’: /home/yantitarenko5/mysql-server/libs/mysql/gtid/tag.cpp:80:22: error: ‘Gtid_format’ has not been declared 80 | if (gtid_format == Gtid_format::untagged) { | ^~~~~~~~~~~ /home/yantitarenko5/mysql-server/libs/mysql/gtid/tag.cpp: At global scope: /home/yantitarenko5/mysql-server/libs/mysql/gtid/tag.cpp:93:38: error: ‘Gtid_format’ does not name a type 93 | size_t Tag::get_encoded_length(const Gtid_format >id_format) const { | ^~~~~~~~~~~ /home/yantitarenko5/mysql-server/libs/mysql/gtid/tag.cpp: In member function ‘size_t mysql::gtid::Tag::get_encoded_length(const int&) const’: /home/yantitarenko5/mysql-server/libs/mysql/gtid/tag.cpp:94:22: error: ‘Gtid_format’ has not been declared 94 | if (gtid_format == Gtid_format::tagged) { | ^~~~~~~~~~~ make[2]: *** [libs/mysql/gtid/CMakeFiles/mysql_gtid.dir/build.make:104: libs/mysql/gtid/CMakeFiles/mysql_gtid.dir/tag.cpp.o] Ошибка 1 make[1]: *** [CMakeFiles/Makefile2:7429: libs/mysql/gtid/CMakeFiles/mysql_gtid.dir/all] Ошибка 2