robbi5/magictrackpad2-dkms

Anyone got this working on fedora?

LeoUfimtsev opened this issue · 1 comments

Hello,

I'm on fedora 28. I can't get this to work.

It fisrt complains about missing fpm. I install fpm via gem:
sudo gem install fpm

Then make complains about other stuff and lists a '.deb' at the end:

make
test -d build || mkdir build
fpm -f -s dir -t deb -n magictrackpad2-dkms -v 1.0.0 -a all -p build/
-d dkms -d build-essential -d linux-headers-generic
-m "robbi5 robbi5@robbi5.de" --vendor robbi5 --license GPLv2 --description "Patched BCM-5974 and hid-apple modules from kernel 4.4 for including Magic Trackpad 2 support."
--url "https://github.com/robbi5/magictrackpad2-dkms" --deb-changelog CHANGELOG
--post-install scripts/post-install.sh --pre-uninstall scripts/pre-uninstall.sh
--exclude '.git*' usr/
Ignoring ffi-1.9.14 because its extensions are not built. Try: gem pristine ffi --version 1.9.14
Ignoring nokogiri-1.6.8 because its extensions are not built. Try: gem pristine nokogiri --version 1.6.8
{:timestamp=>"2018-06-08T08:18:07.755109-0400", :message=>"Debian packaging tools generally labels all files in /etc as config files, as mandated by policy, so fpm defaults to this behavior for deb packages. You can disable this default behavior with --deb-no-default-config-files flag", :level=>:warn}
{:timestamp=>"2018-06-08T08:18:07.803840-0400", :message=>"Created package", :path=>"build/magictrackpad2-dkms_1.0.0_all.deb"}

I'm stuck. any advise?

tkofh commented

Also having troubles on Fedora. Running the post-install.sh script gives the following output:

Kernel preparation unnecessary for this kernel.  Skipping...

Building module:
cleaning build area...
make -j8 KERNELRELEASE=4.16.13-300.fc28.x86_64 -C /lib/modules/4.16.13-300.fc28.x86_64/build SUBDIRS=/var/lib/dkms/hid/4.4+magictrackpad2/build modules...(bad exit status: 2)
Error! Bad return status for module build on kernel: 4.16.13-300.fc28.x86_64 (x86_64)
Consult /var/lib/dkms/hid/4.4+magictrackpad2/build/make.log for more information.

The output of the /var/lib/dkms/hid/4.4+magictrackpad2/build/make.log file is this:

DKMS make.log for hid-4.4+magictrackpad2 for kernel 4.16.13-300.fc28.x86_64 (x86_64)
Sun Jun 10 09:27:41 EDT 2018
make: Entering directory '/usr/src/kernels/4.16.13-300.fc28.x86_64'
  CC [M]  /var/lib/dkms/hid/4.4+magictrackpad2/build/hid-apple.o
  CC [M]  /var/lib/dkms/hid/4.4+magictrackpad2/build/hid-core.o
  CC [M]  /var/lib/dkms/hid/4.4+magictrackpad2/build/hid-input.o
  CC [M]  /var/lib/dkms/hid/4.4+magictrackpad2/build/hid-debug.o
  CC [M]  /var/lib/dkms/hid/4.4+magictrackpad2/build/hidraw.o
/var/lib/dkms/hid/4.4+magictrackpad2/build/hid-debug.c: In function ‘hid_debug_events_read’:
/var/lib/dkms/hid/4.4+magictrackpad2/build/hid-debug.c:1124:9: error: implicit declaration of function ‘signal_pending’; did you mean ‘timer_pending’? [-Werror=implicit-function-declaration]
     if (signal_pending(current)) {
         ^~~~~~~~~~~~~~
         timer_pending
/var/lib/dkms/hid/4.4+magictrackpad2/build/hid-core.c:1425:5: error: conflicting types for ‘hid_report_raw_event’
 int hid_report_raw_event(struct hid_device *hid, int type, u8 *data, int size,
     ^~~~~~~~~~~~~~~~~~~~
In file included from /var/lib/dkms/hid/4.4+magictrackpad2/build/hid-core.c:34:
./include/linux/hid.h:1118:5: note: previous declaration of ‘hid_report_raw_event’ was here
 int hid_report_raw_event(struct hid_device *hid, int type, u8 *data, u32 size,
     ^~~~~~~~~~~~~~~~~~~~
In file included from ./include/linux/linkage.h:7,
                 from ./include/linux/kernel.h:7,
                 from ./include/linux/list.h:9,
                 from ./include/linux/module.h:9,
                 from /var/lib/dkms/hid/4.4+magictrackpad2/build/hid-core.c:19:
/var/lib/dkms/hid/4.4+magictrackpad2/build/hid-core.c:1477:19: error: conflicting types for ‘hid_report_raw_event’
 EXPORT_SYMBOL_GPL(hid_report_raw_event);
                   ^~~~~~~~~~~~~~~~~~~~
./include/linux/export.h:65:21: note: in definition of macro ‘___EXPORT_SYMBOL’
  extern typeof(sym) sym;      \
                     ^~~
/var/lib/dkms/hid/4.4+magictrackpad2/build/hid-core.c:1477:1: note: in expansion of macro ‘EXPORT_SYMBOL_GPL’
 EXPORT_SYMBOL_GPL(hid_report_raw_event);
 ^~~~~~~~~~~~~~~~~
In file included from /var/lib/dkms/hid/4.4+magictrackpad2/build/hid-core.c:34:
./include/linux/hid.h:1118:5: note: previous declaration of ‘hid_report_raw_event’ was here
 int hid_report_raw_event(struct hid_device *hid, int type, u8 *data, u32 size,
     ^~~~~~~~~~~~~~~~~~~~
/var/lib/dkms/hid/4.4+magictrackpad2/build/hid-core.c:1490:5: error: conflicting types for ‘hid_input_report’
 int hid_input_report(struct hid_device *hid, int type, u8 *data, int size, int interrupt)
     ^~~~~~~~~~~~~~~~
In file included from /var/lib/dkms/hid/4.4+magictrackpad2/build/hid-core.c:34:
./include/linux/hid.h:861:5: note: previous declaration of ‘hid_input_report’ was here
 int hid_input_report(struct hid_device *, int type, u8 *, u32, int);
     ^~~~~~~~~~~~~~~~
In file included from ./include/linux/linkage.h:7,
                 from ./include/linux/kernel.h:7,
                 from ./include/linux/list.h:9,
                 from ./include/linux/module.h:9,
                 from /var/lib/dkms/hid/4.4+magictrackpad2/build/hid-core.c:19:
/var/lib/dkms/hid/4.4+magictrackpad2/build/hid-core.c:1539:19: error: conflicting types for ‘hid_input_report’
 EXPORT_SYMBOL_GPL(hid_input_report);
                   ^~~~~~~~~~~~~~~~
./include/linux/export.h:65:21: note: in definition of macro ‘___EXPORT_SYMBOL’
  extern typeof(sym) sym;      \
                     ^~~
/var/lib/dkms/hid/4.4+magictrackpad2/build/hid-core.c:1539:1: note: in expansion of macro ‘EXPORT_SYMBOL_GPL’
 EXPORT_SYMBOL_GPL(hid_input_report);
 ^~~~~~~~~~~~~~~~~
In file included from /var/lib/dkms/hid/4.4+magictrackpad2/build/hid-core.c:34:
./include/linux/hid.h:861:5: note: previous declaration of ‘hid_input_report’ was here
 int hid_input_report(struct hid_device *, int type, u8 *, u32, int);
     ^~~~~~~~~~~~~~~~
/var/lib/dkms/hid/4.4+magictrackpad2/build/hid-core.c:1541:13: error: conflicting types for ‘hid_match_one_id’
 static bool hid_match_one_id(struct hid_device *hdev,
             ^~~~~~~~~~~~~~~~
In file included from /var/lib/dkms/hid/4.4+magictrackpad2/build/hid-core.c:34:
./include/linux/hid.h:880:6: note: previous declaration of ‘hid_match_one_id’ was here
 bool hid_match_one_id(const struct hid_device *hdev,
      ^~~~~~~~~~~~~~~~
/var/lib/dkms/hid/4.4+magictrackpad2/build/hid-core.c:1550:29: error: conflicting types for ‘hid_match_id’
 const struct hid_device_id *hid_match_id(struct hid_device *hdev,
                             ^~~~~~~~~~~~
In file included from /var/lib/dkms/hid/4.4+magictrackpad2/build/hid-core.c:34:
./include/linux/hid.h:882:29: note: previous declaration of ‘hid_match_id’ was here
 const struct hid_device_id *hid_match_id(const struct hid_device *hdev,
                             ^~~~~~~~~~~~
/var/lib/dkms/hid/4.4+magictrackpad2/build/hid-core.c: In function ‘hid_connect’:
/var/lib/dkms/hid/4.4+magictrackpad2/build/hid-core.c:1662:11: error: ‘struct hid_device’ has no member named ‘minor’; did you mean ‘vendor’?
     hdev->minor);
           ^~~~~
           vendor
/var/lib/dkms/hid/4.4+magictrackpad2/build/hid-core.c: At top level:
/var/lib/dkms/hid/4.4+magictrackpad2/build/hid-core.c:2114:27: error: expected ‘)’ before numeric constant
 static DRIVER_ATTR(new_id, S_IWUSR, NULL, store_new_id);
                           ^
                           )
/var/lib/dkms/hid/4.4+magictrackpad2/build/hid-core.c:2128:36: error: static declaration of ‘hid_match_device’ follows non-static declaration
 static const struct hid_device_id *hid_match_device(struct hid_device *hdev,
                                    ^~~~~~~~~~~~~~~~
In file included from /var/lib/dkms/hid/4.4+magictrackpad2/build/hid-core.c:34:
./include/linux/hid.h:884:29: note: previous declaration of ‘hid_match_device’ was here
 const struct hid_device_id *hid_match_device(struct hid_device *hdev,
                             ^~~~~~~~~~~~~~~~
/var/lib/dkms/hid/4.4+magictrackpad2/build/hid-core.c: In function ‘hid_device_probe’:
/var/lib/dkms/hid/4.4+magictrackpad2/build/hid-core.c:2161:32: error: ‘struct hid_device’ has no member named ‘driver_lock’; did you mean ‘driver_data’?
  if (down_interruptible(&hdev->driver_lock))
                                ^~~~~~~~~~~
                                driver_data
/var/lib/dkms/hid/4.4+magictrackpad2/build/hid-core.c:2193:12: error: ‘struct hid_device’ has no member named ‘driver_lock’; did you mean ‘driver_data’?
  up(&hdev->driver_lock);
            ^~~~~~~~~~~
            driver_data
/var/lib/dkms/hid/4.4+magictrackpad2/build/hid-core.c: In function ‘hid_device_remove’:
/var/lib/dkms/hid/4.4+magictrackpad2/build/hid-core.c:2203:32: error: ‘struct hid_device’ has no member named ‘driver_lock’; did you mean ‘driver_data’?
  if (down_interruptible(&hdev->driver_lock))
                                ^~~~~~~~~~~
                                driver_data
/var/lib/dkms/hid/4.4+magictrackpad2/build/hid-core.c:2224:12: error: ‘struct hid_device’ has no member named ‘driver_lock’; did you mean ‘driver_data’?
  up(&hdev->driver_lock);
            ^~~~~~~~~~~
            driver_data
/var/lib/dkms/hid/4.4+magictrackpad2/build/hid-core.c: At top level:
/var/lib/dkms/hid/4.4+magictrackpad2/build/hid-core.c:2271:24: error: static declaration of ‘hid_bus_type’ follows non-static declaration
 static struct bus_type hid_bus_type = {
                        ^~~~~~~~~~~~
In file included from /var/lib/dkms/hid/4.4+magictrackpad2/build/hid-core.c:34:
./include/linux/hid.h:832:24: note: previous declaration of ‘hid_bus_type’ was here
 extern struct bus_type hid_bus_type;
                        ^~~~~~~~~~~~
/var/lib/dkms/hid/4.4+magictrackpad2/build/hid-core.c: In function ‘hid_allocate_device’:
/var/lib/dkms/hid/4.4+magictrackpad2/build/hid-core.c:2677:19: error: ‘struct hid_device’ has no member named ‘driver_lock’; did you mean ‘driver_data’?
  sema_init(&hdev->driver_lock, 1);
                   ^~~~~~~~~~~
                   driver_data
/var/lib/dkms/hid/4.4+magictrackpad2/build/hid-core.c: In function ‘__hid_register_driver’:
/var/lib/dkms/hid/4.4+magictrackpad2/build/hid-core.c:2728:43: error: ‘driver_attr_new_id’ undeclared (first use in this function); did you mean ‘driver_attribute’?
  ret = driver_create_file(&hdrv->driver, &driver_attr_new_id);
                                           ^~~~~~~~~~~~~~~~~~
                                           driver_attribute
/var/lib/dkms/hid/4.4+magictrackpad2/build/hid-core.c:2728:43: note: each undeclared identifier is reported only once for each function it appears in
/var/lib/dkms/hid/4.4+magictrackpad2/build/hid-core.c: In function ‘hid_unregister_driver’:
/var/lib/dkms/hid/4.4+magictrackpad2/build/hid-core.c:2738:37: error: ‘driver_attr_new_id’ undeclared (first use in this function); did you mean ‘driver_attribute’?
  driver_remove_file(&hdrv->driver, &driver_attr_new_id);
                                     ^~~~~~~~~~~~~~~~~~
                                     driver_attribute
At top level:
/var/lib/dkms/hid/4.4+magictrackpad2/build/hid-core.c:2082:16: warning: ‘store_new_id’ defined but not used [-Wunused-function]
 static ssize_t store_new_id(struct device_driver *drv, const char *buf,
                ^~~~~~~~~~~~
make[1]: *** [scripts/Makefile.build:325: /var/lib/dkms/hid/4.4+magictrackpad2/build/hid-core.o] Error 1
make[1]: *** Waiting for unfinished jobs....
/var/lib/dkms/hid/4.4+magictrackpad2/build/hidraw.c: In function ‘hidraw_read’:
/var/lib/dkms/hid/4.4+magictrackpad2/build/hidraw.c:60:9: error: implicit declaration of function ‘signal_pending’; did you mean ‘timer_pending’? [-Werror=implicit-function-declaration]
     if (signal_pending(current)) {
         ^~~~~~~~~~~~~~
         timer_pending
cc1: some warnings being treated as errors
make[1]: *** [scripts/Makefile.build:325: /var/lib/dkms/hid/4.4+magictrackpad2/build/hid-debug.o] Error 1
cc1: some warnings being treated as errors
make[1]: *** [scripts/Makefile.build:325: /var/lib/dkms/hid/4.4+magictrackpad2/build/hidraw.o] Error 1
/var/lib/dkms/hid/4.4+magictrackpad2/build/hid-input.o: warning: objtool: hidinput_setkeycode()+0x5d: sibling call from callable instruction with modified stack frame
/var/lib/dkms/hid/4.4+magictrackpad2/build/hid-input.o: warning: objtool: hidinput_hid_event()+0xdb: sibling call from callable instruction with modified stack frame
/var/lib/dkms/hid/4.4+magictrackpad2/build/hid-input.o: warning: objtool: hidinput_hid_event.cold.11()+0x19: sibling call from callable instruction with modified stack frame
make: *** [Makefile:1565: _module_/var/lib/dkms/hid/4.4+magictrackpad2/build] Error 2
make: Leaving directory '/usr/src/kernels/4.16.13-300.fc28.x86_64'

The implicit error near the top of the file seems to be being discussed over at diederikdehaas/rtl8812AU#75 with no obvious solution.