New kernel and visa stop to work...no knews!
Please could you help me! Thanks
nikal: CC [M] /var/lib/nikal/3.10.0-862.2.3.el7.x86_64/nikal/nikal.o
nikal: /var/lib/nikal/3.10.0-862.2.3.el7.x86_64/nikal/nikal.c:2043:10: error: ‘GENL_ID_GENERATE’ undeclared here (not in a function)
nikal: .id = GENL_ID_GENERATE,
nikal: /var/lib/nikal/3.10.0-862.2.3.el7.x86_64/nikal/nikal.c: In function ‘nNIKAL100_initDriver’:
nikal: /var/lib/nikal/3.10.0-862.2.3.el7.x86_64/nikal/nikal.c:2083:4: error: implicit declaration of function ‘genl_register_family_with_ops’ [-Werror=implicit-function-declaration]
nikal: if ((status = genl_register_family_with_ops(&nikal_netlink_family, nikal_netlink_ops, 1))) return status;
nikal: cc1: some warnings being treated as errors
nikal: make: *** [/var/lib/nikal/3.10.0-862.2.3.el7.x86_64/nikal/nikal.o] Error 1
nikal: make: *** [_module_/var/lib/nikal/3.10.0-862.2.3.el7.x86_64/nikal] Error 2
nikal: make: *** [nikal.ko] Error 2
nikal: ERROR: failed to build nikal
nikal: ERROR: NI-KAL update failed.
nikal: ERROR: make of nikal kernel module failed, not installing kernel module.
nikal: ERROR: updateNIDrivers should be called again after fixing the problem.
nikal: ERROR: Update of National Instruments drivers failed.
In short: it's completely hopeless. There's no Linux support whatsoever.
By looking at their code, I immediately see, they have absolutely no idea how the Linux kernel works.
I've offered my help several times, but there's no budget for linux drivers.
It would take maybe 100..200k for fresh and clean driver development done by Linux experts - but NI obviously can't afford that.
[sudo] password for elsys:
nikal: ERROR: Error locating kernel sources for the requested kernel version (4.16.8-1.el7.elrepo.x86_64).
usage: ./updateNIDrivers [--no-prompt] [kernelVersion]
Specify the version of a kernel installed on the system.
A /lib/modules/<kernelVersion> directory should exist for each
kernel installed. The currently running kernel is the default
for ./updateNIDrivers if no argument is provided.
Run 'uname -r' at the command prompt to find the version of the
currently running kernel.
runs in no prompt mode. Useful if calling this script from
another script. Messages are still printed to the screen and
the return value can be checked for status.
use fast shortcuts to determine whether modules need to be rebuilt.
maybe you need to install the corresponding kernel source package.
but it won't work w/ 4.16 anyways.
I fix it.
I try to use 4.16 kernel, but fail anyway.
#define NLNIKAL_CMD_SEND 1
#define GENL_ID_GENERATE 0 // define value to genl_id_generate = 0
static struct genl_family nikal_netlink_family =
.id = GENL_ID_GENERATE,
.name = "nlnikal",
.version = 1,
.maxattr = 1
and then comment this
//if ((status = genl_register_family_with_ops(&nikal_netlink_family, nikal_netlink_ops))) return status;
//if ((status = genl_register_family_with_ops(&nikal_netlink_family, nikal_netlink_ops, 1))) return status;
visa works fine....
I've been working with these "PoS" drivers for about a year now, and although I don't have what I would consider a solution, I would like to add to some of the responses here for a bit more exhaustive insight.
The root issue concerning the GENL-related errors is that the makefiles in the bowels of the nikal module rely on the libnl.i686 package, and they don't properly include it or even check for the dependency.
Although the fix of setting values to zeros and commenting out lines works, its really dumb luck rather than calculated reasoning that allows these quick fixes.
One thing that I didn't notice in this thread is the "do_munmap" error which occurs for me during the nikal build. The solution here is to completely replace the #ifdef/else/endif structure with the single 4 argument line. Clearly the ifdef constant is broken.
I'd also like to note that the nikal.c file to edit here is the one under /usr/local/natinst/nikal/src/nikal rather than the kernel specific c file. If you edit the nikal.c file under /usr/local and delete /var/lib/nikal before running updateNIDrivers, you'll only need to implement these fixes once, rather than every time your OS updates.
Lastly I'd like to note a couple important things I wished someone had shared with me when I started working with the NIDAQmx Base drivers:
1. You can validate that the driver is working by running 'lsdaq' and the device ID(s) will be displayed
2. You must download these 32-bit dependencies before installing the drivers: