Bug 292589 - databases/mysql80-server: fix build with libc++ 20 and higher
Summary: databases/mysql80-server: fix build with libc++ 20 and higher
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Jochen Neumeister
URL:
Keywords:
Depends on:
Blocks: 292067
  Show dependency treegraph
 
Reported: 2026-01-19 18:45 UTC by Dimitry Andric
Modified: 2026-01-31 19:56 UTC (History)
1 user (show)

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


Attachments
databases/mysql80-server: fix build with libc++ 20 and higher (2.89 KB, patch)
2026-01-19 18:47 UTC, Dimitry Andric
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dimitry Andric freebsd_committer freebsd_triage 2026-01-19 18:45:49 UTC
With libc++ 20 and higher, databases/mysql80-server fails to compile,
resulting in errors similar to:

    In file included from /wrkdirs/usr/ports/databases/mysql80-server/work/mysql-8.0.44/router/src/harness/src/stdx/filesystem.cc:40:
    /wrkdirs/usr/ports/databases/mysql80-server/work/mysql-8.0.44/router/src/harness/src/../include/mysql/harness/stdx/expected.h:74:8: error: 'is_default_constructible' cannot be specialized: Users are not allowed to specialize this standard library entity [-Winvalid-specialization]
       74 | struct is_default_constructible<std::unique_ptr<T, void (*)(T *)>>
          |        ^
    /usr/include/c++/v1/__type_traits/is_constructible.h:49:8: note: marked '_Clang::no_specializations' here
       49 | struct _LIBCPP_NO_SPECIALIZATIONS is_default_constructible : integral_constant<bool, __is_constructible(_Tp)> {};
          |        ^
    /usr/include/c++/v1/__config:1167:9: note: expanded from macro '_LIBCPP_NO_SPECIALIZATIONS'
     1167 |       [[_Clang::__no_specializations__("Users are not allowed to specialize this standard library entity")]]
          |         ^

This is due to a workaround for a std::unique_ptr problem which is only
applicable to gcc before 7.1, so the whole workaround can be deleted,
which fixes the problem.

See also: https://bugs.mysql.com/bug.php?id=119238
Comment 1 Dimitry Andric freebsd_committer freebsd_triage 2026-01-19 18:47:09 UTC
Created attachment 267307 [details]
databases/mysql80-server: fix build with libc++ 20 and higher
Comment 2 commit-hook freebsd_committer freebsd_triage 2026-01-31 18:41:33 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=12e52077d3db077a821277d20d8c8c4310174a1b

commit 12e52077d3db077a821277d20d8c8c4310174a1b
Author:     Dimitry Andric <dim@FreeBSD.org>
AuthorDate: 2026-01-19 18:46:29 +0000
Commit:     Dimitry Andric <dim@FreeBSD.org>
CommitDate: 2026-01-31 18:41:22 +0000

    databases/mysql80-server: fix build with libc++ 20 and higher

    With libc++ 20 and higher, databases/mysql80-server fails to compile,
    resulting in errors similar to:

        In file included from /wrkdirs/usr/ports/databases/mysql80-server/work/mysql-8.0.44/router/src/harness/src/stdx/filesystem.cc:40:
        /wrkdirs/usr/ports/databases/mysql80-server/work/mysql-8.0.44/router/src/harness/src/../include/mysql/harness/stdx/expected.h:74:8: error: 'is_default_constructible' cannot be specialized: Users are not allowed to specialize this standard library entity [-Winvalid-specialization]
           74 | struct is_default_constructible<std::unique_ptr<T, void (*)(T *)>>
              |        ^
        /usr/include/c++/v1/__type_traits/is_constructible.h:49:8: note: marked '_Clang::no_specializations' here
           49 | struct _LIBCPP_NO_SPECIALIZATIONS is_default_constructible : integral_constant<bool, __is_constructible(_Tp)> {};
              |        ^
        /usr/include/c++/v1/__config:1167:9: note: expanded from macro '_LIBCPP_NO_SPECIALIZATIONS'
         1167 |       [[_Clang::__no_specializations__("Users are not allowed to specialize this standard library entity")]]
              |         ^

    This is due to a workaround for a std::unique_ptr problem which is only
    applicable to gcc before 7.1, so the whole workaround can be deleted,
    which fixes the problem.

    See also: https://bugs.mysql.com/bug.php?id=119238

    PR:             292589
    Approved by:    maintainer timeout (2 weeks)
    MFH:            2026Q1

 ...ess_include_mysql_harness_stdx_expected.h (new) | 29 ++++++++++++++++++++++
 1 file changed, 29 insertions(+)
Comment 3 commit-hook freebsd_committer freebsd_triage 2026-01-31 18:42:35 UTC
A commit in branch 2026Q1 references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=49cc38c58ecec77a1b11e0d52ef026ba328d662d

commit 49cc38c58ecec77a1b11e0d52ef026ba328d662d
Author:     Dimitry Andric <dim@FreeBSD.org>
AuthorDate: 2026-01-19 18:46:29 +0000
Commit:     Dimitry Andric <dim@FreeBSD.org>
CommitDate: 2026-01-31 18:41:39 +0000

    databases/mysql80-server: fix build with libc++ 20 and higher

    With libc++ 20 and higher, databases/mysql80-server fails to compile,
    resulting in errors similar to:

        In file included from /wrkdirs/usr/ports/databases/mysql80-server/work/mysql-8.0.44/router/src/harness/src/stdx/filesystem.cc:40:
        /wrkdirs/usr/ports/databases/mysql80-server/work/mysql-8.0.44/router/src/harness/src/../include/mysql/harness/stdx/expected.h:74:8: error: 'is_default_constructible' cannot be specialized: Users are not allowed to specialize this standard library entity [-Winvalid-specialization]
           74 | struct is_default_constructible<std::unique_ptr<T, void (*)(T *)>>
              |        ^
        /usr/include/c++/v1/__type_traits/is_constructible.h:49:8: note: marked '_Clang::no_specializations' here
           49 | struct _LIBCPP_NO_SPECIALIZATIONS is_default_constructible : integral_constant<bool, __is_constructible(_Tp)> {};
              |        ^
        /usr/include/c++/v1/__config:1167:9: note: expanded from macro '_LIBCPP_NO_SPECIALIZATIONS'
         1167 |       [[_Clang::__no_specializations__("Users are not allowed to specialize this standard library entity")]]
              |         ^

    This is due to a workaround for a std::unique_ptr problem which is only
    applicable to gcc before 7.1, so the whole workaround can be deleted,
    which fixes the problem.

    See also: https://bugs.mysql.com/bug.php?id=119238

    PR:             292589
    Approved by:    maintainer timeout (2 weeks)
    MFH:            2026Q1

    (cherry picked from commit 12e52077d3db077a821277d20d8c8c4310174a1b)

 ...ess_include_mysql_harness_stdx_expected.h (new) | 29 ++++++++++++++++++++++
 1 file changed, 29 insertions(+)
Comment 4 Jochen Neumeister freebsd_committer freebsd_triage 2026-01-31 19:02:42 UTC
(In reply to commit-hook from comment #3)

Bug opened on January 19, 2026.
Please explain how you arrived at a maintainer timeout of two weeks.
Comment 5 Dimitry Andric freebsd_committer freebsd_triage 2026-01-31 19:23:27 UTC
(In reply to Jochen Neumeister from comment #4)
Ah sorry, I looked at the wrong date (I had multiple bugs open)! Shall I revert it?
Comment 6 Jochen Neumeister freebsd_committer freebsd_triage 2026-01-31 19:34:43 UTC
(In reply to Dimitry Andric from comment #5)

If you have verified that the patch also works with my MySQL update from today, 5 hours ago, you are welcome to leave it.
I released the update for MySQL 8.0.45 earlier and was just about to work on this bug when you published it.
Comment 7 Dimitry Andric freebsd_committer freebsd_triage 2026-01-31 19:46:59 UTC
(In reply to Jochen Neumeister from comment #6)
I did a poudriere build and it succeeded. How easy is it to run regression tests, if any?
Comment 8 Jochen Neumeister freebsd_committer freebsd_triage 2026-01-31 19:56:50 UTC
(In reply to Dimitry Andric from comment #7)

I have only tested the patch in poudriere in FreeBSD versions 14.3, 15.0, and CURRENT.
The normal tree has version 8.0.45, and Q1 has version 8.0.44.

I have not tested the patch in a live environment.