Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

www-client/ungoogled-chromium-125.0.6422.141_p1: track_event_data_source.h:331:20: error: a template argument list is expected after a name prefixed by the template keyword [-Wmissing-template-arg-list-after-template-kw] #351

Closed
fordfrog opened this issue Jun 9, 2024 · 22 comments
Labels
bug Something isn't working

Comments

@fordfrog
Copy link

fordfrog commented Jun 9, 2024

this is the error:

[1459/4359] x86_64-pc-linux-gnu-clang++ -MD -MF obj/third_party/perfetto/src/tracing/client_api_without_backends/track_event_internal.o.d -DUSE_UDEV -DUSE_AURA=1 -DUSE_GLIB=1 -DUSE_OZONE=1 -DOFFICIAL_BUILD -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -DNO_UNWIND_TABLES -D_GNU_SOURCE -D_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_NONE -D_GLIBCXX_ASSERTIONS=1 -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0 -DPERFETTO_IMPLEMENTATION -I../.. -Igen -Igen/shim_headers/zlib_shim -I../../third_party/perfetto -I../../third_party/perfetto/src/profiling/memory/include -I../../third_party/perfetto/include -Igen/third_party/perfetto/build_config -Igen/third_party/perfetto -I../../third_party/protobuf/src -Igen/protoc_out -Wimplicit-fallthrough -Wextra-semi -Wunreachable-code-aggressive -Wthread-safety -Wno-missing-field-initializers -Wno-unused-parameter -Wno-psabi -Wloop-analysis -Wno-unneeded-internal-declaration -Wno-cast-function-type -Wno-ignored-pragma-optimize -Wno-deprecated-builtins -Wno-bitfield-constant-conversion -Wno-deprecated-this-capture -Wno-invalid-offsetof -Wno-vla-extension -Wno-thread-safety-reference-return -Wshadow -fno-delete-null-pointer-checks -fno-ident -fno-strict-aliasing -fstack-protector -fno-unwind-tables -fno-asynchronous-unwind-tables -fPIC -pthread -fcolor-diagnostics -fmerge-all-constants -flto=thin -fno-split-lto-unit -fwhole-program-vtables -no-canonical-prefixes -ftrivial-auto-var-init=pattern -O2 -fdata-sections -ffunction-sections -fno-unique-section-names -fno-math-errno -fno-omit-frame-pointer -g0 -fprofile-use=../../chrome/build/pgo_profiles/chrome-linux-6422-1715686914-39d3c200676449e33ad84989ea45ad3474fab6e2-013ab7d1275249b95c27d77aaaa0d257ac6d2359.profdata -Wno-profile-instr-unprofiled -Wno-profile-instr-out-of-date -Wno-backend-plugin -fvisibility=hidden -Wheader-hygiene -Wstring-conversion -Wtautological-overlap-compare -DPROTOBUF_ALLOW_DEPRECATED=1 -Wenum-compare-conditional -Wno-c++11-narrowing-const-reference -std=c++20 -Wno-trigraphs -gsimple-template-names -fno-exceptions -fno-rtti -fvisibility-inlines-hidden  -D__DATE__= -D__TIME__= -D__TIMESTAMP__= -march=alderlake -pipe -frecord-gcc-switches -U_GLIBCXX_ASSERTIONS -Wno-unknown-warning-option -Wno-builtin-macro-redefined -c ../../third_party/perfetto/src/tracing/internal/track_event_internal.cc -o obj/third_party/perfetto/src/tracing/client_api_without_backends/track_event_internal.o
FAILED: obj/third_party/perfetto/src/tracing/client_api_without_backends/track_event_internal.o 
x86_64-pc-linux-gnu-clang++ -MD -MF obj/third_party/perfetto/src/tracing/client_api_without_backends/track_event_internal.o.d -DUSE_UDEV -DUSE_AURA=1 -DUSE_GLIB=1 -DUSE_OZONE=1 -DOFFICIAL_BUILD -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -DNO_UNWIND_TABLES -D_GNU_SOURCE -D_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_NONE -D_GLIBCXX_ASSERTIONS=1 -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0 -DPERFETTO_IMPLEMENTATION -I../.. -Igen -Igen/shim_headers/zlib_shim -I../../third_party/perfetto -I../../third_party/perfetto/src/profiling/memory/include -I../../third_party/perfetto/include -Igen/third_party/perfetto/build_config -Igen/third_party/perfetto -I../../third_party/protobuf/src -Igen/protoc_out -Wimplicit-fallthrough -Wextra-semi -Wunreachable-code-aggressive -Wthread-safety -Wno-missing-field-initializers -Wno-unused-parameter -Wno-psabi -Wloop-analysis -Wno-unneeded-internal-declaration -Wno-cast-function-type -Wno-ignored-pragma-optimize -Wno-deprecated-builtins -Wno-bitfield-constant-conversion -Wno-deprecated-this-capture -Wno-invalid-offsetof -Wno-vla-extension -Wno-thread-safety-reference-return -Wshadow -fno-delete-null-pointer-checks -fno-ident -fno-strict-aliasing -fstack-protector -fno-unwind-tables -fno-asynchronous-unwind-tables -fPIC -pthread -fcolor-diagnostics -fmerge-all-constants -flto=thin -fno-split-lto-unit -fwhole-program-vtables -no-canonical-prefixes -ftrivial-auto-var-init=pattern -O2 -fdata-sections -ffunction-sections -fno-unique-section-names -fno-math-errno -fno-omit-frame-pointer -g0 -fprofile-use=../../chrome/build/pgo_profiles/chrome-linux-6422-1715686914-39d3c200676449e33ad84989ea45ad3474fab6e2-013ab7d1275249b95c27d77aaaa0d257ac6d2359.profdata -Wno-profile-instr-unprofiled -Wno-profile-instr-out-of-date -Wno-backend-plugin -fvisibility=hidden -Wheader-hygiene -Wstring-conversion -Wtautological-overlap-compare -DPROTOBUF_ALLOW_DEPRECATED=1 -Wenum-compare-conditional -Wno-c++11-narrowing-const-reference -std=c++20 -Wno-trigraphs -gsimple-template-names -fno-exceptions -fno-rtti -fvisibility-inlines-hidden  -D__DATE__= -D__TIME__= -D__TIMESTAMP__= -march=alderlake -pipe -frecord-gcc-switches -U_GLIBCXX_ASSERTIONS -Wno-unknown-warning-option -Wno-builtin-macro-redefined -c ../../third_party/perfetto/src/tracing/internal/track_event_internal.cc -o obj/third_party/perfetto/src/tracing/client_api_without_backends/track_event_internal.o
In file included from <built-in>:517:
<command line>:16:9: warning: '_LIBCPP_HARDENING_MODE' macro redefined [-Wmacro-redefined]
   16 | #define _LIBCPP_HARDENING_MODE _LIBCPP_HARDENING_MODE_NONE
      |         ^
<command line>:3:9: note: previous definition is here
    3 | #define _LIBCPP_HARDENING_MODE _LIBCPP_HARDENING_MODE_EXTENSIVE
      |         ^
In file included from ../../third_party/perfetto/src/tracing/internal/track_event_internal.cc:23:
In file included from ../../third_party/perfetto/include/perfetto/tracing/track_event.h:20:
../../third_party/perfetto/include/perfetto/tracing/internal/track_event_data_source.h:331:20: error: a template argument list is expected after a name prefixed by the template keyword [-Wmissing-template-arg-list-after-template-kw]
  331 |     Base::template Trace([](typename Base::TraceContext ctx) { ctx.Flush(); });
      |                    ^
../../third_party/perfetto/include/perfetto/tracing/internal/track_event_data_source.h:337:20: error: a template argument list is expected after a name prefixed by the template keyword [-Wmissing-template-arg-list-after-template-kw]
  337 |     Base::template CallIfEnabled(
      |                    ^
../../third_party/perfetto/include/perfetto/tracing/internal/track_event_data_source.h:352:20: error: a template argument list is expected after a name prefixed by the template keyword [-Wmissing-template-arg-list-after-template-kw]
  352 |     Base::template Trace([&](typename Base::TraceContext ctx) {
      |                    ^
../../third_party/perfetto/include/perfetto/tracing/internal/track_event_data_source.h:499:20: error: a template argument list is expected after a name prefixed by the template keyword [-Wmissing-template-arg-list-after-template-kw]
  499 |     Base::template Trace([&](typename Base::TraceContext ctx) {
      |                    ^
../../third_party/perfetto/include/perfetto/tracing/internal/track_event_data_source.h:1050:22: error: a template argument list is expected after a name prefixed by the template keyword [-Wmissing-template-arg-list-after-template-kw]
 1050 |       Base::template TraceWithInstances(instances, std::move(lambda));
      |                      ^
../../third_party/perfetto/include/perfetto/tracing/internal/track_event_data_source.h:1064:20: error: a template argument list is expected after a name prefixed by the template keyword [-Wmissing-template-arg-list-after-template-kw]
 1064 |     Base::template Trace([&](typename Base::TraceContext ctx) {
      |                    ^
1 warning and 6 errors generated.
ninja: build stopped: subcommand failed.

here are the use flags:

[ebuild     U #] www-client/ungoogled-chromium-125.0.6422.141_p1::pf4public [124.0.6367.207_p1::pf4public] USE="X bluetooth clang convert-dict cups hevc nvidia official optimize-thinlto optimize-webui pgo proprietary-codecs pulseaudio qt5 qt6 system-brotli system-crc32c system-double-conversion system-ffmpeg system-harfbuzz system-icu system-libevent system-libusb system-openh264 system-openjpeg system-png system-zstd thinlto vaapi wayland widevine -cfi -cromite -custom-cflags -debug -enable-driver -gtk4 -hangouts -headless -kerberos -libcxx -override-data-dir -pax-kernel -screencast (-selinux) -system-abseil-cpp -system-av1 -system-jsoncpp -system-libvpx -system-re2 -system-snappy -system-woff2" L10N="cs -af -am -ar -bg -bn -ca -da -de -el -en-GB -es -es-419 -et -fa -fi -fil -fr -gu -he -hi -hr -hu -id -it -ja -kn -ko -lt -lv -ml -mr -ms -nb -nl -pl -pt-BR -pt-PT -ro -ru -sk -sl -sr -sv -sw -ta -te -th -tr -uk -ur -vi -zh-CN -zh-TW" 0 KiB

and here clang versions:

# equery list clang
 * Searching for clang ...
[IP-] [  ] sys-devel/clang-17.0.6:17/17
[IP-] [  ] sys-devel/clang-19.0.0_pre20240608:19/19.0.0_pre20240608
@fordfrog fordfrog added the bug Something isn't working label Jun 9, 2024
@PF4Public
Copy link
Owner

Give this patch a try: https://android.googlesource.com/platform/external/perfetto.git/+/e2f661907a717551235563389977b7468da6d45e%5E%21/#F0

Note though, that it won't apply from the sources root.

@fordfrog
Copy link
Author

fordfrog commented Jun 9, 2024

thanks! i had to remove one more template on line 1063 and now it moves on.

@fordfrog
Copy link
Author

fordfrog commented Jun 9, 2024

i encountered the same issue in third_party/blink/renderer/platform/wtf/hash_table.h.

@PF4Public
Copy link
Owner

@fordfrog
Copy link
Author

no more of these issues, but i didn't finish the build as i got an error in clang...

@fordfrog
Copy link
Author

i just synced the repo and tried 126.0.6478.61_p1 and the issue is still there

@PF4Public
Copy link
Owner

Because it is an llvm issue, not Chromium.

@Arniiiii
Copy link

Arniiiii commented Jul 7, 2024

I could compile with next patch placed at /etc/portage/patches/www-client/ungoogled-chromium-125.0.6422.141_p1/a_patch.patch

@Arniiiii
Copy link

Arniiiii commented Jul 8, 2024

I can confirm the same patch works with www-client/ungoogled-chromium-126.0.6478.126_p1

@PF4Public
Copy link
Owner

@Gerodote Have you tried live version of llvm? If the issue persists there, perhaps I should include the patch.

@Arniiiii
Copy link

Arniiiii commented Jul 8, 2024

@PF4Public , I could not compile some parts of llvm-9999 stack like two or three days ago, that's why I'm using llvm with version 19.0.0_pre20240623 , though, I'll test with version 19.0.0_pre20240706

@PF4Public
Copy link
Owner

Chromium developers seem to acknowledge this issue: https://chromium-review.googlesource.com/c/chromium/src/+/5604664. The fix should be in 127.

@Arniiiii
Copy link

Arniiiii commented Jul 9, 2024

@PF4Public , I could not compile some parts of llvm-9999 stack like two or three days ago, that's why I'm using llvm with version 19.0.0_pre20240623 , though, I'll test with version 19.0.0_pre20240706

issue persist. afaik, they are not going to fix it because it's by standard.

@fordfrog
Copy link
Author

fordfrog commented Jul 9, 2024

i commented on their bug that i found similar at llvm/llvm-project#95720

i also have another issue when compiling ungoogled-chromium (it seems i'm the only one getting it though) so i filed this issue llvm/llvm-project#96623 which was chained to two follow-up issues as they were able to reproduce it.

@PF4Public
Copy link
Owner

they are not going to fix it because it's by standard

I've got the same impression. I'll include your patch then.

PF4Public added a commit that referenced this issue Jul 9, 2024
@brianpardy
Copy link

If the other patches on here don't fix it up for everyone, here's a link to the patch that I compiled after chasing down all the links in this ticket and editing their patches - https://pastebin.com/96ih8dT7 . It worked for me with 126.0.6478.126_p1 with the clang-19/llvm-19 *-9999 ebuilds in gentoo main. It also includes some similar fixes in third_party/grpc/ .

@PF4Public
Copy link
Owner

@brianpardy I wonder why you need something additional, is it because of live version?

@Arniiiii
Copy link

@brianpardy , I wonder too

@brianpardy
Copy link

@brianpardy I wonder why you need something additional, is it because of live version?

They may not strictly be needed. I prepped this patch just before this issue got active again and haven't tried the more minimal patches that were posted recently. The grpc and BUILD.gn contents came from https://issuetracker.google.com/issues/344680447 . I kept building and failing and just pulled in every patch that looked relevant.

Or my USE flags might make them needed, I build with nvidia, lto and pgo.

USE="X clang cups libcxx nvidia official optimize-thinlto optimize-webui pgo proprietary-codecs scre encast system-harfbuzz system-icu system-libevent system-libusb system-openh264 system-png system-zs td thinlto vaapi wayland -bluetooth -cfi -convert-dict -cromite -custom-cflags -debug -enable-driver -gtk4 -hangouts -headless -hevc -kerberos -override-data-dir -pax-kernel -pulseaudio -qt5 -qt6 (-se linux) -system-abseil-cpp -system-av1 -system-brotli -system-crc32c -system-double-conversion -syste m-ffmpeg -system-jsoncpp -system-libvpx -system-openjpeg -system-re2 -system-snappy -system-woff2 -w idevine" ABI_X86="(64)" L10N="-af -am -ar -bg -bn -ca -cs -da -de -el -en-GB -es -es-419 -et -fa -fi -fil -fr -gu -he -hi -hr -hu -id -it -ja -kn -ko -lt -lv -ml -mr -ms -nb -nl -pl -pt-BR -pt-PT -ro -ru -sk -sl -sr -sv -sw -ta -te -th -tr -uk -ur -vi -zh-CN -zh-TW"

@PF4Public
Copy link
Owner

@brianpardy Do you intentionally use libcxx? That might be the difference.

@brianpardy
Copy link

@brianpardy Do you intentionally use libcxx? That might be the difference.

@PF4Public yes, I can see that I specifically enabled libcxx when a change was made during the 121- series to default it to false, I had build errors at that time without it. I don't know if I still need it on current releases.

@PF4Public
Copy link
Owner

PF4Public commented Jul 11, 2024

still need it on current releases

I try my best to decouple ungoogled-chromium from libcxx and rust in my overlay. Sometimes it takes more time than I anticipated (and I have less at my disposal) :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants