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

electron_31: fix build after llvm bump #368966

Merged
merged 1 commit into from
Dec 29, 2024
Merged

Conversation

emilylange
Copy link
Member

@emilylange emilylange commented Dec 29, 2024

Fixes #368172

This fixes the following build errors:

[2607/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 [...]
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 [-Wmissing-template-arg-list-after-template-kw]
  331 |     Base::template Trace([](typename Base::TraceContext ctx) { ctx.Flush(); });
      |                    ^
[...]
6 errors generated.

and

FAILED: obj/electron/electron_lib/keyboard_util.o
clang++ -MD -MF [...]
../../electron/shell/common/keyboard_util.cc:19:30: error: constexpr function never produces a constant expression [-Winvalid-constexpr]
   19 | constexpr CodeAndShiftedChar KeyboardCodeFromKeyIdentifier(
      |                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../electron/shell/common/keyboard_util.cc:111:33: note: non-constexpr function 'find' cannot be used in a constant expression
  111 |   if (auto* const iter = Lookup.find(str); iter != Lookup.end())
      |                                 ^
../../base/containers/flat_tree.h:310:18: note: declared here
  310 |   const_iterator find(const Key& key) const;
      |                  ^
1 error generated.

This is happening since staging has been merged into master, which included both a rustc and llvm bump.

Note that we inherit the llvm that rustc exposes.

This is not happening on release-24.11.

Will probably go to bed now and check the then hopefully successful build result tomorrow.

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 25.05 Release Notes (or backporting 24.11 and 25.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

@github-actions github-actions bot added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 1-10 labels Dec 29, 2024
This fixes the following build errors:

~~~
[2607/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 [...]
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 [-Wmissing-template-arg-list-after-template-kw]
  331 |     Base::template Trace([](typename Base::TraceContext ctx) { ctx.Flush(); });
      |                    ^
[...]
6 errors generated.
~~~

and

~~~
FAILED: obj/electron/electron_lib/keyboard_util.o
clang++ -MD -MF [...]
../../electron/shell/common/keyboard_util.cc:19:30: error: constexpr function never produces a constant expression [-Winvalid-constexpr]
   19 | constexpr CodeAndShiftedChar KeyboardCodeFromKeyIdentifier(
      |                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../electron/shell/common/keyboard_util.cc:111:33: note: non-constexpr function 'find' cannot be used in a constant expression
  111 |   if (auto* const iter = Lookup.find(str); iter != Lookup.end())
      |                                 ^
../../base/containers/flat_tree.h:310:18: note: declared here
  310 |   const_iterator find(const Key& key) const;
      |                  ^
1 error generated.
~~~

This is happening since staging has been merged into master, which
included both a rustc and llvm bump.

Note that we inherit the llvm that rustc exposes.

Co-Authored-By: K900 <me@0upti.me>
@emilylange
Copy link
Member Author

@K900 looked into this when I was asleep and noticed another build error at the very end

[50281/50420] CXX obj/electron/electron_lib/keyboard_util.o

and fixed that as well :)

Thanks!

Copy link
Member

@teutat3s teutat3s left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No resources to build electron atm, but leaving a LGTM here. Thanks for taking care of these fixes.

@K900
Copy link
Contributor

K900 commented Dec 29, 2024

Built locally on this exact commit.

@K900 K900 merged commit 5dfc603 into NixOS:master Dec 29, 2024
31 of 32 checks passed
@emilylange emilylange deleted the electron_31 branch December 29, 2024 17:27
@emilylange
Copy link
Member Author

bit late, but for the sake of completeness:

nixpkgs-review result

Generated using nixpkgs-review.

Command: nixpkgs-review pr 368966


x86_64-linux

✅ 7 packages built:
  • electron_31
  • feishin
  • heroic
  • heroic-unwrapped
  • pocket-casts
  • webcord-vencord
  • zap-chip-gui

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 1-10
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Build failure: electron 31
3 participants