Linux Users

cancel
Showing results for 
Search instead for 
Did you mean: 

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 6
(452 Views)

I am having this same problem. First noticed yesterday 9/4/24.

0 Kudos
Message 2 of 6
(440 Views)
Solution
Accepted by StareLacze
0 Kudos
Message 3 of 6
(431 Views)

Installing the 2024 Q3 drivers (after uninstalling ni-kal) resolved this error but seemed to cause a different error when trying to run applications:

libnipalu.so failed to initialize
Verify that nipalk.ko is built and loaded.
Aborted (core dumped)

Running

 

dkms autoinstall

Seemed to resolve this but caused the pxie modules to fail to initialize.

I was able to resolve all the problems by reverting the kernel version from 6.8.0-40-generic to 6.5.0-44-generic then reinstalling all the drivers and packages.

 

0 Kudos
Message 4 of 6
(425 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. The second one has a more informative title.

Sorry about that.

0 Kudos
Message 5 of 6
(402 Views)

Glad to be of help.  In general, newer kernels introduce changed programming interfaces that may require updates to NI driver software.  Updating to the latest NI driver stack is a first line of defense.

 

I don't think I have any ability to merge threads, or I'd do that. Thanks for following up.

0 Kudos
Message 6 of 6
(392 Views)