nmikhailov / Validity90

Reverse engineering of Validity/Synaptics 138a:0090, 138a:0094, 138a:0097, 06cb:0081, 06cb:009a fingerprint readers protocol
GNU Lesser General Public License v2.1
1.85k stars 113 forks source link

> > > Just to be clear since this is a very long thread. Compile and install instructions should be followed from [SynaTudor repo Readme](https://github.com/Popax21/synaTudor)? #111

Closed pfuhlert closed 1 year ago

pfuhlert commented 1 year ago
          > > > Just to be clear since this is a very long thread. Compile and install instructions should be followed from [SynaTudor repo Readme](https://github.com/Popax21/synaTudor)?

That's correct

I can confirm after I installed all necessary dependencies for Ubuntu, everything worked as expected on Lenovo IdeaPad C340. Great job!

Hi and thanks to all contributors for their work. Your comment motivated me to try this on my Lenovo L490 running Ubuntu 22.10 but without luck.

I (re)installed all dependencies from the mentioned link: sudo apt-get install meson pkg-config cmake ninja-build net-tools libcurl4-openssl-dev libssl-dev libusb-1.0-0-dev libcap-dev libseccomp-dev libglib2.0-dev libdbus-glib-1-dev libfprint-2-tod-dev libjson-glib-dev

meson build then returns

The Meson build system
Version: 0.59.1
Source dir: [...]/synaTudor
Build dir: [...]/synaTudor/build
Build type: native build
Project name: synaTudor
Project version: 1.0.0
C compiler for the host machine: cc (gcc 12.2.0 "cc (Ubuntu 12.2.0-3ubuntu1) 12.2.0")
C linker for the host machine: cc ld.bfd 2.39
Host machine cpu family: x86_64
Host machine cpu: x86_64
Program bash found: YES (/usr/bin/bash)
Program ld found: YES (/usr/bin/ld)
Run-time dependency threads found: YES
Found pkg-config: /usr/bin/pkg-config (0.29.2)
Run-time dependency libcrypto found: YES 3.0.5
Run-time dependency libusb-1.0 found: YES 1.0.26
Dependency threads found: YES unknown (cached)
Dependency libcrypto found: YES 3.0.5 (cached)
Dependency libusb-1.0 found: YES 1.0.26 (cached)
Dependency threads found: YES unknown (cached)
Dependency libcrypto found: YES 3.0.5 (cached)
Dependency libusb-1.0 found: YES 1.0.26 (cached)
Run-time dependency libcap found: YES 2.44
Run-time dependency libseccomp found: YES 2.5.4
Run-time dependency gio-2.0 found: YES 2.74.3
Run-time dependency gio-unix-2.0 found: YES 2.74.3
Run-time dependency dbus-1 found: YES 1.14.0
Configuring net.reactivated.TudorHostLauncher.service using configuration
Run-time dependency libfprint-2-tod-1 found: YES 1.94.5+tod1+tod1
Run-time dependency udev found: YES 251
Dependency libusb-1.0 found: YES 1.0.26 (cached)
Run-time dependency gusb found: YES 0.3.10
Run-time dependency json-glib-1.0 found: YES 1.6.6
Build targets in project: 6

Found ninja-1.11.0 at /usr/bin/ninja
Generating targets:   0%|                                                     | 0/6 [00:00<?, ?it/s]WARNING: custom_target 'driver-download' has more than one output! Using the first one.
WARNING: custom_target 'driver-download' has more than one output! Using the first one.

but get this error on running ninja in the build dir:

➜  build git:(relink) ninja
[1/12] Compiling C object libfprint-tod/libtudor_tod.so.p/src_suspend.c.o
FAILED: libfprint-tod/libtudor_tod.so.p/src_suspend.c.o 
cc -Ilibfprint-tod/libtudor_tod.so.p -Ilibfprint-tod -I../libfprint-tod -I../libtudor/inc -I../tudor-host/inc -I../tudor-host-launcher/inc -I/usr/local/include/libfprint-2 -I/usr/include/libfprint-2/tod-1 -I/usr/include/gio-unix-2.0 -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/libusb-1.0 -I/usr/include/gusb-1 -I/usr/include/json-glib-1.0 -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -g -fPIC -pthread -D_GNU_SOURCE -Wno-missing-braces -MD -MQ libfprint-tod/libtudor_tod.so.p/src_suspend.c.o -MF libfprint-tod/libtudor_tod.so.p/src_suspend.c.o.d -o libfprint-tod/libtudor_tod.so.p/src_suspend.c.o -c ../libfprint-tod/src/suspend.c
In file included from /usr/include/libfprint-2/tod-1/drivers_api.h:26,
                 from ../libfprint-tod/src/device.h:5,
                 from ../libfprint-tod/src/suspend.h:4,
                 from ../libfprint-tod/src/suspend.c:2:
/usr/include/libfprint-2/tod-1/fpi-device.h:183:3: error: unknown type name ‘FpDeviceFeature’
  183 |   FpDeviceFeature features;
      |   ^~~~~~~~~~~~~~~
In file included from /usr/include/libfprint-2/tod-1/fpi-assembling.h:23,
                 from /usr/include/libfprint-2/tod-1/drivers_api.h:25:
/usr/include/libfprint-2/tod-1/fpi-device.h:196:33: error: ‘FpDeviceFeature’ undeclared here (not in a function); did you mean ‘FpDeviceRetry’?
  196 |                         sizeof (FpDeviceFeature) +
      |                                 ^~~~~~~~~~~~~~~
/usr/include/libfprint-2/tod-1/tod/tod-macros.h:23:68: note: in definition of macro ‘TOD_PADDING’
   23 |   char _tod_expansion_padding[(GLIB_SIZEOF_VOID_P * (original)) - (wasted)];
      |                                                                    ^~~~~~
/usr/include/libfprint-2/tod-1/fpi-device.h:195:3: note: in expansion of macro ‘TOD_PADDING_ALIGNED8’
  195 |   TOD_PADDING_ALIGNED8 (32,
      |   ^~~~~~~~~~~~~~~~~~~~
/usr/include/libfprint-2/tod-1/fpi-device.h:293:34: error: expected declaration specifiers or ‘...’ before ‘FpDeviceFeature’
  293 |                                  FpDeviceFeature update,
      |                                  ^~~~~~~~~~~~~~~
/usr/include/libfprint-2/tod-1/fpi-device.h:294:34: error: expected declaration specifiers or ‘...’ before ‘FpDeviceFeature’
  294 |                                  FpDeviceFeature value);
      |                                  ^~~~~~~~~~~~~~~
[2/12] Compiling C object libfprint-tod/libtudor_tod.so.p/src_verify.c.o
FAILED: libfprint-tod/libtudor_tod.so.p/src_verify.c.o 

[...]

Any idea what goes wrong here?

Originally posted by @pfuhlert in https://github.com/nmikhailov/Validity90/issues/73#issuecomment-1418188938