Linux Users

Highlighted

Error compiling NI-KAL 19.2.0f0 with 5.3.8 kernel

Hi,

 

I tried to install the NI drivers from August 2019 (aka version 19.2) on my Fedora 31 and it seems that they are incompatible with kernel 5.3.

Indeed when I `dkms autoinstall` the build of `nikal` fails:

Kernel preparation unnecessary for this kernel. Skipping...

Building module:
cleaning build area...
make -j12 KERNELRELEASE=5.3.8-300.fc31.x86_64 KERNELDIR=/lib/modules/5.3.8-300.fc31.x86_64/build KERNELVER=5.3.8-300.fc31.x86_64 build sysprep...(bad exit status: 2)
Error! Bad return status for module build on kernel: 5.3.8-300.fc31.x86_64 (x86_64)
Consult /var/lib/dkms/nikal/19.2.0f0/build/make.log for more information.

Here is the content of `/var/lib/dkms/nikal/19.2.0f0/build/make.log`:

DKMS make.log for nikal-19.2.0f0 for kernel 5.3.8-300.fc31.x86_64 (x86_64)
jeu. nov.  7 10:21:59 CET 2019
Using kernel headers found in:
    /lib/modules/5.3.8-300.fc31.x86_64/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.3.8-300.fc31.x86_64/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 has version.h in include/generated/uapi/: yes
    Kernel's struct module layout members: init_layout and core_layout
    Number of arguments for do_munmap(): 4 (uf)
    Kernel has vm_mmap(): yes
    Kernel has vm_munmap(): yes
    Kernel has VM_RESERVED: no
    vm_operations_struct fault handler callback takes a vm_area_struct parameter: no
    Kernel get_user_pages() requires: implicit "current" task and combined page flags param.
    Kernel struct pci_dev has busn_res member: yes
    Kernel acpi_op_remove callback has additional "type" parameter: no
    pte_offset function: pte_offset_kernel()
    Levels in page table: 5
    Kernel has kzalloc: yes
    Kernel has chained SGL support: limited
    USB altsetting name: cur_altsetting
    Kernel has usb_get_intf(): yes
    Kernel has intf_cache member in usb_host_config: yes
    Kernel has ep[] members in usb_device: yes
    Kernel exports usb_set_configuration(): yes
    Units of USB_CTRL_GET_TIMEOUT: msec
    Kernel has mutex method: yes
    Kernel has wait_for_completion_interruptible: yes
    Kernel has work_struct and delayed_work: yes
    Kernel timer_list has data member: no
    Kernel has ioremap_wc: yes
    Kernel has cred.h: yes
    Kernel has uidgid.h: yes
    Kernel has UMH constants: no
    Kernel has create_proc_read_entry: no
    Kernel has namespaced generic netlink API: yes
    Kernel has genlmsg_new: yes
    Kernel has family genlmsg_put: yes
    Kernel genl_family member 'ops' is public: yes
    Kernel has family genl_ops_groups: no
    Kernel has RS-485 serial_core support: no
    Kernel RS-485 config options are per-uart: yes
    Kernel struct uart_ops has set_wake(): no
    Kernel uses tty_port instead of tty_struct for tty helper functions: yes
 
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/19.2.0f0/build/nikal.o
/var/lib/dkms/nikal/19.2.0f0/build/nikal.c:744:13: error: initialization of ‘vm_fault_t (*)(struct vm_fault *)’ {aka ‘unsigned int (*)(struct vm_fault *)’} from incompatible pointer type ‘int (*)(nLinux_vmFault *)’ {aka ‘int (*)(struct vm_fault *)’} [-Werror=incompatible-pointer-types]
  744 |    .fault = nNIKAL190_vmaPageFaultHandler,
      |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/var/lib/dkms/nikal/19.2.0f0/build/nikal.c:744:13: note: (near initialization for ‘nNIKAL100_vmaOps.fault’)
/var/lib/dkms/nikal/19.2.0f0/build/nikal.c:749:13: error: initialization of ‘vm_fault_t (*)(struct vm_fault *)’ {aka ‘unsigned int (*)(struct vm_fault *)’} from incompatible pointer type ‘int (*)(nLinux_vmFault *)’ {aka ‘int (*)(struct vm_fault *)’} [-Werror=incompatible-pointer-types]
  749 |    .fault = nNIKAL220_vmaPageFaultHandlerPageList,
      |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/var/lib/dkms/nikal/19.2.0f0/build/nikal.c:749:13: note: (near initialization for ‘nNIKAL220_vmaOpsPageList.fault’)
/var/lib/dkms/nikal/19.2.0f0/build/nikal.c: In function ‘nNIKAL100_doMMap’:
/var/lib/dkms/nikal/19.2.0f0/build/nikal.c:3729:7: error: ‘MAP_SHARED’ undeclared (first use in this function); did you mean ‘VM_SHARED’?
 3729 |       MAP_SHARED, offset);
      |       ^~~~~~~~~~
      |       VM_SHARED
/var/lib/dkms/nikal/19.2.0f0/build/nikal.c:3729:7: note: each undeclared identifier is reported only once for each function it appears in
cc1: some warnings being treated as errors
make[2]: *** [scripts/Makefile.build:281: /var/lib/dkms/nikal/19.2.0f0/build/nikal.o] Error 1
make[1]: *** [Makefile:1630: _module_/var/lib/dkms/nikal/19.2.0f0/build] Error 2
make: *** [Makefile:92: nikal.ko] Error 2

I don't know how I can fix those errors...

Could you provide me with some help ?
Thanks in advance.
Didier

0 Kudos
Message 1 of 6
(502 Views)
5 REPLIES 5
Highlighted

Re: Error compiling NI-KAL 19.2.0f0 with 5.3.8 kernel

Hi again,

Please ignore my complaint, I just found a NI Driver Updates that contains repos for the 19.5 version.
It seems to work just fine.

Cheers,
Didier

Message 2 of 6
(497 Views)
Highlighted

Re: Error compiling NI-KAL 19.2.0f0 with 5.3.8 kernel

Where did you find the 19.5?

I downloaded the 19.5 Serial driver from NI Package Manager but the process to update the PXI running NI Linux RT 2019 failed.

Ryan Vallieu
Senior Systems Analyst II
NASA Ames Research Center
0 Kudos
Message 3 of 6
(477 Views)
Highlighted

Re: Error compiling NI-KAL 19.2.0f0 with 5.3.8 kernel

Installing the relevant RPM from http://download.ni.com/support/softlib/MasterRepository/LinuxDrivers2019/DriverUpdates.zip will add the 19.5 repo to your system's configuration.  You should then be able to

yum update ni-kal

or whatever the equivalent commands are for your distribution.

0 Kudos
Message 4 of 6
(465 Views)
Highlighted

Re: Error compiling NI-KAL 19.2.0f0 with 5.3.8 kernel

Thanks.  That's just DAQmx 19.5 I see in the update...

 

It's not supposed to be the same process for NI Linux RT 2019 for PXI, but maybe it will end up being that way.  I have a service request open on this already.

Ryan Vallieu
Senior Systems Analyst II
NASA Ames Research Center
0 Kudos
Message 5 of 6
(463 Views)
Highlighted

Re: Error compiling NI-KAL 19.2.0f0 with 5.3.8 kernel


@RVallieu wrote:

Thanks.  That's just DAQmx 19.5 I see in the update...

 

It's not supposed to be the same process for NI Linux RT 2019 for PXI, but maybe it will end up being that way.


You are correct.  I missed the "RT" part of your response and thought you wanted to update NI-KAL to 19.5 on a desktop Linux distribution.  I don't know the workflow for updating PXI Linux RT systems.

0 Kudos
Message 6 of 6
(456 Views)
Reply
This is an open group. Sign in and click the "Join Group" button to become a group member and start posting.