05-15-2024 02:54 AM
I'm trying to install NI drivers for linux (specifically the ni-daqmx package) but it fails. Running `dkms autoinstall` leads me to the following logfile for the nikal driver:
DKMS make.log for nikal-24.3.0f91 for kernel 5.15.0-106-generic (x86_64) Wed May 15 07:42:55 AM UTC 2024 Using kernel headers found in: /lib/modules/5.15.0-106-generic/build If this location is not correct, then set the KERNELHEADERS environment variable to the location of the kernel headers. Verifying that KERNELHEADERS has a valid kernel source path: Passed. Using kernel configuration files found in: /lib/modules/5.15.0-106-generic/build If this location is not correct, then set the KERNELVER environment variable to the name of an installed kernel, or set KERNELDIR to the location of the kernel configuration files. Verifying that KERNELDIR has a valid kernel config path: Passed. Testing kernel capabilities and interfaces: Kernel timer_list has data member: no Kernel has vm_fault_t: yes Kernel timekeeping functions will use timespec64 Kernel proc_create_data accepts const struct proc_ops Kernel has mmap_lock(): yes Kernel has pde_data(): no rs485_config has struct ktermios argument: no struct uart_port has rs485_supported: no set_termios has const struct ktermios argument: no acpi_op_remove returns int: yes Kernel has const vm_flags: no get_user_pages has struct vm_area_struct argument: yes uart_remove_one_port returns int: yes Kernel has support for register_sysctl_sz: no Kernel has RS-485 txvr_ops: no Writing detected kernel capabilities to Kbuild If the values stored are incorrect they can be changed before running make. Making nikal.ko CC [M] /var/lib/dkms/nikal/24.3.0f91/build/nikal.o MODPOST /var/lib/dkms/nikal/24.3.0f91/build/Module.symvers ERROR: modpost: GPL-incompatible module nikal.ko uses GPL-only symbol 'rcu_read_unlock_strict' make[2]: *** [scripts/Makefile.modpost:133: /var/lib/dkms/nikal/24.3.0f91/build/Module.symvers] Error 1 make[2]: *** Deleting file '/var/lib/dkms/nikal/24.3.0f91/build/Module.symvers' make[1]: *** [Makefile:1830: modules] Error 2 make: *** [Makefile:92: nikal.ko] Error 2
Apparently, the driver uses a GPL-only symbol.
I've tried installing driver versions 2022Q4, 2023Q4, and 2024Q1 with the same results (using the deb packages for ubuntu 22.04). I'm running Ubuntu 22.04.4 LTS with kernel version 5.15.106 (I've also tried with kernel 5.15.107).
The issue initially appeared after performing a regular `apt upgrade`. I've tried removing the drivers and reinstalling multiple times with the same end result shown in the log-file above.
I've found related issues (https://forums.ni.com/t5/Instrument-Control-GPIB-Serial/GPL-incompatible-module-nikal-ko/td-p/321873... and https://forums.ni.com/t5/Instrument-Control-GPIB-Serial/ERROR-GPL-incompatible-module-nikal-ko-uses-...) but they (1) both use OpenSuSe and not Ubuntu, (2) are very old, and (3) don't solve the issue.
So I really hope someone can help with this problem. Any help is very much appreciated.
Solved! Go to Solution.
05-15-2024 09:50 PM
I had exactly the same problem and our solution was to downgrade kernel to last known which known to be working - 5.15.0-105. It involved a bit of banging my head against a brick wall, but ultimately it worked (I am sure it will be easier for other people):
0) Assuming we are booted under 107 kernel
1) Install older kernel
sudo apt install linux-image-5.15.0-105-generic
2) Install older kernel additional drivers (without this step I lost network due to missing Ethernet/WiFi drivers)
sudo apt install linux-modules-extra-5.15.0-105-generic
3) (Optional) Edit grub to allow to auto boot into 105 kernel since our machine was remote and I couldn't control boot process.
4) Boot into 105
5) Remove ni-daqmx
6) Remove all traces of 107 kernel, including packages which are "symlinking" it, like linux-image-generic. Without this step, installing ni-daqmx was still picking up on 107 kernel and dpkg was giving errors. At some point I was calling next commands until I couldn't see any dpkg issues:
sudo apt-get remove --auto-remove linux-image-5.15.0-107-generic linux-image-generic linux-generic
sudo apt autoremove
sudo apt autoclean
sudo apt --fix-broken install
7) Install ni-daqmx and reboot
😎 Make sure to disable unattended kernel update (assuming you're booted under 5.15.0-105-generic)
sudo apt-mark hold $(uname -r)
05-16-2024 03:40 AM
Thank you so much! It worked perfectly.
I must give you credit for the very well written step-by-step guide. I had considered having to downgrade the kernel but didn't know how to do this. I also very much appreciate the step for disabling the automatic kernel update - hopefully this means that the error will not happen again.
06-03-2024 09:49 AM
We have been bashing our heads against the walls for 2 weeks wondering what the problem was and all it was was the 107 kernel. This works perfectly, thank you so much!
07-29-2024 11:08 AM
I can be useful to reinstall/downgrade linux-headers-* too, in case system boots to 5.15.0-105 kernel, but ni-daqmx still refuses to work.
Does anybody know will it be fixed in 2024Q3 drivers?
Or is it much more difficult problem for NI to get rid of GPL dependencies?