jlam55555/veikk-linux-driver

"make" does not work despite linux headers installed

Closed this issue · 9 comments

Hello. I have a problem during the "make" process.

Here is the output:

paolo@ThinkPad:~/Software/veikk-linux-driver-master$ make
make -C /lib/modules/4.15.0-91-lowlatency/build M=/home/paolo/Software/veikk-linux-driver-master modules
make[1]: Entering directory '/usr/src/linux-headers-4.15.0-91-lowlatency'
  CC [M]  /home/paolo/Software/veikk-linux-driver-master/veikk_drv.o
In file included from ./include/linux/input.h:22:0,
                 from ./include/linux/hid.h:35,
                 from /home/paolo/Software/veikk-linux-driver-master/veikk.h:10,
                 from /home/paolo/Software/veikk-linux-driver-master/veikk_drv.c:5:
/home/paolo/Software/veikk-linux-driver-master/veikk_drv.c: In function 'veikk_report':
/home/paolo/Software/veikk-linux-driver-master/veikk_drv.c:93:46: error: 'struct hid_report' has no member named 'application'
              report->id, report->type, report->application, report->maxfield,
                                              ^
./include/linux/device.h:1420:58: note: in definition of macro 'dev_info'
 #define dev_info(dev, fmt, arg...) _dev_info(dev, fmt, ##arg)
                                                          ^~~
/home/paolo/Software/veikk-linux-driver-master/veikk_drv.c:92:5: note: in expansion of macro 'hid_info'
     hid_info(hdev, "parsing report: %d %d %d %d %d\n",
     ^~~~~~~~
scripts/Makefile.build:330: recipe for target '/home/paolo/Software/veikk-linux-driver-master/veikk_drv.o' failed
make[2]: *** [/home/paolo/Software/veikk-linux-driver-master/veikk_drv.o] Error 1
Makefile:1577: recipe for target '_module_/home/paolo/Software/veikk-linux-driver-master' failed
make[1]: *** [_module_/home/paolo/Software/veikk-linux-driver-master] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-4.15.0-91-lowlatency'
Makefile:8: recipe for target 'all' failed
make: *** [all] Error 2

What is exactly the problem?

My kernel is lowlatency, the very same happens if I use the generic one. The linux headers of the latest version are installed.

encountered exactly the same errors on ubuntu 16.04 with headers-4.15.0-91-generic:

veikk_drv.c: In function ‘veikk_report’:
veikk_drv.c:93:46: error: ‘struct hid_report’ has no member named ‘application’
make[1]: Leaving directory '/usr/src/linux-headers-4.15.0-91-generic'

i did everything in the guide: "How to resolve the “/lib/modules/3.13.0-27-generic/build: No such file or directory” error message?"

but still getting output

len-Aspire-E5-471G:~/Downloads/veikk-linux-driver-master$ make make -C /lib/modules/5.3.0-42-generic/build M=/home/len/Downloads/veikk-linux-driver-master modules make[1]: Entering directory '/usr/src/linux-headers-5.3.0-42-generic' Building modules, stage 2. MODPOST 1 modules ERROR: "__divdi3" [/home/len/Downloads/veikk-linux-driver-master/veikk.ko] undefined! scripts/Makefile.modpost:92: recipe for target '__modpost' failed make[2]: *** [__modpost] Error 1 Makefile:1658: recipe for target 'modules' failed make[1]: *** [modules] Error 2 make[1]: Leaving directory '/usr/src/linux-headers-5.3.0-42-generic' Makefile:8: recipe for target 'all' failed make: *** [all] Error 2

what might be the issue?

Same: Linux Mint 19.1 (4.15.0-20-generic)

I had the same error, but I solved it with the following method.(ZorinOS 15.2)
sudo apt install gcc
make
sudo depmod
sudo modprobe veikk
sudo make all install clean

Sorry for the delayed response, school is very busy. See if this commit helps: 2bb2a1e

I was testing how much information the tablet provides in the veikk_report function, and in my haste didn't get to test much with it. I believe report->application may have been added on a later kernel version. For now, it should be safe to comment this out (as I've done in commit above) -- it is not essential to the driver.

Hi, thank you for the update.
It still doesn't work unfortunately. This time "make" works, but the install process does not. Here's the output:

paolo@ThinkPad:~/Software/veikk-linux-driver-master$ sudo make all install clean
make -C /lib/modules/4.15.0-99-lowlatency/build M=/home/paolo/Software/veikk-linux-driver-master modules
make[1]: Entering directory '/usr/src/linux-headers-4.15.0-99-lowlatency'
  Building modules, stage 2.
  MODPOST 1 modules
make[1]: Leaving directory '/usr/src/linux-headers-4.15.0-99-lowlatency'
make -C /lib/modules/4.15.0-99-lowlatency/build M=/home/paolo/Software/veikk-linux-driver-master modules_install
make[1]: Entering directory '/usr/src/linux-headers-4.15.0-99-lowlatency'
  INSTALL /home/paolo/Software/veikk-linux-driver-master/veikk.ko
At main.c:160:
- SSL error:02001002:system library:fopen:No such file or directory: ../crypto/bio/bss_file.c:72
- SSL error:2006D080:BIO routines:BIO_new_file:no such file: ../crypto/bio/bss_file.c:79
sign-file: certs/signing_key.pem: No such file or directory
  DEPMOD  4.15.0-99-lowlatency
make[1]: Leaving directory '/usr/src/linux-headers-4.15.0-99-lowlatency'
mkdir -p /etc/modules-load.d
modprobe veikk
modprobe: FATAL: Module veikk not found in directory /lib/modules/4.15.0-99-lowlatency
Makefile:14: recipe for target 'install' failed
make: *** [install] Error 1

@paoloperrone Look at Nicole's solution here #27. It looks like depmod is not automatically called in the make install recipe. If that works, I'll close this issue (but I still have to resolve that issue)

I see. Now it works, thanks!

Closing now, as it appears the issue is fixed with the new commit. @ykzhou @shrimpwagon @sshwishh feel free to reopen if you still face the same issue.