berarma / new-lg4ff

Experimental Logitech force feedback module for Linux
GNU General Public License v2.0
299 stars 18 forks source link

Manual compiling issue #24

Closed schabrackes closed 4 years ago

schabrackes commented 4 years ago

Sorry but maybe I'm just too stupid, I get an error when compiling the code:

micha@gamertux ~/Desktop/new-lg4ff-0.3 $ LC_MESSAGES=C make
make -C /lib/modules/`uname -r`/build M=$PWD
make[1]: Entering directory '/usr/src/linux-4.19.97-gentoo'
  CC [M]  /home/micha/Desktop/new-lg4ff-0.3/hid-lgff.o
/home/micha/Desktop/new-lg4ff-0.3/hid-lgff.c:116:5: error: redefinition of ‘lgff_init’
  116 | int lgff_init(struct hid_device* hid)
      |     ^~~~~~~~~
In file included from /home/micha/Desktop/new-lg4ff-0.3/hid-lgff.c:23:
/home/micha/Desktop/new-lg4ff-0.3/hid-lg.h:13:19: note: previous definition of ‘lgff_init’ was here
   13 | static inline int lgff_init(struct hid_device *hdev) { return -1; }
      |                   ^~~~~~~~~
make[2]: *** [scripts/Makefile.build:304: /home/micha/Desktop/new-lg4ff-0.3/hid-lgff.o] Error 1
make[1]: *** [Makefile:1522: _module_/home/micha/Desktop/new-lg4ff-0.3] Error 2
make[1]: Leaving directory '/usr/src/linux-4.19.97-gentoo'
make: *** [Makefile:5: default] Error 2

I tried to compile it with 5.4 kernel sources but got the same result. Not sure what I'm doing wrong here. I've no experience in compiling code manually. Thanks!

berarma commented 4 years ago

It seems you have a kernel configuration that disables some parts of the hid-logitech driver. new-lg4ff wasn't handling this case well. I've uploaded a fix. Please, can you try with the latest code in the master branch?

schabrackes commented 4 years ago

It seems you have a kernel configuration that disables some parts of the hid-logitech driver. new-lg4ff wasn't handling this case well. I've uploaded a fix. Please, can you try with the latest code in the master branch?

It's working now! Thanks! I tested ETS2 and Dirt Rally so far - feeling great!

berarma commented 4 years ago

Thanks for the confirmation.

berarma commented 4 years ago

Please open a new issue and explain the steps you took to build.