Formerly, the build exhibited the same error as Bug291296. But even after offending commit was reverted at base fc88be257e30c3e3c01f25ec3a3a6e7933b40c54, still broken with different failure mode like below. In file included from ../../../../../qtwebengine-everywhere-src-6.9.3/src/3rdparty/chromium/pdf/pdf_view_web_plugin.cc:5: In file included from ../../../../../qtwebengine-everywhere-src-6.9.3/src/3rdparty/chromium/pdf/pdf_view_web_plugin.h:32: In file included from ../../../../../qtwebengine-everywhere-src-6.9.3/src/3rdparty/chromium/pdf/pdfium/pdfium_engine_client.h:9: In file included from /usr/include/c++/v1/uchar.h:48: /usr/include/uchar.h:36:23: error: cannot combine with previous 'char' declaration specifier typedef unsigned char char8_t Maybe the root cause is in base (or compiler version dependent), but as I cannot determine it yet, filing this from the aspect of failure mode.
This is like related to the recent addition of char8_t, though I was unable to understand what the exact relationship is.
(In reply to Robert Clausecker from comment #1) Same story as with unreachable() -- non-guarded leaks of C23 defs to _cplusplus scope
(In reply to Dima Panov from comment #2) It's unclear to me how this happens, if I compile a file with just #include <uchar.h> in C++ mode, it builds fine. It took my computer a day to build qt6-webengine far enough to reproduce the issue and I can now finally investigate.
I think I get it. char8_t is a keyword in C++20, so I must not declare this type in C++ mode.
(In reply to Robert Clausecker from comment #4) So typedef part of the commit base f0e541118c374869a8226eaa1320bb6eda248a20 need to be reverted, keeping others intact? If the type is included in language spec itself, there should be no need to typedef it. Or the whole commit to be reverted? Another option could be to typedef for older spec only, but not sure there are some actual needs exist or not. I've searched about char8_t type and found it's for assuring (part of) UTF-8 character(s) to be stored (UTF-8 is a multibytes character encoding, not wide character [wchar_t] in definition). There should be clear needs, but using language spec supporting it is the most straightforward way, thus, not sure support on older specs is needed or not.
Created attachment 265984 [details] sys/_types.h: recognise char8_t as a builtin type in C++20 Proposed patch. sys/_types.h: recognise char8_t as a builtin type in C++20 Unlike in C23 where it's a typedef, char8_t is a built in type in C++20. Recognise it as such.
(In reply to Tomoaki AOKI from comment #5) The attached patch makes it so that we don't define our own char8_t in C++20 or newer mode. Please check if this fixes your problem. Will upload a DR shortly.
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=66129def7bdaf8a0447aba55e736d27687204555 commit 66129def7bdaf8a0447aba55e736d27687204555 Author: Robert Clausecker <fuz@FreeBSD.org> AuthorDate: 2025-12-07 23:49:05 +0000 Commit: Robert Clausecker <fuz@FreeBSD.org> CommitDate: 2025-12-09 13:16:31 +0000 sys/_types.h: recognise char8_t as a builtin type in C++20 Unlike in C23 where it's a typedef, char8_t is a built in type in C++20. Recognise it as such. PR: 291449 Reported by: Tomoaki AOKI <junchoon@dec.sakura.ne.jp> Approved by: markj (mentor) Reviewed by: imp Fixes: f0e541118c374869a8226eaa1320bb6eda248a20 MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D54124 sys/sys/_types.h | 4 ++++ 1 file changed, 4 insertions(+)
Thank you for your report!
(In reply to Robert Clausecker from comment #9) Thanks for fixing! A datapoint. Switched to main branch environment again, backed out previous patch to stddef.h, apply your diff and started building www/qt6-webengine on bare metal before the commit, and finished successfully just now. Note that the patch is applied directly to installed environment (not to /usr/src) at /usr/include with -p2 option to patch.
A commit in branch stable/15 references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=2ff4e6ac0d9f3f4ef477d15c40da04a87f5b7578 commit 2ff4e6ac0d9f3f4ef477d15c40da04a87f5b7578 Author: Robert Clausecker <fuz@FreeBSD.org> AuthorDate: 2025-12-07 23:49:05 +0000 Commit: Robert Clausecker <fuz@FreeBSD.org> CommitDate: 2026-01-01 20:51:52 +0000 sys/_types.h: recognise char8_t as a builtin type in C++20 Unlike in C23 where it's a typedef, char8_t is a built in type in C++20. Recognise it as such. PR: 291449 Reported by: Tomoaki AOKI <junchoon@dec.sakura.ne.jp> Approved by: markj (mentor) Reviewed by: imp Fixes: f0e541118c374869a8226eaa1320bb6eda248a20 MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D54124 (cherry picked from commit 66129def7bdaf8a0447aba55e736d27687204555) sys/sys/_types.h | 4 ++++ 1 file changed, 4 insertions(+)