After the upgrade, the `electron` build gives an error

Here’s the error itself:

building the system configuration...
error: builder for '/nix/store/3xmv4rw48h2dfl4ij77dmqjzhiq4rli4-electron-unwrapped-31.7.6.drv' failed with exit code 1;
       last 25 log lines:
       > In file included from ../../third_party/perfetto/include/perfetto/tracing/track_event_legacy.h:26:
       > 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) {
       >       |                    ^
       > 6 errors generated.
       > [2642/50420] CXX obj/third_party/perfetto/src/tracing/client_api_without_backends/tracing.o
       > [2643/50420] CXX obj/third_party/perfetto/src/tracing/client_api_without_backends/track_event_state_tracker.o
       > [2644/50420] CXX obj/third_party/perfetto/src/tracing/client_api_without_backends/tracing_muxer_impl.o
       > ninja: build stopped: subcommand failed.
       For full logs, run 'nix log /nix/store/3xmv4rw48h2dfl4ij77dmqjzhiq4rli4-electron-unwrapped-31.7.6.drv'.
error: 1 dependencies of derivation '/nix/store/gdv223k0cfmci49q0pp722wg8fpxra7s-electron-31.7.6.drv' failed to build
error: 1 dependencies of derivation '/nix/store/hwwh4l0hxsgi9nbm5s3bybdg35cbj7zi-heroic-unwrapped-2.15.2.drv' failed to build
error: 1 dependencies of derivation '/nix/store/nyrwd3dynlf77lcbjbl8b539kvl5hps8-heroic-2.15.2.drv' failed to build
error: 1 dependencies of derivation '/nix/store/4jjhz0mn8y3jl3v0v9ap4dl387fb8402-system-path.drv' failed to build
error: 1 dependencies of derivation '/nix/store/8wx6g72a49cqcjbjpz9xczzxp9j8lw3q-nixos-system-nixos-25.05.20241227.634fd46.drv' failed to build

error in nix log /nix/store/3xmv4rw48h2dfl4ij77dmqjzhiq4rli4-electron-unwrapped-31.7.6.drv:

6 errors generated.
[2640/50420] CXX obj/third_party/perfetto/src/tracing/client_api_without_backends/virtual_destructors.o
[2641/50420] CXX obj/third_party/perfetto/src/tracing/client_api_without_backends/track_event_legacy.o
FAILED: obj/third_party/perfetto/src/tracing/client_api_without_backends/track_event_legacy.o
clang++ -MD -MF obj/third_party/perfetto/src/tracing/client_api_without_backends/track_event_legacy.o.d -DUSE_UDEV -DUSE_AURA=1 -DUSE_GLIB=1 -DUSE_OZONE=1 -DOFFICIAL_BUILD -D__STDC_CONSTANT_>
In file included from ../../third_party/perfetto/src/tracing/track_event_legacy.cc:17:
In file included from ../../third_party/perfetto/include/perfetto/tracing/track_event_legacy.h:26:
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 [-Wmi>
  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 [-Wmi>
  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 [-Wmi>
  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 [-Wmi>
  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 [-Wm>
 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 [-Wm>
 1064 |     Base::template Trace([&](typename Base::TraceContext ctx) {
      |                    ^
6 errors generated.
[2642/50420] CXX obj/third_party/perfetto/src/tracing/client_api_without_backends/tracing.o
[2643/50420] CXX obj/third_party/perfetto/src/tracing/client_api_without_backends/track_event_state_tracker.o
[2644/50420] CXX obj/third_party/perfetto/src/tracing/client_api_without_backends/tracing_muxer_impl.o
ninja: build stopped: subcommand failed.
4 Likes

Yep, getting this same error on electron 31.

2 Likes

Possibly related?

3 Likes

I get exactly the same error, so I opened that issue. As a workaround, I override electron 31 to use stable

3 Likes

It’s only a dependency of other packages in my config, would I have to track down and override all packages that use electron until it’s fixed in unstable?

No, it is enough to only override electron

2 Likes

What’s the simplest way of doing this without flakes? (I’m trying to keep everything vanilla configuration.nix) Is it an override or an overlay, I’m a little scrambled on trying to find out how to override something I’m not explicitly asking to be installed (I’m relatively new)

The versions of electron in stable and unstable seem to be the same

1 Like

I referenced Nixpkgs Reference Manual

  nixpkgs.overlays = [
    (self: super: {
      electron_31 = self.electron;
    })
  ];
2 Likes

The above combined with using the 24.05 versions of gimp-with-plugins, unityhub, bottles and taking out the cudaSupport override for blender seemed to have gotten it to build but several of those are ones I regularly use so I’m still keen to figure out how to know when I can put them back on latest versions and how to diagnose things like this to know what’s happening. Blender especially I use VERY regularly and having it without support for my nvidia GPU is kind of unusable I might have to go back to flatpak for it.

I think as of a day or so ago all the changes that necessitated the overlay have been merged into unstable and worked their way through build, so you shouldn’t need the electron overlay shim anymore.