Bug 293093 - www/qt5-webengine: fix build with clang 21
Summary: www/qt5-webengine: fix build with clang 21
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-kde (group)
URL:
Keywords:
Depends on:
Blocks: 292067
  Show dependency treegraph
 
Reported: 2026-02-10 19:55 UTC by Dimitry Andric
Modified: 2026-02-12 21:00 UTC (History)
1 user (show)

See Also:
jhale: maintainer-feedback+


Attachments
www/qt5-webengine: fix build with clang 21 (9.38 KB, patch)
2026-02-10 19:57 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-02-10 19:55:46 UTC
With libc++ 21 www/qt5-webengine fails to build, with errors similar to:

    In file included from gen/third_party/blink/renderer/platform/platform_jumbo_54.cc:7:
    ./../../../../kde-qtwebengine-5.15.19p0/src/3rdparty/chromium/third_party/blink/renderer/platform/image-encoders/image_encoder_utils.cc:63:5: error: static assertion expression is not an integral constant expression
    [...]
    ../../../../kde-qtwebengine-5.15.19p0/src/3rdparty/chromium/base/metrics/histogram_macros_internal.h:45:12: note: integer value 8 is outside the valid range of values [0, 7] for the enumeration type 'RequestedImageMimeType'
       45 |     return static_cast<Enum>(
          |            ^

https://chromium.googlesource.com/chromium/src/+/bb340f66aaf44206fa5106509fb4e8c0719ee831
fixes these, but has to be slightly adjusted to make it apply to the
specific chromium version included in qt5-webengine.

This also needs the change in https://github.com/DimitryAndric/freebsd-src/commit/7a8a78577d6cb7d82bdc38ffd7515618f44af9de, since I ran into a clang bug affecting older chromium forks: https://github.com/llvm/llvm-project/issues/179118
Comment 1 Dimitry Andric freebsd_committer freebsd_triage 2026-02-10 19:57:10 UTC
Created attachment 267958 [details]
www/qt5-webengine: fix build with clang 21
Comment 2 Jason E. Hale freebsd_committer freebsd_triage 2026-02-11 23:26:23 UTC
Ship it!
Comment 3 commit-hook freebsd_committer freebsd_triage 2026-02-12 20:52:15 UTC
A commit in branch main references this bug:

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

commit f9807ebb6bda547e662d094b879e68d9ff96b06b
Author:     Dimitry Andric <dim@FreeBSD.org>
AuthorDate: 2026-02-10 19:56:28 +0000
Commit:     Dimitry Andric <dim@FreeBSD.org>
CommitDate: 2026-02-12 20:50:36 +0000

    www/qt5-webengine: fix build with clang 21

    With libc++ 21 www/qt5-webengine fails to build, with errors similar to:

        In file included from gen/third_party/blink/renderer/platform/platform_jumbo_54.cc:7:
        ./../../../../kde-qtwebengine-5.15.19p0/src/3rdparty/chromium/third_party/blink/renderer/platform/image-encoders/image_encoder_utils.cc:63:5: error: static assertion expression is not an integral constant expression
        [...]
        ../../../../kde-qtwebengine-5.15.19p0/src/3rdparty/chromium/base/metrics/histogram_macros_internal.h:45:12: note: integer value 8 is outside the valid range of values [0, 7] for the enumeration type 'RequestedImageMimeType'
           45 |     return static_cast<Enum>(
              |            ^

    https://chromium.googlesource.com/chromium/src/+/bb340f66aaf44206fa5106509fb4e8c0719ee831
    fixes these, but has to be slightly adjusted to make it apply to the
    specific chromium version included in qt5-webengine.

    PR:             293093
    Approved by:    jhale (maintainer)
    MFH:            2026Q1

 ...ty_chromium_base_metrics_histogram__macros.h (new) | 19 +++++++++++++++++++
 ...m_base_metrics_histogram__macros__internal.h (new) | 13 +++++++++++++
 ...nts_download_public_common_download__stats.h (new) | 11 +++++++++++
 ..._sessions_core_session__service__commands.cc (new) | 13 +++++++++++++
 ...browser_code__cache_generated__code__cache.h (new) | 12 ++++++++++++
 ...party_chromium_net_cookies_cookie__monster.h (new) | 11 +++++++++++
 ...core_imagebitmap_image__bitmap__factories.cc (new) | 11 +++++++++++
 ...form_image-encoders_image__encoder__utils.cc (new) | 11 +++++++++++
 8 files changed, 101 insertions(+)
Comment 4 commit-hook freebsd_committer freebsd_triage 2026-02-12 20:52:17 UTC
A commit in branch 2026Q1 references this bug:

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

commit 6382cb65433d4a5f25648a312473bd9cff05451f
Author:     Dimitry Andric <dim@FreeBSD.org>
AuthorDate: 2026-02-10 19:56:28 +0000
Commit:     Dimitry Andric <dim@FreeBSD.org>
CommitDate: 2026-02-12 20:51:36 +0000

    www/qt5-webengine: fix build with clang 21

    With libc++ 21 www/qt5-webengine fails to build, with errors similar to:

        In file included from gen/third_party/blink/renderer/platform/platform_jumbo_54.cc:7:
        ./../../../../kde-qtwebengine-5.15.19p0/src/3rdparty/chromium/third_party/blink/renderer/platform/image-encoders/image_encoder_utils.cc:63:5: error: static assertion expression is not an integral constant expression
        [...]
        ../../../../kde-qtwebengine-5.15.19p0/src/3rdparty/chromium/base/metrics/histogram_macros_internal.h:45:12: note: integer value 8 is outside the valid range of values [0, 7] for the enumeration type 'RequestedImageMimeType'
           45 |     return static_cast<Enum>(
              |            ^

    https://chromium.googlesource.com/chromium/src/+/bb340f66aaf44206fa5106509fb4e8c0719ee831
    fixes these, but has to be slightly adjusted to make it apply to the
    specific chromium version included in qt5-webengine.

    PR:             293093
    Approved by:    jhale (maintainer)
    MFH:            2026Q1

    (cherry picked from commit f9807ebb6bda547e662d094b879e68d9ff96b06b)

 ...ty_chromium_base_metrics_histogram__macros.h (new) | 19 +++++++++++++++++++
 ...m_base_metrics_histogram__macros__internal.h (new) | 13 +++++++++++++
 ...nts_download_public_common_download__stats.h (new) | 11 +++++++++++
 ..._sessions_core_session__service__commands.cc (new) | 13 +++++++++++++
 ...browser_code__cache_generated__code__cache.h (new) | 12 ++++++++++++
 ...party_chromium_net_cookies_cookie__monster.h (new) | 11 +++++++++++
 ...core_imagebitmap_image__bitmap__factories.cc (new) | 11 +++++++++++
 ...form_image-encoders_image__encoder__utils.cc (new) | 11 +++++++++++
 8 files changed, 101 insertions(+)