Linux Users

cancel
Showing results for 
Search instead for 
Did you mean: 

NI-VISA Ubuntu 22.04 kernel 6.8 nikal.c error MAX_ORDER not defined

Solved!
Go to solution

Hi!

 

I'm running into issues building the NI-VISA drivers on Ubuntu 22.04 with kernel 6.8 after system update. The error occurs when building nikal packages and propagates to all packages that depend on it.

 

I am posting the make.log from dkms below:

 

 

Making nikal.ko
warning: the compiler differs from the one used to build the kernel
The kernel was built by: x86_64-linux-gnu-gcc-12 (Ubuntu 12.3.0-1ubuntu1~22.04) 12.3.0
You are using: gcc-12 (Ubuntu 12.3.0-1ubuntu1~22.04) 12.3.0
CC [M] /var/lib/dkms/nikal/24.0.0f140/build/nikal.o
/var/lib/dkms/nikal/24.0.0f140/build/nikal.c:98:2: error: #error ("MAX_ORDER not defined, but is required.");
98 | #error ("MAX_ORDER not defined, but is required.");
| ^~~~~
/var/lib/dkms/nikal/24.0.0f140/build/nikal.c: In function ‘nNIKAL100_malloc’:
/var/lib/dkms/nikal/24.0.0f140/build/nikal.c:3219:26: error: ‘nNIKAL1400_kMaxOrder’ undeclared (first use in this function)
3219 | if (get_order(size) < nNIKAL1400_kMaxOrder )
| ^~~~~~~~~~~~~~~~~~~~
/var/lib/dkms/nikal/24.0.0f140/build/nikal.c:3219:26: note: each undeclared identifier is reported only once for each function it appears in
/var/lib/dkms/nikal/24.0.0f140/build/nikal.c: In function ‘nNIKAL100_mallocContiguous’:
/var/lib/dkms/nikal/24.0.0f140/build/nikal.c:3242:20: error: ‘nNIKAL1400_kMaxOrder’ undeclared (first use in this function)
3242 | if (pageOrder < nNIKAL1400_kMaxOrder )
| ^~~~~~~~~~~~~~~~~~~~
make[2]: *** [scripts/Makefile.build:243: /var/lib/dkms/nikal/24.0.0f140/build/nikal.o] Błąd 1
make[1]: *** [Makefile:1926: /var/lib/dkms/nikal/24.0.0f140/build] Błąd 2
make: *** [Makefile:92: nikal.ko] Błąd 2

 

 

Could I ask you for help in solving this problem?

 

In the case of the nikal package, I have often faced various types of problems while building it. The most common one was related to the stdbool.h source file.

0 Kudos
Message 1 of 3
(348 Views)
Solution
Accepted by topic author StareLacze
0 Kudos
Message 2 of 3
(340 Views)

In my case it worked. The perfect solution. I had to update LabVIEW and NI-VISA drivers to version Q3. After restarting the computer, everything worked as it should.

 

Thank you very much for your help.

 

Could you merge this thread with another identical one? I posted the same post twice. This one has a more informative title.

Sorry about that.

0 Kudos
Message 3 of 3
(317 Views)