Bug 292165 - www/webkit2-gtk: fix build with clang >= 20
Summary: www/webkit2-gtk: fix build with clang >= 20
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: freebsd-gnome (Nobody)
URL:
Keywords:
Depends on:
Blocks: 292067
  Show dependency treegraph
 
Reported: 2026-01-03 21:19 UTC by Dimitry Andric
Modified: 2026-01-04 01:50 UTC (History)
1 user (show)

See Also:
vishwin: maintainer-feedback+


Attachments
www/webkit2-gtk: fix build with clang >= 20 (9.67 KB, patch)
2026-01-03 21:20 UTC, Dimitry Andric
vishwin: maintainer-approval+
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-03 21:19:12 UTC
ith clang 20 or higher webkit2-gtk fails to build, with errors similar
to:

    /wrkdirs/usr/ports/www/webkit2-gtk/work-40/.build/WTF/Headers/wtf/EnumTraits.h:246:20: error: no matching function for call to 'enumName'
      246 |         names[i] = enumName<static_cast<E>(static_cast<unsigned>(i))>();
          |                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /wrkdirs/usr/ports/www/webkit2-gtk/work-40/.build/WTF/Headers/wtf/EnumTraits.h:233:9: note: in instantiation of function template specialization 'WTF::enumNames()::(anonymous class)::operator()<std::integral_constant<unsigned long, 64>>' requested here
      233 |         func(std::integral_constant<size_t, i>());
          |         ^
    /wrkdirs/usr/ports/www/webkit2-gtk/work-40/.build/WTF/Headers/wtf/EnumTraits.h:234:9: note: in instantiation of function template specialization 'WTF::detail::forConstexpr<64UL, 256UL, (lambda at /wrkdirs/usr/ports/www/webkit2-gtk/work-40/.build/WTF/Headers/wtf/EnumTraits.h:245:36)>' requested here
      234 |         forConstexpr<i + 1, end>(func);
          |         ^
    ...

This is fixed by https://commits.webkit.org/292321@main for
https://bugs.webkit.org/show_bug.cgi?id=289669, so import that patch,
plus https://commits.webkit.org/290345@main, which is a prerequisite.
Comment 1 Dimitry Andric freebsd_committer freebsd_triage 2026-01-03 21:20:25 UTC
Created attachment 266789 [details]
www/webkit2-gtk: fix build with clang >= 20
Comment 2 Charlie Li freebsd_committer freebsd_triage 2026-01-03 22:09:08 UTC
Comment on attachment 266789 [details]
www/webkit2-gtk: fix build with clang >= 20

Do these not apply with PATCH_SITES/PATCHFILES?
Comment 3 Dimitry Andric freebsd_committer freebsd_triage 2026-01-03 22:38:33 UTC
(In reply to Charlie Li from comment #2)
No, the first one also includes a change in a test case, and for that to apply you have to pull in a whole other slew of prerequisites, which I didn't want to do. So I tweaked the first patch.
Comment 4 Charlie Li freebsd_committer freebsd_triage 2026-01-04 00:34:04 UTC
Comment on attachment 266789 [details]
www/webkit2-gtk: fix build with clang >= 20

Good to go then.
Comment 5 commit-hook freebsd_committer freebsd_triage 2026-01-04 01:45:40 UTC
A commit in branch main references this bug:

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

commit c71c571a6d22f2792581f9be7838c32d73c47409
Author:     Dimitry Andric <dim@FreeBSD.org>
AuthorDate: 2026-01-03 21:19:54 +0000
Commit:     Dimitry Andric <dim@FreeBSD.org>
CommitDate: 2026-01-04 01:44:25 +0000

    www/webkit2-gtk: fix build with clang >= 20

    With clang 20 or higher webkit2-gtk fails to build, with errors similar
    to:

        /wrkdirs/usr/ports/www/webkit2-gtk/work-40/.build/WTF/Headers/wtf/EnumTraits.h:246:20: error: no matching function for call to 'enumName'
          246 |         names[i] = enumName<static_cast<E>(static_cast<unsigned>(i))>();
              |                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        /wrkdirs/usr/ports/www/webkit2-gtk/work-40/.build/WTF/Headers/wtf/EnumTraits.h:233:9: note: in instantiation of function template specialization 'WTF::enumNames()::(anonymous class)::operator()<std::integral_constant<unsigned long, 64>>' requested here
          233 |         func(std::integral_constant<size_t, i>());
              |         ^
        /wrkdirs/usr/ports/www/webkit2-gtk/work-40/.build/WTF/Headers/wtf/EnumTraits.h:234:9: note: in instantiation of function template specialization 'WTF::detail::forConstexpr<64UL, 256UL, (lambda at /wrkdirs/usr/ports/www/webkit2-gtk/work-40/.build/WTF/Headers/wtf/EnumTraits.h:245:36)>' requested here
          234 |         forConstexpr<i + 1, end>(func);
              |         ^
        ...

    This is fixed by https://commits.webkit.org/292321@main for
    https://bugs.webkit.org/show_bug.cgi?id=289669, so import that patch,
    plus https://commits.webkit.org/290345@main, which is a prerequisite.

    PR:             292165
    Approved by:    vishwin (maintainer)
    MFH:            2025Q4

 www/webkit2-gtk/files/patch-r290345.diff (new) | 137 +++++++++++++++++++++++++
 www/webkit2-gtk/files/patch-r292321.diff (new) |  74 +++++++++++++
 2 files changed, 211 insertions(+)
Comment 6 commit-hook freebsd_committer freebsd_triage 2026-01-04 01:45:41 UTC
A commit in branch 2025Q4 references this bug:

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

commit d9bd7a9f6d2a7b745bd31d5b5e797cbf86d213db
Author:     Dimitry Andric <dim@FreeBSD.org>
AuthorDate: 2026-01-03 21:19:54 +0000
Commit:     Dimitry Andric <dim@FreeBSD.org>
CommitDate: 2026-01-04 01:45:17 +0000

    www/webkit2-gtk: fix build with clang >= 20

    With clang 20 or higher webkit2-gtk fails to build, with errors similar
    to:

        /wrkdirs/usr/ports/www/webkit2-gtk/work-40/.build/WTF/Headers/wtf/EnumTraits.h:246:20: error: no matching function for call to 'enumName'
          246 |         names[i] = enumName<static_cast<E>(static_cast<unsigned>(i))>();
              |                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        /wrkdirs/usr/ports/www/webkit2-gtk/work-40/.build/WTF/Headers/wtf/EnumTraits.h:233:9: note: in instantiation of function template specialization 'WTF::enumNames()::(anonymous class)::operator()<std::integral_constant<unsigned long, 64>>' requested here
          233 |         func(std::integral_constant<size_t, i>());
              |         ^
        /wrkdirs/usr/ports/www/webkit2-gtk/work-40/.build/WTF/Headers/wtf/EnumTraits.h:234:9: note: in instantiation of function template specialization 'WTF::detail::forConstexpr<64UL, 256UL, (lambda at /wrkdirs/usr/ports/www/webkit2-gtk/work-40/.build/WTF/Headers/wtf/EnumTraits.h:245:36)>' requested here
          234 |         forConstexpr<i + 1, end>(func);
              |         ^
        ...

    This is fixed by https://commits.webkit.org/292321@main for
    https://bugs.webkit.org/show_bug.cgi?id=289669, so import that patch,
    plus https://commits.webkit.org/290345@main, which is a prerequisite.

    PR:             292165
    Approved by:    vishwin (maintainer)
    MFH:            2025Q4

    (cherry picked from commit c71c571a6d22f2792581f9be7838c32d73c47409)

 www/webkit2-gtk/files/patch-r290345.diff (new) | 137 +++++++++++++++++++++++++
 www/webkit2-gtk/files/patch-r292321.diff (new) |  74 +++++++++++++
 2 files changed, 211 insertions(+)