Using NI DAQmx Base in openSUSE 64bit
Quick FAQ:
- Can I install “DAQmx Base” in a 64bit GNU/Linux OS?
Yes; despite National Instruments’ lack of interest. - Can it be installed in Ubuntu / Debian?
As far as I reached, only NI-DAK (the kernel driver), but not “DAQmx Base”. So, in short: you can’t. - Can I use it to compile my own C applications?
Yes, but only as 32bit programs. Even in a 64bit OS. - Why can’t I build 64bit programs? Shouldn’t it be easy to provide 64bit libraries?
Don’t know; ask NI.
1. Install NI KAL:
1.1. Prepare to build the kernel sources:
- You need a few packages to compile NI’s kernel driver module. Open a console, and execute:
sudo zypper in kernel-devel kernel-source kernel-syms
- Find out which kernel module you are running:
uname -r
- Change the directory to the /usr/src/linux-[VERSION] directory, where [VERSION] corresponds to the currently running kernel version.
- Run the following, replacing [VERSION] as corresponds to your system:
sudo su zcat /boot/symvers-[VERSION].gz > Module.symvers make cloneconfig # Configure sources for kernel make modules_prepare # Prepare the headers for compilation
1.2. Install NI KAL
NI KAL is National Instruments’ Kernel Abstraction Layer (KAL). It is required before installing NI DAQmx Base or any other NI stuff.
- Get the latest version, NIKAL 2.4 as of October 2013:
http://joule.ni.com/nidu/cds/view/p/id/4459/lang/en - Extract the .iso file, for example, right-clicking on it and selecting “Extract”.
- Say you have now NIKAL contents in ~/Downloads/NIKAL24. Open a console and run:
cd ~/Downloads/NIKAL24 sudo ./INSTALL --nodeps
Accept the license and confirm the target directory to finish the installation:
- Recompile the module kernel, with:
sudo /usr/local/natinst/nikal/bin/updateNIDrivers
- Reboot, as you are prompted to.
- After rebooting, open a new console and check if the nikal module is correctly installed with:
sudo modprobe nikal sudo lsmod | grep nikal
If you can see something like:
nikal 93934 0
then it is correctly setup and loaded. Great! Now for the next steps.
2. Install DAQmx Base
Installing DAQmx Base in a 64bit OS is not officially supported by NI, so a few extra steps are required. Here is the recipe:
- Download the latest Linux version of NI DAQmx Base. As of October 2013, it is version 3.7, and can be downloaded from:
For some obscure reason, there seems not to be one “central” web page where we can always get the latest version of DAQmx Base, or even knowing whether there exists a newer one. Sight.
- Save the
nidaqmxbase-3.7.0.isofile, for example to~/Downloads. - Open a console in the download directory and extract the ISO contents into a new directory named “DAQmx”:
mkdir DAQmx tmp sudo mount -o loop nidaqmxbase-3.7.0.iso tmp cp -r --no-preserve=ownership tmp/* DAQmx sudo umount tmp rm -fr tmp
- Before installing NIVISA, we must patch the INSTALL script because the .rpm has some errors:
cd DAQmx/nivisa/ chmod u+w . INSTALL perl -p -i -e "s/RPMOpts=--nodeps/RPMOpts=\"--replacefiles --nodeps\"/g" INSTALL perl -p -i -e "s/RPMOpts=\"\"/RPMOpts=\"--replacefiles\"/g" INSTALL
- Now, we can run the INSTALL script as root and NIVISA will get installed:
sudo ./INSTALL
- At this point, you could try to launch niiotrace, but will find an error about missing libraries:
RUN THIS: /usr/local/bin/niiotrace
WILL SEE THIS: /usr/local/bin/niiotrace: error while loading shared libraries: libgcc_s.so.1: cannot open shared object file: No such file or directory - Fix the missing libraries:
sudo zypper in libgcc_s1-32bit libstdc++6-32bit libXinerama1-32bit Mesa-libGL1-32bit
- And if you launch niiotrace again now it should work:
/usr/local/bin/niiotrace
- Now we can install the rest of DAQmx Base packages. We must do it “by hand”, one by one, due to some errors in the packages that force the usage of the flag “–replacefiles”:
cd ~/Downloads/DAQmx/ sudo rpm -i nidaqmxbase-common-3.7.0-f0.i386.rpm sudo rpm --replacefiles -i nidaqmxbase-board-support-3.7.0-f0.i386.rpm sudo rpm -i nidaqmxbase-cinterface-3.7.0-f0.i386.rpm sudo rpm -i --replacefiles nidaqmxbase-usb-support-3.7.0-f0.i386.rpm
- If everything went right (and remembered to reboot after the driver update!), you can run lsdaq and see the list of connected devices:
lsdaq
Giving something like:
-------------------------------- Detecting National Instruments DAQ Devices Found the following DAQ Devices: NI USB-6210: "Dev1" (USB0::0x3....) --------------------------------
3. Compiling programs with DAQmx Base
- Compiling 32bit C or C++ programs in openSUSE 64bit requires installing these extra packages:
sudo zypper in glibc-devel-32bit gcc-32bit gcc-c++-32bit
- You can test that everything works with some DAQmx examples:
cd && mkdir daqmx-examples && cd daqmx-examples cp -r /usr/local/natinst/nidaqmxbase/examples/* . cd ai make ./acquireNScans
- If you need to build some CMake-based project in 32bit, from your 64bit OS, just invoke cmake with:
CXXFLAGS=-m32 CFLAGS=-m32 cmake [PATH_TO_SOURCES]



Many thanks. National Instruments should give you money for this.
Thanks! In turns, one only gets headaches… 😉
BTW, I can’t understand why they don’t make the effort of supporting Ubuntu, being the official platform of ROS, the Robot Operating System…