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

Build failure: breakpad: src/common/module.cc:194:52: error: 'find_if' is not a member of 'std' #368994

Open
jzacsh opened this issue Dec 29, 2024 · 5 comments · May be fixed by #369787
Open

Build failure: breakpad: src/common/module.cc:194:52: error: 'find_if' is not a member of 'std' #368994

jzacsh opened this issue Dec 29, 2024 · 5 comments · May be fixed by #369787
Labels
0.kind: build failure A package fails to build

Comments

@jzacsh
Copy link

jzacsh commented Dec 29, 2024

Steps To Reproduce

Steps to reproduce the behavior:

  1. build breakpad (used nixos-rebuild switch --upgrade)

Build log

Build Log
Checking that all programs called by absolute paths in udev rules exist... OK
building '/nix/store/1ql7wvj7szls4zdr1rrsf1zmin2gsxqb-unit-script-cups-pre-start.drv'...
building '/nix/store/hnfgjm8a9mc1iy1nd3f9sgcjyk0hzs9w-X-Restart-Triggers-systemd-udevd.drv'...
building '/nix/store/qg9rpqllqv3jbyvvrv81lbdn9dzwa2qq-unit-cups.service.drv'...
building '/nix/store/bjh5qk2wigfxj1wfmb2ggrwhca0sdvc6-unit-systemd-udevd.service.drv'...
building '/nix/store/8650vjxrr71223wcg9qrx6g70nyyl03l-system-units.drv'...
g++ -DHAVE_CONFIG_H -I. -I./src  -I./src   -g -O2 -c -o src/common/tools_linux_dump_syms_dump_syms-dwarf_line_to_module.o `test -f 'src/common/dwarf_line_to_module.cc' || echo './'`src/common/dwarf_line_to_module.cc
g++ -DHAVE_CONFIG_H -I. -I./src  -I./src   -g -O2 -c -o src/common/tools_linux_dump_syms_dump_syms-dwarf_range_list_handler.o `test -f 'src/common/dwarf_range_list_handler.cc' || echo './'`src/common/dwarf_range_list_handler.cc
g++ -DHAVE_CONFIG_H -I. -I./src  -I./src   -g -O2 -c -o src/common/tools_linux_dump_syms_dump_syms-language.o `test -f 'src/common/language.cc' || echo './'`src/common/language.cc
g++ -DHAVE_CONFIG_H -I. -I./src  -I./src   -g -O2 -c -o src/common/tools_linux_dump_syms_dump_syms-module.o `test -f 'src/common/module.cc' || echo './'`src/common/module.cc
src/common/module.cc: In member function 'bool google_breakpad::Module::AddFunction(Function*)':
src/common/module.cc:194:52: error: 'find_if' is not a member of 'std'; did you mean 'find'?
  194 |     FunctionSet::iterator existing_function = std::find_if(
      |                                                    ^~~~~~~
      |                                                    find
make: *** [Makefile:7971: src/common/tools_linux_dump_syms_dump_syms-module.o] Error 1
error: builder for '/nix/store/r7wahqqw1fkw6p00z8khqw7zq1pd9k29-breakpad-2023.06.01.drv' failed with exit code 2
error: 1 dependencies of derivation '/nix/store/5glnb3vsysi996dli0mpl9fnf9lp1hcc-sentry-native-0.7.16.drv' failed to build
error: 1 dependencies of derivation '/nix/store/nlh2hfvxd6sp6p08s4z7hvvxpr3hdbyf-protonmail-bridge-gui-3.15.1.drv' failed to build
error: 1 dependencies of derivation '/nix/store/755wb58my4jg5ylj96h8c77ba5jd1pvs-user-environment.drv' failed to build
error: 1 dependencies of derivation '/nix/store/nqhcklln7671j56v2i7j8f4ns67vhzj6-etc.drv' failed to build
error: 1 dependencies of derivation '/nix/store/viq8cwzfhg11vmak3z3xfdwk0033r5ir-nixos-system-oankali-25.05beta729082.634fd4680144.drv' failed to build

Additional context

Metadata

  • system: "x86_64-linux"
  • host os: Linux 6.6.64, NixOS, 25.05 (Warbler), 25.05beta724962.d70bd19e0a38
  • multi-user?: yes
  • sandbox: yes
  • version: nix-env (Nix) 2.24.11
  • channels(jzacsh): "nixos"
  • channels(root): "nixos, nixos-hardware"
  • nixpkgs: /nix/var/nix/profiles/per-user/root/channels/nixos

Notify maintainers

@berberman


Note for maintainers: Please tag this issue in your PR.


Add a 👍 reaction to issues you find important.

@jzacsh jzacsh added the 0.kind: build failure A package fails to build label Dec 29, 2024
@paparodeo
Copy link
Contributor

paparodeo commented Dec 29, 2024

fixed in google/breakpad@898a997

seems like this package could get updated
[edit] or not. it is at the latest tag: https://chromium.googlesource.com/breakpad/breakpad

@jzacsh
Copy link
Author

jzacsh commented Dec 29, 2024

[edit] or not. it is at the latest tag: https://chromium.googlesource.com/breakpad/breakpad

oy, good catch. Yeah... if I'm understanding that page right then v2023.06.01 is the latest tag (which indeed nixpackage seems to be at too), which I think just means the breakpad team's tagging-process stopped/broke 18 months ago.

@outfoxxed
Copy link
Contributor

Seems to have been caused by a stdenv version change. prev.breakpad.override { stdenv = pkgs.gcc13Stdenv; }; builds fine.

@jzacsh
Copy link
Author

jzacsh commented Dec 31, 2024

Seems to have been caused by a stdenv version change. prev.breakpad.override { stdenv = pkgs.gcc13Stdenv; }; builds fine.

Could someone explain how to place that fix into a standard /etc/configuration.nix for nixos? From https://nixos.wiki/wiki/Overlays#In_NixOS I'm guessing that's an has this:

{ config, pkgs, lib, ... }:
{
   # [...]
   nixpkgs.overlays = [ (final: prev: /* overlay goes here */) ];
}

But I don't quite understand nix lang well enough to combine the two (have tried various things like nixpkgs.overlays = [ (final: prev: {prev.breakpad.override { stdenv = pkgs.gcc13Stdenv; }}) ];)

@paparodeo paparodeo linked a pull request Dec 31, 2024 that will close this issue
13 tasks
@paparodeo
Copy link
Contributor

But I don't quite understand nix lang well enough to combine the two (have tried various things like nixpkgs.overlays = [ (final: prev: {prev.breakpad.override { stdenv = pkgs.gcc13Stdenv; }}) ];)

I'm not using nixos but perhaps:

  nixpkgs.overlays = [
    (final: prev: {
      breakpad = prev.breakpad.overrideAttrs (old: { 
        patches = old.patches or [ ] ++ [ 
          (final.fetchpatch { 
            url = "https://github.com/google/breakpad/commit/898a997855168c0e6a689072fefba89246271a5d.patch";
            hash = "sha256-OxodMx7XfKiD9j6b8oFvloslYagSSpQn7BPdpMVOoDY=";
          })
        ];
      });
    })
  ];

or

  nixpkgs.overlays = [
    (final: prev: {
      breakpad = prev.breakpad.override { stdenv = final.gcc13Stdenv; };
    })
  ];

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0.kind: build failure A package fails to build
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants