Using NI DAQmx Base in openSUSE 64bit

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:
  • Find out which kernel module you are running:
  • 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:

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:

Accept the license and confirm the target directory to finish the installation:

NIKAL_install

  • Recompile the module kernel, with:
  • Reboot, as you are prompted to.
  • After rebooting, open a new console and check if the nikal module is correctly installed with:
    If you can see something like:
    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.iso file, for example to ~/Downloads.
  • Open a console in the download directory and extract the ISO contents into a new directory named “DAQmx”:

  • Before installing NIVISA, we must patch the INSTALL script because the .rpm has some errors:

  • Now, we can run the INSTALL script as root and NIVISA will get installed:

Screenshot from 2013-10-29 16:23:01

  • 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:
  • And if you launch niiotrace again now it should work:

niiotrace - screenshot OpenSUSE

  • 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”:
  • If everything went right (and remembered to reboot after the driver update!), you can run lsdaq and see the list of connected devices:
    Giving something like:

3. Compiling programs with DAQmx Base

  • Compiling 32bit C or C++ programs in openSUSE 64bit requires installing these extra packages:
  • You can test that everything works with some DAQmx examples:
  • If you need to build some CMake-based project in 32bit, from your 64bit OS, just invoke cmake with: