Linux Users

cancel
Showing results for 
Search instead for 
Did you mean: 

How to install NI-VISA and NI-GPIB on Gentoo Linux

This document is obsolete. Using a kernel as ancient as 2.6.24 is not possible in Gentoo anymore, as the required similarly ancient udev version conflicts with the dependencies of other packages. No more GPIB-USB-HS controller use.

I'm currently busy setting up some Linux measurement PC's (for use with http://www.labvisa.de/). Since my distribution of choice has been Gentoo for some time, I'd like to share my experiences, tips and tricks here. Beware, this is still work in progress.

Choice of Linux kernel

Since the most popular piece of hardware in our labs is the NI GPIB-USB-HS controller, and since NI does not support this device for Linux kernels newer than 2.6.24, we're restricted to the following packages currently in the portage tree:

  • sys-kernel/gentoo-sources-2.6.16-r13
  • sys-kernel/vanilla-sources-2.6.24.7

While the gentoo-sources kernel is still supported by the Gentoo security team, we cannot use it: it requires a very old version of udev, which in turn is too old for recent hal... and we need recent hal for kde... dependency hell. So, we pick sys-kernel/vanilla-sources-2.6.24.7.

Still, we now have to downgrade udev. For this we insert into /etc/portage/package.mask

>=sys-fs/udev-142

Kernel configuration, compilation, a quick run of "emerge -uDNA world" and this should be done.

Installing RPM (yes we need it)

The installation scripts in all the NI packages include a precompiled rpm version for non-rpm-based distributions. However, as other users here have already noticed, installation fails in that case (without error message). So, we need rpm - fortunately no problem for Gentoo, we emerge app-arch/rpm. The emerge process automatically initializes an empty rpm database.

Installation with locale fun

All NI installer scripts try to compare the currently installed gcc version with the gcc version used for the compilation of the running kernel. Unfortunately, if you have a non-english locale, the output of "gcc -v" differs, and this comparison always fails. So, we install NI-KAL 1.10, NI-VISA 4.5.1, and NI-488.2 2.5.1b1 each with the following command:

LANG=C ./INSTALL --nodeps

0 Kudos
Message 1 of 1
(7,234 Views)