07-29-2014 10:37 PM
I am trying to compile nirlpk 2.0 on Ubuntu 14.04 LTS but the code provided by NI has not been updated to address several kernel deprecations.
The first deprecation was easy to fix:
VM_RESERVED is deprecated in kernel 3.7, so I added the following to the "Misc. definitions" section of nirlpk.h:
#define VM_RESERVED (VM_DONTEXPAND | VM_DONTDUMP)
The second deprecation is trickier:
nimhddk_linuxkernel/LinuxKernel/nirlpk/objects/nirlpk.c:1076:5: error: implicit declaration of function ‘create_proc_read_entry’ [-Werror=implicit-function-declaration]
if (create_proc_read_entry(nNIRLP_kDriverAlias, 0, nNIRLP_procDir, nNIRLP_procRead, NULL))
^
create_proc_read_entry appears to have been deprecated in kernel 3.10. I attempted to update the code to implement proc files the "new way" but so far without success. I did manage to get my rewrite to compile, but installing the driver and reading the proc files is clearly not working correctly.
It would be great if NI could update the kernel driver in light of these deprecations. I can take another shot at this as well, if someone can point me to some documentation on the new way to implement proc files.
Thanks,
Drew
08-04-2014 08:03 PM
Nevermind, I fixed it. I still wish NI would maintain this code though.
-D
08-05-2014 01:27 AM - edited 08-05-2014 01:28 AM
Hi,
how did you fixed that one with the
implicit declaration of function ‘create_proc_read_entry’ [-Werror=implicit-function-declaration]
Is there an update for nirplk and/or a patch available for Kerenels >= 3.10 (I´m on 3.10.47)
# make objects/nirlpk.h <- nirlpk.h make[1]: Entering directory `/usr/src/kernels/linux-3.10.47-rt50' CC [M] /root/Downloads/nimhddk_linuxkernel/LinuxKernel/nirlpk/objects/nirlpk.o /root/Downloads/nimhddk_linuxkernel/LinuxKernel/nirlpk/objects/nirlpk.c: In function ‘nNIRLP_mkProcEntries’: /root/Downloads/nimhddk_linuxkernel/LinuxKernel/nirlpk/objects/nirlpk.c:1076:5: error: implicit declaration of function ‘create_proc_read_entry’ [-Werror=implicit-function-declaration] if (create_proc_read_entry(nNIRLP_kDriverAlias, 0, nNIRLP_procDir, nNIRLP_procRead, NULL)) ^ cc1: some warnings being treated as errors make[2]: *** [/root/Downloads/nimhddk_linuxkernel/LinuxKernel/nirlpk/objects/nirlpk.o] Error 1 make[1]: *** [_module_/root/Downloads/nimhddk_linuxkernel/LinuxKernel/nirlpk/objects] Error 2 make[1]: Leaving directory `/usr/src/kernels/linux-3.10.47-rt50' make: *** [objects/nirlpk.ko] Error 2
08-05-2014 02:38 PM
Ask NI to update their kernel driver code. Hopefully you will have better luck than I did, since they never even replied to my post.
If NI asks me nicely, I can provide my fix to them so they can update their code. I still think they should be capable of doing this themselves, but given how terrible their Mac/Linux support is, I guess I shouldn't be suprised.
08-06-2014 01:19 AM
I think you`re right!
I need to switch to the DDK since 64bit support isn`t in DAQmx (64bit is only about 10years old...) -
I`d prefer to have a DDK which works for Kernel >= 3.10 from NI.
09-05-2014 06:08 AM
For all those interested in the future, here is the patched nirlpk.c containing the fix that drobson didn't want to share. It is quite straightforward, the only thing needed is to change the old /proc file generation methods based on create_pro