Linux Users

cancel
Showing results for 
Search instead for 
Did you mean: 

ni-visa on recent ubuntu: missing modversions.h

Solved!
Go to solution

So I downloaded NILinux2022Q1DeviceDrivers.zip, unzipped it, then

# gdebi ni-ubuntu2004firstlook-drivers-stream.deb
# aptitude update
# aptitude install ni-visa

It fails during configuration of ni-kal:

 

$ less /var/crash/ni-kal.0.crash
...
/var/lib/dkms/nikal/21.5.0f129/build/nikal.c:32:16: fatal error: config/modversions.h: No such file or directory
...

$ ll /usr/src/linux-headers*/include/config/modversions.h
-rw-r--r-- 1 root root 0 May  7  2021 /usr/src/linux-headers-5.11.0-18-generic/include/config/modversions.h
$ ll /usr/src/linux-headers-5.13.0-28-generic/include/config/*.h
ls: cannot access '/usr/src/linux-headers-5.13.0-28-generic/include/config/*.h': No such file or directory

This file does not exist anymore in recent kernels. I don't know what the stance regarding that file is with kernel developpers, but how should I install ni-kal ?!?

Thanks

0 Kudos
Message 1 of 6
(3,271 Views)

This will be changed in an upcoming release of NI drivers for Linux.  In the mean time, you can modify nikal.c and remove that #include with no ill effects.   It is likely that if you have other NI drivers in /usr/src that you'll need to do the same for them.

 

Note that with the 5.13 kernel there will likely be other roadblocks to building NI-KAL.  An upcoming release of the software will include the necessary changes.

Message 2 of 6
(3,258 Views)

With the usual caveats of "NI hasn't yet tested and so doesn't yet support Ubuntu 21.10 or these changes," I removed all of the modversions.h includes from the /usr/src/ni*/*-interface.c files and from nikal.c and NI-VISA installed on Ubuntu 21.10.

0 Kudos
Message 3 of 6
(3,234 Views)
Solution
Accepted by gdargaud

FYI that, in the interim before the next NI driver release, we changed the published install instructions for NI Linux Device Drivers for Ubuntu to mention a simpler workaround:

sudo touch /usr/src/linux-headers-$(uname -r)/include/config/modversions.h

Then try installing.

0 Kudos
Message 4 of 6
(3,102 Views)

Thanks, that worked.

 

But that brought me to another problem: is there a 32-bit version of libvisa ? I'm integrating with CVI for Linux, which is 32 bits, so the two cannot be linked together...

Thanks

0 Kudos
Message 5 of 6
(3,024 Views)

@gdargaud wrote:

Thanks, that worked.

 

But that brought me to another problem: is there a 32-bit version of libvisa ? I'm integrating with CVI for Linux, which is 32 bits, so the two cannot be linked together...


No.  NI's modern desktop Linux drivers (since 2018) have been strictly 64-bit.

0 Kudos
Message 6 of 6
(3,021 Views)