Bug #120807 Fail to compile https://github.com/mysql/mysql-server with clang 21

Submitted: 29 Jun 5:19 Modified: 29 Jun 14:32
Reporter: Georgi Kodinov Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Server: Compiling Severity:S2 (Serious)
Version: OS:MacOS
Assigned to: CPU Architecture:Any

[29 Jun 5:19] Georgi Kodinov
Description:
[  6%] Building CXX object extra/abseil/abseil-cpp-20250814.1/absl/base/CMakeFiles/absl_base.dir/internal/cycleclock.cc.o
In file included from /Users/teachxai/dev/mysql-server/libs/mysql/gtid/tag_plain.cpp:24:
/Users/teachxai/dev/mysql-server/libs/mysql/gtid/tag_plain.h:83:20: error: no template named 'is_trivial_v' in namespace 'std'; did you mean 'is_final_v'?
   83 | static_assert(std::is_trivial_v<Tag_plain>);
      |               ~~~~~^~~~~~~~~~~~
      |                    is_final_v
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__type_traits/is_final.h:31:50: note: 'is_final_v' declared here
   31 | _LIBCPP_NO_SPECIALIZATIONS inline constexpr bool is_final_v = __is_final(_Tp);
      |                                                  ^
In file included from /Users/teachxai/dev/mysql-server/libs/mysql/gtid/tag_plain.cpp:24:
/Users/teachxai/dev/mysql-server/libs/mysql/gtid/tag_plain.h:83:15: error: static assertion failed due to requirement 'std::is_final_v<mysql::gtid::Tag_plain>'
   83 | static_assert(std::is_trivial_v<Tag_plain>);
      |               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
2 errors generated.
make[2]: *** [libs/mysql/gtid/CMakeFiles/mysql_gtid.dir/tag_plain.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
[  6%] Building CXX object extra/abseil/abseil-cpp-20250814.1/absl/base/CMakeFiles/absl_throw_delegate.dir/internal/throw_delegate.cc.o
In file included from /Users/teachxai/dev/mysql-server/libs/mysql/gtid/tsid_plain.cpp:24:

How to repeat:
cc --version
Apple clang version 21.0.0 (clang-2100.1.1.101)
Target: arm64-apple-darwin25.5.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin
blackbook:mysql-server teachxai$ sw_vers 
ProductName:            macOS
ProductVersion:         26.5.1

mkdir bld && cd bld && cmake -G Ninja -DWITH_UNIT_TESTS=0 -DWITH_ROUTER=0 -DWITH_NDB=0 -DWITH_NDBCLUSTER=0 -DWITH_NDBCLUSTER_STORAGE_ENGINE=0 .. && cmake --build . -j30

Suggested fix:
no error?
[29 Jun 14:31] Nuno Carvalho
Thank you for the bug report, a fix will be out on the next release.

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

Page generated in 0.058 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.