NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
18.11k stars 14.15k forks source link

error: builder for '/nix/store/pbwah23n5vhb64bpdb39hb3hpv6v325f-fprintd-tod-1.90.9.drv' failed with exit code 1 #175212

Closed dainslef closed 2 years ago

dainslef commented 2 years ago

Steps To Reproduce

Steps to reproduce the behavior:

  1. The fprint reader in my device is supported by libfprint-2-tod1-goodix.
  2. I use these config:
    services = {
    fprintd = {
      enable = true;
      tod = {
        enable = true;
        driver = pkgs.libfprint-2-tod1-goodix;
      };
    };
    }

Build log

exporting https://git.launchpad.net/~oem-solutions-engineers/libfprint-2-tod1-goodix/+git/libfprint-2-tod1-goodix (rev 882735c6366fbe30149eea5cfd6d0ddff880f0e4) into /nix/store/l6hcp764qg5yaqxinbrjdbw5cwzjv1ad-libfprint-2-tod1-goodix-882735c
Initialized empty Git repository in /nix/store/l6hcp764qg5yaqxinbrjdbw5cwzjv1ad-libfprint-2-tod1-goodix-882735c/.git/
unpacking sources
unpacking source archive /nix/store/5dhsyf1wir30cc0a0cki2g14l2vlizv0-source
source root is source
patching sources
patching script interpreter paths in po/check-translations.sh tests/unittest_inspector.py
po/check-translations.sh: interpreter directive changed from "#!/bin/bash" to "/nix/store/0d3wgx8x6dxdb2cpnq105z23hah07z7l-bash-5.1-p16/bin/bash"
tests/unittest_inspector.py: interpreter directive changed from "#! /usr/bin/env python3" to "/nix/store/vzqny68wq33dcg4hkdala51n5vqhpnwc-python3-3.9.12/bin/python3"
configuring
meson flags: --buildtype=plain         --libdir=/nix/store/kr9j3wn25n2gdmld91451zd2fnfsn8xq-fprintd-tod-1.90.9/lib --libexecdir=/nix/store/kr9j3wn25n2gdmld91451zd2fnfsn8xq-fprintd-tod-1.90.9/libexec         --bindir=/nix/store/kr9j3wn25n2gdmld91451zd2fnfsn8xq-fprintd-tod-1.90.9/bin --sbindir=/nix/store/kr9j3wn25n2gdmld91451zd2fnfsn8xq-fprintd-tod-1.90.9/sbin         --includedir=/nix/store/kr9j3wn25n2gdmld91451zd2fnfsn8xq-fprintd-tod-1.90.9/include         --mandir=/nix/store/kr9j3wn25n2gdmld91451zd2fnfsn8xq-fprintd-tod-1.90.9/share/man --infodir=/nix/store/kr9j3wn25n2gdmld91451zd2fnfsn8xq-fprintd-tod-1.90.9/share/info         --localedir=/nix/store/kr9j3wn25n2gdmld91451zd2fnfsn8xq-fprintd-tod-1.90.9/share/locale         -Dauto_features=enabled         -Dwrap_mode=nodownload         --prefix=/nix/store/kr9j3wn25n2gdmld91451zd2fnfsn8xq-fprintd-tod-1.90.9 -Dgtk_doc=true -Dpam_modules_dir=/nix/store/kr9j3wn25n2gdmld91451zd2fnfsn8xq-fprintd-tod-1.90.9/lib/security -Dsysconfdir=/nix/store/kr9j3wn25n2gdmld91451zd2fnfsn8xq-fprintd-tod-1.90.9/etc -Ddbus_service_dir=/nix/store/kr9j3wn25n2gdmld91451zd2fnfsn8xq-fprintd-tod-1.90.9/share/dbus-1/system-services -Dsystemd_system_unit_dir=/nix/store/kr9j3wn25n2gdmld91451zd2fnfsn8xq-fprintd-tod-1.90.9/lib/systemd/system 
The Meson build system
Version: 0.61.2
Source dir: /build/source
Build dir: /build/source/build
Build type: native build
Project name: fprintd
Project version: 1.90.9
C compiler for the host machine: gcc (gcc 11.3.0 "gcc (GCC) 11.3.0")
C linker for the host machine: gcc ld.bfd 2.38
Host machine cpu family: x86_64
Host machine cpu: x86_64
Compiler for C supports arguments -fno-strict-aliasing: YES 
Compiler for C supports arguments -Wcast-align: YES 
Compiler for C supports arguments -Werror=address: YES 
Compiler for C supports arguments -Werror=array-bounds: YES 
Compiler for C supports arguments -Werror=empty-body: YES 
Compiler for C supports arguments -Werror=implicit: YES 
Compiler for C supports arguments -Werror=init-self: YES 
Compiler for C supports arguments -Werror=int-to-pointer-cast: YES 
Compiler for C supports arguments -Werror=main: YES 
Compiler for C supports arguments -Werror=missing-braces: YES 
Compiler for C supports arguments -Werror=nonnull: YES 
Compiler for C supports arguments -Werror=pointer-to-int-cast: YES 
Compiler for C supports arguments -Werror=redundant-decls: YES 
Compiler for C supports arguments -Werror=return-type: YES 
Compiler for C supports arguments -Werror=sequence-point: YES 
Compiler for C supports arguments -Werror=trigraphs: YES 
Compiler for C supports arguments -Werror=write-strings: YES 
Compiler for C supports arguments -Wformat-nonliteral: YES 
Compiler for C supports arguments -Wformat-security: YES 
Compiler for C supports arguments -Wformat=2: YES 
Compiler for C supports arguments -Wignored-qualifiers: YES 
Compiler for C supports arguments -Wimplicit-function-declaration: YES 
Compiler for C supports arguments -Wlogical-op: YES 
Compiler for C supports arguments -Wmissing-declarations: YES 
Compiler for C supports arguments -Wmissing-format-attribute: YES 
Compiler for C supports arguments -Wmissing-include-dirs: YES 
Compiler for C supports arguments -Wmissing-noreturn: YES 
Compiler for C supports arguments -Wmissing-prototypes: YES 
Compiler for C supports arguments -Wnested-externs: YES 
Compiler for C supports arguments -Wold-style-definition: YES 
Compiler for C supports arguments -Wpointer-arith: YES 
Compiler for C supports arguments -Wshadow: YES 
Compiler for C supports arguments -Wstrict-prototypes: YES 
Compiler for C supports arguments -Wtype-limits: YES 
Compiler for C supports arguments -Wundef: YES 
Compiler for C supports arguments -Wunused: YES 
Compiler for C supports arguments -Wno-unused-parameter: YES 
Compiler for C supports arguments -Wno-pedantic: YES 
Found pkg-config: /nix/store/pgzxjz68spd4vr2xw5ba3vvgnj1bh62p-pkg-config-wrapper-0.29.2/bin/pkg-config (0.29.2)
Run-time dependency glib-2.0 found: YES 2.72.1
Run-time dependency gio-2.0 found: YES 2.72.1
Run-time dependency gio-unix-2.0 found: YES 2.72.1
Run-time dependency gmodule-2.0 found: YES 2.72.1
Run-time dependency libfprint-2 found: YES 1.90.7+git20210222+tod1
Run-time dependency polkit-gobject-1 found: YES 0.120
Run-time dependency dbus-1 found: YES 1.14.0
Run-time dependency libsystemd found: YES 250
Has header "security/pam_modules.h" : YES 
Library pam found: YES
Program pod2man found: YES (/nix/store/hpppiam2slc5x9jbf7g67051bygf0bzi-perl-5.34.1/bin/pod2man)
Program xsltproc found: YES (/nix/store/kif912apa7hcbb3gr3rk2725s17wnzaa-libxslt-1.1.35-bin/bin/xsltproc)
Run-time dependency systemd found: YES 250
Run-time dependency pam_wrapper found: YES 1.1.3
Program xmllint found: NO
Program python3 found: YES (/nix/store/vzqny68wq33dcg4hkdala51n5vqhpnwc-python3-3.9.12/bin/python3)
building '/nix/store/jykyfkbfkbbcbbcpr2nya5mzgp2jjvfl-libfprint-2-tod1-goodix-882735c.drv'...
WARNING: You should add the boolean check kwarg to the run_command call.
         It currently defaults to false,
         but it will default to true in future releases of meson.
         See also: https://github.com/mesonbuild/meson/issues/9300
Configuring config.h using configuration
Program bash found: YES (/nix/store/0d3wgx8x6dxdb2cpnq105z23hah07z7l-bash-5.1-p16/bin/bash)

src/meson.build:18:0: ERROR: gnome.gdbus_codegen keyword argument 'sources' was of type array[CustomTarget] but should have been array[str | File]

A full log can be found at /build/source/build/meson-logs/meson-log.txt
exporting https://git.launchpad.net/~oem-solutions-engineers/libfprint-2-tod1-goodix/+git/libfprint-2-tod1-goodix (rev 882735c6366fbe30149eea5cfd6d0ddff880f0e4) into /nix/store/l6hcp764qg5yaqxinbrjdbw5cwzjv1ad-libfprint-2-tod1-goodix-882735c
Initialized empty Git repository in /nix/store/l6hcp764qg5yaqxinbrjdbw5cwzjv1ad-libfprint-2-tod1-goodix-882735c/.git/
error: builder for '/nix/store/pbwah23n5vhb64bpdb39hb3hpv6v325f-fprintd-tod-1.90.9.drv' failed with exit code 1
error: 1 dependencies of derivation '/nix/store/11cjs1jwiixa6i85m8v6h20n508qai57-dbus-1.drv' failed to build
error: 1 dependencies of derivation '/nix/store/3ivdh5cj71qm5akc6ni91aqn8kjpzfmh-fprintd-tod-1.90.9_fish-completions.drv' failed to build
error: 1 dependencies of derivation '/nix/store/rm6i4k96ih88x7v4rmfpdrs1mdc9ar1x-man-paths.drv' failed to build
error: 1 dependencies of derivation '/nix/store/iwdagafhzgnz0vdi6bprhsjij1mx1gr1-system-path.drv' failed to build
error: 1 dependencies of derivation '/nix/store/h5caw68zv5fh40bf2gy275ghgi033k67-nixos-system-MATEBOOK-X-2021-22.11pre380684.83658b28fe6.drv' failed to build

Additional context

Nothing.

Notify maintainers

@abbradar

Metadata

Please run nix-shell -p nix-info --run "nix-info -m" and paste the result.

[user@system:~]$ nix-shell -p nix-info --run "nix-info -m"
 - system: `"x86_64-linux"`
 - host os: `Linux 5.17.7-zen1, NixOS, 22.11 (Raccoon), 22.11pre380684.83658b28fe6`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.8.1`
 - channels(root): `"nixos"`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos`
hmenke commented 2 years ago

This builds but I haven't tested it yet.

{
  services.fprintd.package = with pkgs;
    fprintd-tod.overrideAttrs ({ patches ? [], postPatch ? "", ... }: {
      patches = patches ++ [
        (fetchpatch {
          name = "use-more-idiomatic-correct-embedded-shell-scripting";
          url = "https://gitlab.freedesktop.org/libfprint/fprintd/-/commit/f4256533d1ffdc203c3f8c6ee42e8dcde470a93f.patch";
          sha256 = "sha256-4uPrYEgJyXU4zx2V3gwKKLaD6ty0wylSriHlvKvOhek=";
        })
        (fetchpatch {
          name = "remove-pointless-copying-of-files-into-build-directory";
          url = "https://gitlab.freedesktop.org/libfprint/fprintd/-/commit/2c34cef5ef2004d8479475db5523c572eb409a6b.patch";
          sha256 = "sha256-2pZBbMF1xjoDKn/jCAIldbeR2JNEVduXB8bqUrj2Ih4=";
        })
        (fetchpatch {
          name = "build-Do-not-use-positional-arguments-in-i18n.merge_file";
          url = "https://gitlab.freedesktop.org/libfprint/fprintd/-/commit/50943b1bd4f18d103c35233f0446ce7a31d1817e.patch";
          sha256 = "sha256-ANkAq6fr0VRjkS0ckvf/ddVB2mH4b2uJRTI4H8vPPes=";
        })
      ];
      postPatch = ''
        ${postPatch}
        # part of "remove-pointless-copying-of-files-into-build-directory" but git-apply doesn't handle renaming
        mv src/device.xml src/net.reactivated.Fprint.Device.xml
        mv src/manager.xml src/net.reactivated.Fprint.Manager.xml
      '';
    });
}
hmenke commented 2 years ago

Doesn't work yet. Now it segfaults in libusb. Likely due to this: https://bugs.archlinux.org/task/74240 https://github.com/libusb/libusb/issues/1038 https://github.com/libusb/libusb/commit/7cc06ea5c7c3b36801421a6be17b51b92c1bc05a

hmenke commented 2 years ago

This finally builds and doesn't segfault but still doesn't work.

{
  services.fprintd.package = with pkgs;
    (fprintd-tod.override {
      libfprint-tod = libfprint-tod.override {
        libfprint = libfprint.override {
          gusb = gusb.override {
            libusb1 = libusb1.overrideAttrs ({ patches ? [], ... }: {
              patches = patches ++ [
                (fetchpatch {
                  name = "core-Unset-device-ctx-if-it-has-been-destroyed";
                  url = "https://github.com/libusb/libusb/commit/c3639bc23eaaed7fa94d377af42f00ddc5083de2.patch";
                  sha256 = "sha256-gBtV5b3U+bM44KFykrXA34EdI8XxgoHXdK+UbjBjAAo=";
                })
                (fetchpatch {
                  name = "io-Track-device-in-usbi-transfer";
                  url = "https://github.com/libusb/libusb/commit/7cc06ea5c7c3b36801421a6be17b51b92c1bc05a.patch";
                  sha256 = "sha256-sI+5bk50ZZuchMYnlI5K7qFT+rGdgM6f3N0vfUTYxvE=";
                })
              ];
            });
          };
        };
      };
    }).overrideAttrs ({ patches ? [], postPatch ? "", ... }: {
      patches = patches ++ [
        (fetchpatch {
          name = "use-more-idiomatic-correct-embedded-shell-scripting";
          url = "https://gitlab.freedesktop.org/libfprint/fprintd/-/commit/f4256533d1ffdc203c3f8c6ee42e8dcde470a93f.patch";
          sha256 = "sha256-4uPrYEgJyXU4zx2V3gwKKLaD6ty0wylSriHlvKvOhek=";
        })
        (fetchpatch {
          name = "remove-pointless-copying-of-files-into-build-directory";
          url = "https://gitlab.freedesktop.org/libfprint/fprintd/-/commit/2c34cef5ef2004d8479475db5523c572eb409a6b.patch";
          sha256 = "sha256-2pZBbMF1xjoDKn/jCAIldbeR2JNEVduXB8bqUrj2Ih4=";
        })
        (fetchpatch {
          name = "build-Do-not-use-positional-arguments-in-i18n.merge_file";
          url = "https://gitlab.freedesktop.org/libfprint/fprintd/-/commit/50943b1bd4f18d103c35233f0446ce7a31d1817e.patch";
          sha256 = "sha256-ANkAq6fr0VRjkS0ckvf/ddVB2mH4b2uJRTI4H8vPPes=";
        })
      ];
      postPatch = ''
        ${postPatch}
        # part of "remove-pointless-copying-of-files-into-build-directory" but git-apply doesn't handle renaming
        mv src/device.xml src/net.reactivated.Fprint.Device.xml
        mv src/manager.xml src/net.reactivated.Fprint.Manager.xml
      '';
    });
}

There is a mysterious libgxfp_start_session failed in the log, which Google knows absolutely nothing about.

Jun 07 20:58:16 laptop systemd[1]: Starting Fingerprint Authentication Daemon...
Jun 07 20:58:16 laptop fprintd[3094]: About to load configuration file '/nix/store/hbhkpn8rr3lghpq02l69nh6pfflalk94-fprintd-tod-1.90.9/etc/fprintd.conf'
Jun 07 20:58:16 laptop fprintd[3094]: Launching FprintObject
Jun 07 20:58:16 laptop fprintd[3094]: Opening driver /nix/store/qmbh0q4a089ayiidll1icj0g7gn3wmp2-libfprint-2-tod1-goodix-0.0.6/lib/libfprint-2/tod-1/libfprint-tod-goodix-53xc-0.0.6.so
Jun 07 20:58:16 laptop fprintd[3094]: Found TOD entry point symbol 0x7fab9fe63920, GType is 10857360
Jun 07 20:58:16 laptop fprintd[3094]: Loading driver goodix-tod (Goodix Fingerprint Sensor 53xc)
Jun 07 20:58:16 laptop fprintd[3094]: No driver found for USB device 1D6B:0003
Jun 07 20:58:16 laptop fprintd[3094]: No driver found for USB device 1050:0407
Jun 07 20:58:16 laptop fprintd[3094]: No driver found for USB device 0C45:6A0F
Jun 07 20:58:16 laptop fprintd[3094]: Goodix libfpfint-tod driver version 0.0.6
Jun 07 20:58:17 laptop fprintd[3094]: Device reported probe completion
Jun 07 20:58:17 laptop fprintd[3094]: No driver found for USB device 8087:0026
Jun 07 20:58:17 laptop fprintd[3094]: No driver found for USB device 1D6B:0002
Jun 07 20:58:17 laptop fprintd[3094]: No driver found for USB device 1D6B:0003
Jun 07 20:58:17 laptop fprintd[3094]: No driver found for USB device 1D6B:0002
Jun 07 20:58:17 laptop fprintd[3094]: Completing action FPI_DEVICE_ACTION_PROBE in idle!
Jun 07 20:58:17 laptop fprintd[3094]: entering main loop
Jun 07 20:58:17 laptop systemd[1]: Started Fingerprint Authentication Daemon.
Jun 07 20:58:17 laptop fprintd[3094]: D-Bus service launched with name: net.reactivated.Fprint
Jun 07 20:58:20 laptop fprintd[3094]: Requesting device 'Goodix Fingerprint Sensor 53xc' authorization for method ListEnrolledFingers from :1.52
Jun 07 20:58:20 laptop fprintd[3094]: Getting authorization to perform Polkit action net.reactivated.fprint.device.setusername
Jun 07 20:58:20 laptop fprintd[3094]: Getting authorization to perform Polkit action net.reactivated.fprint.device.verify
Jun 07 20:58:20 laptop fprintd[3094]: Authorization granted to Goodix Fingerprint Sensor 53xc to call method 'ListEnrolledFingers' for device :1.52!
Jun 07 20:58:20 laptop fprintd[3094]: file_storage_discover_prints() for user 'henri' in '/var/lib/fprint/henri/goodix-tod/0'
Jun 07 20:58:20 laptop fprintd[3094]: Requesting device 'Goodix Fingerprint Sensor 53xc' authorization for method Claim from :1.52
Jun 07 20:58:20 laptop fprintd[3094]: Getting authorization to perform Polkit action net.reactivated.fprint.device.setusername
Jun 07 20:58:20 laptop fprintd[3094]: Getting authorization to perform Polkit action net.reactivated.fprint.device.verify
Jun 07 20:58:20 laptop fprintd[3094]: Authorization granted to Goodix Fingerprint Sensor 53xc to call method 'Claim' for device :1.52!
Jun 07 20:58:20 laptop fprintd[3094]: user 'henri' claiming the device: 0
Jun 07 20:58:20 laptop fprintd[3094]: 19088285: ../fprint-tod-goodix.c:536
Jun 07 20:58:20 laptop fprintd[3094]: libgxfp_start_session failed
Jun 07 20:58:20 laptop fprintd[3094]: Device reported open completion
Jun 07 20:58:20 laptop fprintd[3094]: Completing action FPI_DEVICE_ACTION_OPEN in idle!
Jun 07 20:58:33 laptop fprintd[3094]: Requesting device 'Goodix Fingerprint Sensor 53xc' authorization for method ListEnrolledFingers from :1.55
Jun 07 20:58:33 laptop fprintd[3094]: Getting authorization to perform Polkit action net.reactivated.fprint.device.setusername
Jun 07 20:58:33 laptop fprintd[3094]: Getting authorization to perform Polkit action net.reactivated.fprint.device.verify
Jun 07 20:58:33 laptop fprintd[3094]: Authorization granted to Goodix Fingerprint Sensor 53xc to call method 'ListEnrolledFingers' for device :1.55!
Jun 07 20:58:33 laptop fprintd[3094]: file_storage_discover_prints() for user 'henri' in '/var/lib/fprint/henri/goodix-tod/0'
Jun 07 20:58:33 laptop fprintd[3094]: Requesting device 'Goodix Fingerprint Sensor 53xc' authorization for method Claim from :1.55
Jun 07 20:58:33 laptop fprintd[3094]: Getting authorization to perform Polkit action net.reactivated.fprint.device.setusername
Jun 07 20:58:33 laptop fprintd[3094]: Getting authorization to perform Polkit action net.reactivated.fprint.device.verify
Jun 07 20:58:33 laptop fprintd[3094]: Authorization granted to Goodix Fingerprint Sensor 53xc to call method 'Claim' for device :1.55!
Jun 07 20:58:33 laptop fprintd[3094]: user 'henri' claiming the device: 0
Jun 07 20:59:03 laptop systemd[1]: fprintd.service: Deactivated successfully.
Jun 07 20:59:03 laptop systemd[1]: fprintd.service: Consumed 1.575s CPU time, no IP traffic.
hmenke commented 2 years ago

Looks like we have to upgrade some versions: https://forum.manjaro.org/t/goodix-fingerprint-sensor-53xc-finally-working-again/110690 I'll wait with that for some days (maybe weeks) until my libusb update (https://github.com/NixOS/nixpkgs/pull/176672) percolated through the channels.

boozedog commented 2 years ago

@hmenke any update on this? It looks like https://github.com/NixOS/nixpkgs/pull/176672 merged 16 days ago but I'm still getting this same failure as above. I'm running nixos-unstable.

hmenke commented 2 years ago

I'm on NixOS 22.05 and the update hasn't arrived there yet. I'll look into it again in the next days.

hmenke commented 2 years ago

The libusb update is scheduled for the next staging iteration on 22.05: https://github.com/NixOS/nixpkgs/pull/179251 Just a few more days.

hmenke commented 2 years ago

PR is open and welcomes your review: https://github.com/NixOS/nixpkgs/pull/180145

In the meanwhile, this works for me on Dell XPS 13 9310.

{
  services.fprintd = let
    libfprint-tod = pkgs.libfprint.overrideAttrs (_: rec {
      pname = "libfprint-tod";
      version = "1.94.3+tod1";
      src = pkgs.fetchFromGitLab {
       domain = "gitlab.freedesktop.org";
       owner = "3v1n0";
       repo = "libfprint";
       rev = "v${version}";
       sha256 = "sha256-rtkZ1q5A8MxaDjrdVCqLUUuA6v1ob07v95/U9wV+ydk=";
     };
    });
  in {
    enable = true;
    package = pkgs.fprintd.override { libfprint = libfprint-tod; };
    tod = {
      enable = true;
      driver = pkgs.libfprint-2-tod1-goodix.override { libfprint-tod = libfprint-tod; };
    };
  };
  systemd.services."fprintd".environment."G_MESSAGES_DEBUG" = "all"; # for good measure
}
boozedog commented 2 years ago

@hmenke I was able to get it installed using your workaround!

But when I try to enroll, as soon as I touch the fingerprint sensor, I get enroll-unknown-error:

dude on xps-nixos in ~ $ sudo fprintd-enroll 
Using device /net/reactivated/Fprint/Device/0
Enrolling right-index-finger finger.
Enroll result: enroll-unknown-error

Here's journalctl -u fprintd:

Jul 05 10:12:22 xps-nixos fprintd[4357]: About to load configuration file '/nix/store/5n7l5i5r770kdvvcn2vy068n0klzb2xm-fprintd-1.94.2/etc/fprintd.conf'
Jul 05 10:12:22 xps-nixos fprintd[4357]: Launching FprintObject
Jul 05 10:12:22 xps-nixos fprintd[4357]: Opening driver /nix/store/rs5vphr1qdig7ijxxlz19ab6wnajclak-libfprint-2-tod1-goodix-0.0.6/lib/libfprint-2/tod-1/libfprint-tod->
Jul 05 10:12:22 xps-nixos fprintd[4357]: Found TOD entry point symbol 0x7fca549d9920, GType is 38144592
Jul 05 10:12:22 xps-nixos fprintd[4357]: Loading driver goodix-tod (Goodix Fingerprint Sensor 53xc)
Jul 05 10:12:22 xps-nixos fprintd[4357]: Initializing features for driver goodix-tod
Jul 05 10:12:22 xps-nixos fprintd[4357]: Preparing devices for resume
Jul 05 10:12:22 xps-nixos fprintd[4357]: No driver found for USB device 1D6B:0003
Jul 05 10:12:22 xps-nixos fprintd[4357]: No driver found for USB device 0C45:672A
Jul 05 10:12:22 xps-nixos fprintd[4357]: No driver found for USB device 8087:0026
Jul 05 10:12:22 xps-nixos fprintd[4357]: No driver found for USB device 1D6B:0002
Jul 05 10:12:22 xps-nixos fprintd[4357]: No driver found for USB device 1D6B:0003
Jul 05 10:12:22 xps-nixos fprintd[4357]: No driver found for USB device 1D6B:0002
Jul 05 10:12:22 xps-nixos fprintd[4357]: Goodix libfpfint-tod driver version 0.0.6
Jul 05 10:12:22 xps-nixos fprintd[4357]: Device reported probe completion
Jul 05 10:12:22 xps-nixos fprintd[4357]: Got delay inhibitor for sleep.
Jul 05 10:12:22 xps-nixos fprintd[4357]: Completing action FPI_DEVICE_ACTION_PROBE in idle!
Jul 05 10:12:22 xps-nixos fprintd[4357]: Updated temperature model after 0.81 seconds, ratio 0.27 -> 0.27, active 0 -> 0, FP_TEMPERATURE_COLD -> FP_TEMPERATURE_COLD
Jul 05 10:12:22 xps-nixos fprintd[4357]: Device Goodix Fingerprint Sensor 53xc scan type changed to 'press'
Jul 05 10:12:22 xps-nixos fprintd[4357]: Device Goodix Fingerprint Sensor 53xc enroll stages changed to 13
Jul 05 10:12:22 xps-nixos fprintd[4357]: Finger present 0
Jul 05 10:12:22 xps-nixos fprintd[4357]: Finger needed 0
Jul 05 10:12:22 xps-nixos fprintd[4357]: entering main loop
Jul 05 10:12:22 xps-nixos systemd[1]: Started Fingerprint Authentication Daemon.
Jul 05 10:12:22 xps-nixos fprintd[4357]: D-Bus service launched with name: net.reactivated.Fprint
Jul 05 10:12:22 xps-nixos fprintd[4357]: Requesting authorization from :1.108 to call method 'Claim' for device 'Goodix Fingerprint Sensor 53xc'
Jul 05 10:12:22 xps-nixos fprintd[4357]: Getting authorization to perform Polkit action net.reactivated.fprint.device.verify
Jul 05 10:12:22 xps-nixos fprintd[4357]: Authorization granted to :1.108 to call method 'Claim' for device 'Goodix Fingerprint Sensor 53xc'!
Jul 05 10:12:22 xps-nixos fprintd[4357]: user 'root' claiming the device: 0
Jul 05 10:12:22 xps-nixos fprintd[4357]: 684020696: ../fprint-tod-goodix.c:536
Jul 05 10:12:23 xps-nixos fprintd[4357]: Device reported open completion
Jul 05 10:12:23 xps-nixos fprintd[4357]: Completing action FPI_DEVICE_ACTION_OPEN in idle!
Jul 05 10:12:23 xps-nixos fprintd[4357]: Updated temperature model after 0.71 seconds, ratio 0.27 -> 0.27, active 0 -> 0, FP_TEMPERATURE_COLD -> FP_TEMPERATURE_COLD
Jul 05 10:12:23 xps-nixos fprintd[4357]: claimed device 0
Jul 05 10:12:23 xps-nixos fprintd[4357]: Requesting authorization from :1.108 to call method 'EnrollStart' for device 'Goodix Fingerprint Sensor 53xc'
Jul 05 10:12:23 xps-nixos fprintd[4357]: Getting authorization to perform Polkit action net.reactivated.fprint.device.enroll
Jul 05 10:12:23 xps-nixos fprintd[4357]: Authorization granted to :1.108 to call method 'EnrollStart' for device 'Goodix Fingerprint Sensor 53xc'!
Jul 05 10:12:23 xps-nixos fprintd[4357]: file_storage_print_data_load(): loaded '/var/lib/fprint/root/goodix-tod/0/7' Unknown error -2
Jul 05 10:12:23 xps-nixos fprintd[4357]: start enrollment device 0 finger 7
Jul 05 10:12:23 xps-nixos fprintd[4357]: file_storage_discover_prints() for user 'goodix' in '/var/lib/fprint/goodix/goodix-tod/0'
Jul 05 10:12:23 xps-nixos fprintd[4357]: scan_dev_storedir(): opendir("/var/lib/fprint/goodix/goodix-tod/0") failed: Error opening directory “/var/lib/fprint/goodix/g>
Jul 05 10:12:23 xps-nixos fprintd[4357]: Failed to clear storage before first enrollment: Device has no storage.
Jul 05 10:12:23 xps-nixos fprintd[4357]: file_storage_discover_prints() for user 'goodix' in '/var/lib/fprint/goodix/goodix-tod/0'
Jul 05 10:12:23 xps-nixos fprintd[4357]: scan_dev_storedir(): opendir("/var/lib/fprint/goodix/goodix-tod/0") failed: Error opening directory “/var/lib/fprint/goodix/g>
Jul 05 10:12:23 xps-nixos fprintd[4357]: Updated temperature model after 0.00 seconds, ratio 0.27 -> 0.27, active 1 -> 1, FP_TEMPERATURE_COLD -> FP_TEMPERATURE_COLD
Jul 05 10:12:23 xps-nixos fprintd[4357]: 684720893: ../fprint-tod-goodix.c:800
Jul 05 10:12:23 xps-nixos fprintd[4357]: [goodix-tod] IDENTIFY_START_NUM_STATES entering state 0
Jul 05 10:12:23 xps-nixos fprintd[4357]: [goodix-tod] IDENTIFY_START_NUM_STATES entering state 1
Jul 05 10:12:23 xps-nixos fprintd[4357]: Updated temperature model after 0.29 seconds, ratio 0.27 -> 0.27, active 1 -> 1, FP_TEMPERATURE_COLD -> FP_TEMPERATURE_WARM
Jul 05 10:12:25 xps-nixos fprintd[4357]: Identify result: 0, index: -1
Jul 05 10:12:25 xps-nixos fprintd[4357]: [goodix-tod] SSM IDENTIFY_START_NUM_STATES failed in state 1 with error: An unspecified error occurred!
Jul 05 10:12:25 xps-nixos fprintd[4357]: [goodix-tod] IDENTIFY_START_NUM_STATES completed with error: An unspecified error occurred!
Jul 05 10:12:25 xps-nixos fprintd[4357]: Identify complete!
Jul 05 10:12:25 xps-nixos fprintd[4357]: Device reported identify completion
Jul 05 10:12:25 xps-nixos fprintd[4357]: Completing action FPI_DEVICE_ACTION_IDENTIFY in idle!
Jul 05 10:12:25 xps-nixos fprintd[4357]: Updated temperature model after 1.23 seconds, ratio 0.27 -> 0.27, active 0 -> 0, FP_TEMPERATURE_WARM -> FP_TEMPERATURE_WARM
Jul 05 10:12:25 xps-nixos fprintd[4357]: Device reported an error during identify for enroll: An unspecified error occurred!
Jul 05 10:12:25 xps-nixos fprintd[4357]: Requesting authorization from :1.108 to call method 'EnrollStop' for device 'Goodix Fingerprint Sensor 53xc'
Jul 05 10:12:25 xps-nixos fprintd[4357]: Authorization granted to :1.108 to call method 'EnrollStop' for device 'Goodix Fingerprint Sensor 53xc'!
Jul 05 10:12:25 xps-nixos fprintd[4357]: Requesting authorization from :1.108 to call method 'Release' for device 'Goodix Fingerprint Sensor 53xc'
Jul 05 10:12:25 xps-nixos fprintd[4357]: Authorization granted to :1.108 to call method 'Release' for device 'Goodix Fingerprint Sensor 53xc'!
Jul 05 10:12:25 xps-nixos fprintd[4357]: 686240943: ../fprint-tod-goodix.c:578
Jul 05 10:12:25 xps-nixos fprintd[4357]: Device reported close completion
Jul 05 10:12:25 xps-nixos fprintd[4357]: Completing action FPI_DEVICE_ACTION_CLOSE in idle!
Jul 05 10:12:25 xps-nixos fprintd[4357]: Updated temperature model after 0.51 seconds, ratio 0.27 -> 0.27, active 0 -> 0, FP_TEMPERATURE_WARM -> FP_TEMPERATURE_WARM
Jul 05 10:12:25 xps-nixos fprintd[4357]: released device 0
hmenke commented 2 years ago

Great...

Device reported an error during identify for enroll: An unspecified error occurred!
hmenke commented 2 years ago

Upstream refuses to fix this: https://gitlab.freedesktop.org/libfprint/libfprint/-/issues/484

The good news is that with the updated libusb1 my previous attempt seems to work again on NixOS 22.05.

{
  services.fprintd = {
    enable = true;
    package = with pkgs; fprintd-tod.overrideAttrs ({ patches ? [], postPatch ? "", ... }: {
      patches = patches ++ [
        (fetchpatch {
          name = "use-more-idiomatic-correct-embedded-shell-scripting";
          url = "https://gitlab.freedesktop.org/libfprint/fprintd/-/commit/f4256533d1ffdc203c3f8c6ee42e8dcde470a93f.patch";
          sha256 = "sha256-4uPrYEgJyXU4zx2V3gwKKLaD6ty0wylSriHlvKvOhek=";
        })
        (fetchpatch {
          name = "remove-pointless-copying-of-files-into-build-directory";
          url = "https://gitlab.freedesktop.org/libfprint/fprintd/-/commit/2c34cef5ef2004d8479475db5523c572eb409a6b.patch";
          sha256 = "sha256-2pZBbMF1xjoDKn/jCAIldbeR2JNEVduXB8bqUrj2Ih4=";
        })
        (fetchpatch {
          name = "build-Do-not-use-positional-arguments-in-i18n.merge_file";
          url = "https://gitlab.freedesktop.org/libfprint/fprintd/-/commit/50943b1bd4f18d103c35233f0446ce7a31d1817e.patch";
          sha256 = "sha256-ANkAq6fr0VRjkS0ckvf/ddVB2mH4b2uJRTI4H8vPPes=";
        })
      ];
      postPatch = ''
        ${postPatch}
        # part of "remove-pointless-copying-of-files-into-build-directory" but git-apply doesn't handle renaming
        mv src/device.xml src/net.reactivated.Fprint.Device.xml
        mv src/manager.xml src/net.reactivated.Fprint.Manager.xml
      '';
    });
    tod = {
      enable = true;
      driver = pkgs.libfprint-2-tod1-goodix;
    };
  };
  systemd.services."fprintd".environment."G_MESSAGES_DEBUG" = "all"; # for good measure
boozedog commented 2 years ago

thanks @hmenke the latest config you shared is working for me!

dainslef commented 2 years ago

I think this issue can be closed with the fix fprintd-tod: fix build #180253 by @hmenke. Thanks a lot, @hmenke.

hmenke commented 2 years ago

Please leave this open until the fix is merged.

hmenke commented 2 years ago

The backport https://github.com/NixOS/nixpkgs/pull/181240 has also been merged. So the fixed derivation is soon going to appear in the channels.

boozedog commented 2 years ago

@hmenke I tried building on unstable and got following error:

error: builder for '/nix/store/jn0snijxhy7d1mqib1m6zpyniycz70fg-fprintd-tod-1.90.9.drv' failed with exit code 1;
       last 10 log lines:
       > WARNING: You should add the boolean check kwarg to the run_command call.
       >          It currently defaults to false,
       >          but it will default to true in future releases of meson.
       >          See also: https://github.com/mesonbuild/meson/issues/9300
       > Configuring config.h using configuration
       > Program bash found: YES (/nix/store/3j18grljsyy4nxc078g00sy4cx6cf16g-bash-5.1-p16/bin/bash)
       >
       > src/meson.build:18:0: ERROR: gnome.gdbus_codegen keyword argument 'sources' was of type array[CustomTarget] but should have been array[str | File]
       >
       > A full log can be found at /build/source/build/meson-logs/meson-log.txt
       For full logs, run 'nix log /nix/store/jn0snijxhy7d1mqib1m6zpyniycz70fg-fprintd-tod-1.90.9.drv'.

Maybe I jumped the gun? I've lost track of which PR I'm supposed to care about. :smile:

qlexqndru commented 4 months ago

Have been trying to make this work with: libfprint-2-tod1-goodix-550a

It is building correctly, no errors, but on enrolling:

~ ❯ sudo fprintd-enroll ⏎ [sudo] password for qlexqndru: Using device /net/reactivated/Fprint/Device/0 Enrolling right-index-finger finger. Enroll result: enroll-unknown-error

I am using the latest 1.94.7

Anyone else in my shoes? Or any ideas?

Any help is appreciated, thank you!

journalctl

Jul 12 13:02:38 0xQ fprintd[23895]: Using cross-namespace EXTERNAL authentication (this will deadlock if server is GDBus < 2.73.3) Jul 12 13:02:38 0xQ fprintd[23895]: About to load configuration file '/nix/store/fwqf97ljyiv2pq6c0ibfchmilbmfzqi7-fprintd-1.94.3/etc/fprintd.conf' Jul 12 13:02:38 0xQ fprintd[23895]: Launching FprintObject Jul 12 13:02:38 0xQ fprintd[23895]: Opening driver /nix/store/clmh3fz32d296pvgcjjkbsmk0njnlqva-libfprint-2-tod1-goodix-550a-0.0.9/lib/libfprint-2/tod-1/libfprint-tod-goodix-550a-0.0.9.so Jul 12 13:02:38 0xQ fprintd[23895]: Found TOD entry point symbol 0x7f580205a630, GType is 927808096 Jul 12 13:02:38 0xQ fprintd[23895]: Loading driver goodix-tod (Goodix Fingerprint Sensor 550A) Jul 12 13:02:38 0xQ fprintd[23895]: Initializing features for driver goodix-tod Jul 12 13:02:38 0xQ fprintd[23895]: Preparing devices for resume Jul 12 13:02:38 0xQ fprintd[23895]: No driver found for USB device 1D6B:0003 Jul 12 13:02:38 0xQ fprintd[23895]: No driver found for USB device 5986:215D Jul 12 13:02:38 0xQ fprintd[23895]: No driver found for USB device 8087:0026 Jul 12 13:02:38 0xQ fprintd[23895]: No driver found for USB device 1D6B:0002 Jul 12 13:02:38 0xQ fprintd[23895]: No driver found for USB device 1D6B:0003 Jul 12 13:02:38 0xQ fprintd[23895]: No driver found for USB device 1D6B:0002 Jul 12 13:02:38 0xQ fprintd[23895]: GFUSB_GM168SEC_APP_15045 Jul 12 13:02:39 0xQ fprintd[23895]: Device reported probe completion Jul 12 13:02:39 0xQ fprintd[23895]: Got delay inhibitor for sleep. Jul 12 13:02:39 0xQ fprintd[23895]: Completing action FPI_DEVICE_ACTION_PROBE in idle! Jul 12 13:02:39 0xQ fprintd[23895]: Updated temperature model after 0.65 seconds, ratio 0.27 -> 0.27, active 0 -> 0, FP_TEMPERATURE_COLD -> FP_TEMPERATURE_COLD Jul 12 13:02:39 0xQ fprintd[23895]: Device Goodix Fingerprint Sensor 550A scan type changed to 'press' Jul 12 13:02:39 0xQ fprintd[23895]: Device Goodix Fingerprint Sensor 550A enroll stages changed to 13 Jul 12 13:02:39 0xQ fprintd[23895]: Finger present 0 Jul 12 13:02:39 0xQ fprintd[23895]: Finger needed 0 Jul 12 13:02:39 0xQ fprintd[23895]: entering main loop Jul 12 13:02:39 0xQ fprintd[23895]: D-Bus service launched with name: net.reactivated.Fprint Jul 12 13:02:39 0xQ systemd[1]: Started Fingerprint Authentication Daemon. Jul 12 13:02:46 0xQ fprintd[23895]: Requesting authorization from :1.183 to call method 'ListEnrolledFingers' for device 'Goodix Fingerprint Sensor 550A' Jul 12 13:02:46 0xQ fprintd[23895]: Getting authorization to perform Polkit action net.reactivated.fprint.device.setusername Jul 12 13:02:46 0xQ fprintd[23895]: Getting authorization to perform Polkit action net.reactivated.fprint.device.verify Jul 12 13:02:46 0xQ fprintd[23895]: Authorization granted to :1.183 to call method 'ListEnrolledFingers' for device 'Goodix Fingerprint Sensor 550A'! Jul 12 13:02:46 0xQ fprintd[23895]: file_storage_discover_prints() for user 'qlexqndru' in '/var/lib/fprint/qlexqndru/goodix-tod/0' Jul 12 13:02:46 0xQ fprintd[23895]: scan_dev_storedir(): opendir("/var/lib/fprint/qlexqndru/goodix-tod/0") failed: Error opening directory “/var/lib/fprint/qlexqndru/goodix-tod/0”: No such> Jul 12 13:02:50 0xQ fprintd[23895]: Requesting authorization from :1.184 to call method 'Claim' for device 'Goodix Fingerprint Sensor 550A' Jul 12 13:02:50 0xQ fprintd[23895]: Getting authorization to perform Polkit action net.reactivated.fprint.device.verify Jul 12 13:02:50 0xQ fprintd[23895]: Authorization granted to :1.184 to call method 'Claim' for device 'Goodix Fingerprint Sensor 550A'! Jul 12 13:02:50 0xQ fprintd[23895]: user 'root' claiming the device: 0 Jul 12 13:02:50 0xQ fprintd[23895]: GFUSB_GM168SEC_APP_15045 Jul 12 13:02:50 0xQ fprintd[23895]: Device reported open completion Jul 12 13:02:50 0xQ fprintd[23895]: Completing action FPI_DEVICE_ACTION_OPEN in idle! Jul 12 13:02:50 0xQ fprintd[23895]: Updated temperature model after 11.51 seconds, ratio 0.27 -> 0.26, active 0 -> 0, FP_TEMPERATURE_COLD -> FP_TEMPERATURE_COLD Jul 12 13:02:50 0xQ fprintd[23895]: claimed device 0 Jul 12 13:02:50 0xQ fprintd[23895]: Requesting authorization from :1.184 to call method 'EnrollStart' for device 'Goodix Fingerprint Sensor 550A' Jul 12 13:02:50 0xQ fprintd[23895]: Getting authorization to perform Polkit action net.reactivated.fprint.device.enroll Jul 12 13:02:50 0xQ fprintd[23895]: Authorization granted to :1.184 to call method 'EnrollStart' for device 'Goodix Fingerprint Sensor 550A'! Jul 12 13:02:50 0xQ fprintd[23895]: file_storage_print_data_load(): loaded '/var/lib/fprint/root/goodix-tod/0/7' Unknown error -2 Jul 12 13:02:50 0xQ fprintd[23895]: start enrollment device 0 finger 7 Jul 12 13:02:50 0xQ fprintd[23895]: file_storage_discover_prints() for user 'goodix' in '/var/lib/fprint/goodix/goodix-tod/0' Jul 12 13:02:50 0xQ fprintd[23895]: scan_dev_storedir(): opendir("/var/lib/fprint/goodix/goodix-tod/0") failed: Error opening directory “/var/lib/fprint/goodix/goodix-tod/0”: No such file > Jul 12 13:02:50 0xQ fprintd[23895]: Updated temperature model after 0.00 seconds, ratio 0.26 -> 0.26, active 1 -> 1, FP_TEMPERATURE_COLD -> FP_TEMPERATURE_COLD Jul 12 13:02:50 0xQ fprintd[23895]: [goodix-tod] IDENTIFY_START_NUM_STATES entering state 0 Jul 12 13:02:50 0xQ fprintd[23895]: [goodix-tod] IDENTIFY_START_NUM_STATES entering state 1 Jul 12 13:02:51 0xQ fprintd[23895]: Identify result: 0, index: -1 Jul 12 13:02:51 0xQ fprintd[23895]: [goodix-tod] SSM IDENTIFY_START_NUM_STATES failed in state 1 with error: An unspecified error occurred! Jul 12 13:02:51 0xQ fprintd[23895]: [goodix-tod] IDENTIFY_START_NUM_STATES completed with error: An unspecified error occurred! Jul 12 13:02:51 0xQ fprintd[23895]: Device reported identify completion Jul 12 13:02:51 0xQ fprintd[23895]: Completing action FPI_DEVICE_ACTION_IDENTIFY in idle! Jul 12 13:02:51 0xQ fprintd[23895]: Updated temperature model after 1.16 seconds, ratio 0.26 -> 0.27, active 0 -> 0, FP_TEMPERATURE_COLD -> FP_TEMPERATURE_COLD Jul 12 13:02:51 0xQ fprintd[23895]: Device reported an error during identify for enroll: An unspecified error occurred! Jul 12 13:02:51 0xQ fprintd[23895]: Requesting authorization from :1.184 to call method 'EnrollStop' for device 'Goodix Fingerprint Sensor 550A' Jul 12 13:02:51 0xQ fprintd[23895]: Authorization granted to :1.184 to call method 'EnrollStop' for device 'Goodix Fingerprint Sensor 550A'! Jul 12 13:02:51 0xQ fprintd[23895]: Requesting authorization from :1.184 to call method 'Release' for device 'Goodix Fingerprint Sensor 550A' Jul 12 13:02:51 0xQ fprintd[23895]: Authorization granted to :1.184 to call method 'Release' for device 'Goodix Fingerprint Sensor 550A'! Jul 12 13:02:52 0xQ fprintd[23895]: Device reported close completion Jul 12 13:02:52 0xQ fprintd[23895]: Completing action FPI_DEVICE_ACTION_CLOSE in idle! Jul 12 13:02:52 0xQ fprintd[23895]: Updated temperature model after 0.51 seconds, ratio 0.27 -> 0.27, active 0 -> 0, FP_TEMPERATURE_COLD -> FP_TEMPERATURE_COLD Jul 12 13:02:52 0xQ fprintd[23895]: released device 0