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.
Created attachment 266789 [details] www/webkit2-gtk: fix build with clang >= 20
Comment on attachment 266789 [details] www/webkit2-gtk: fix build with clang >= 20 Do these not apply with PATCH_SITES/PATCHFILES?
(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 on attachment 266789 [details] www/webkit2-gtk: fix build with clang >= 20 Good to go then.
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(+)
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(+)