Bug 296439 - databases/mysql97-client: needs #include <type_traits> in libs/mysql/gtid/tag_plain.h
Summary: databases/mysql97-client: needs #include <type_traits> in libs/mysql/gtid/tag...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Jochen Neumeister
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2026-07-02 07:38 UTC by Trond Endrestøl
Modified: 2026-07-19 09:17 UTC (History)
3 users (show)

See Also:
bugzilla: maintainer-feedback? (joneum)


Attachments
Patch for libs/mysql/gtid/tag_plain.h adding #include <type_traits> (1.51 KB, patch)
2026-07-02 07:38 UTC, Trond Endrestøl
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Trond Endrestøl 2026-07-02 07:38:53 UTC
Created attachment 272361 [details]
Patch for libs/mysql/gtid/tag_plain.h adding #include <type_traits>

Compiler is c++ on yesterday's stable/14, i.e.:

$ c++ --version
FreeBSD clang version 21.1.8 (https://github.com/llvm/llvm-project.git llvmorg-21.1.8-0-g2078da43e25a)
Target: x86_64-unknown-freebsd14.4
Thread model: posix
InstalledDir: /usr/bin

--- libs/mysql/gtid/CMakeFiles/mysql_gtid.dir/tag_plain.cpp.o ---
In file included from /construction/xports/databases/mysql97-client/work/mysql-9.7.1/libs/mysql/gtid/tag_plain.cpp:24:
/construction/xports/databases/mysql97-client/work/mysql-9.7.1/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
/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 /construction/xports/databases/mysql97-client/work/mysql-9.7.1/libs/mysql/gtid/tag_plain.cpp:24:
/construction/xports/databases/mysql97-client/work/mysql-9.7.1/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.
*** [libs/mysql/gtid/CMakeFiles/mysql_gtid.dir/tag_plain.cpp.o] Error code 1
Comment 1 Rainer Hurling freebsd_committer freebsd_triage 2026-07-02 07:49:07 UTC
The same error happens on 16.0-CURRENT with clang version 21.1.8.
Comment 2 Jack 2026-07-18 11:24:11 UTC
This patch fixed my build error on 15.1-STABLE
Comment 3 commit-hook freebsd_committer freebsd_triage 2026-07-19 09:14:02 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=95fe3eb1515e855835a42dc18dbaf384b3051603

commit 95fe3eb1515e855835a42dc18dbaf384b3051603
Author:     Jochen Neumeister <joneum@FreeBSD.org>
AuthorDate: 2026-07-19 09:08:07 +0000
Commit:     Jochen Neumeister <joneum@FreeBSD.org>
CommitDate: 2026-07-19 09:13:11 +0000

    databases/mysql97: Fix build with llvm 21, directory ownership and cleanup

    - Add upstream patches for missing #include <type_traits> and <cstdlib>,
      fixing the build with clang/libc++ 21 [1] [2]
    - Register MY_SECDIR and MY_TMPDIR with mysql:mysql 0750 in pkg-plist,
      so mysqld no longer fails to start after package upgrades reset the
      ownership to root [3]
    - Fix CONFLICTS_INSTALL pattern in the client not matching
      mysql80-client
      and align it with the wildcard style used by the server
    - Update pkg-message for 9.x: mysql_upgrade no longer exists, the server
      performs upgrade tasks itself; fix version reference and quoting
    - Drop duplicate -DWITH_LZ4=system, remove a stale line continuation,
      whitespace fixes
    - Rename patch-sql_server_component_mysql__file__imp.cc to follow the
      patch naming convention

    PR:             296439 [1], 296443 [2], 296758 [3]
    Reported by:    Trond Endrestøl [1] [2], Alexander Ushakov [3]

    sponsored by:   Netzkommune GmbH

 databases/mysql97-client/Makefile                             |  9 ++++-----
 databases/mysql97-server/Makefile                             |  9 ++++-----
 ...atch-components_mysqlbackup_backup__page__tracker.cc (new) | 10 ++++++++++
 .../files/patch-libs_mysql_gtid_tag__plain.h (new)            | 10 ++++++++++
 .../patch-router_src_harness_src_stdx_filesystem.cc (new)     | 10 ++++++++++
 ...imp.cc => patch-sql_server__component_mysql__file__imp.cc} |  0
 databases/mysql97-server/files/pkg-message.in                 | 11 ++++-------
 databases/mysql97-server/pkg-plist                            |  7 +++----
 8 files changed, 45 insertions(+), 21 deletions(-)