LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

HOWTO : Deploying LabVIEW 8.2 on Mandriva 2008 with full hardware support

Hello folks,

The good people at NI still continue to disregard Debian based operating systems and deb packaging format (at their own peril, given the way Linux marketplace is moving). The supported systems include Redhat Enterprise, Novell's Microsoft-approved OS, Mandriva 2008, etc. Only Mandriva out of these is a free to download OS that can be deployed without any licensing / support issues arising from the commercial model. There is nothing wrong with the commercial model, indeed it is one of the wealth generators for the Linux market, but many of us work for non-profit / academic institutions where shelling out hundreds of dollars for what is essentially a free OS, is not seen as an idea worth discussing. We know better.

The way forward in this situation is to grab a copy of Mandriva (NI suppports 2007 and 2008). I used Mandriva Spring 2008 for this case. Before I get too deep into this, let me point out that standard disclaimers apply - I am in no way responsible for any damage that may occur as a direct or indirect result of following these directions. Use common sense if your local configuration differs a lot from mine. You are free to use these directions, and you are solely responsible for whatever happens as a result of following them. That pesky legalese out of the way, lets get down to the real stuff.

The kernel that ships with Mandriva 2008 does not work for the purposes of LabVIEW 8.2. The installer complains that the sources in the /usr/src directory are not for the running kernel, whether or not you install kernel devel or sources packages (yeah - that most stupid of all LabVIEW installation errors, IMO). It does not matter what kernel version you choose. At the moment of writing, this kernel is 2.6.24.5-2mnb. Downloading and configuring newer kernels does not work either. Strange errors like the following crop up :

  CC [M]  /usr/local/natinst/nikal/src/objects/nikal.o
/usr/local/natinst/nikal/src/objects/nikal.c: In function ‘nNIKAL100_registerPCIDriver’:
/usr/local/natinst/nikal/src/objects/nikal.c:2802: error: ‘nLinux_pciDriver’ has no member named ‘enable_wake’
/usr/local/natinst/nikal/src/objects/nikal.c: In function ‘nNIKAL100_reserveInterrupt’:
/usr/local/natinst/nikal/src/objects/nikal.c:4114: error: ‘SA_INTERRUPT’ undeclared (first use in this function)
/usr/local/natinst/nikal/src/objects/nikal.c:4114: error: (Each undeclared identifier is reported only once
/usr/local/natinst/nikal/src/objects/nikal.c:4114: error: for each function it appears in.)
/usr/local/natinst/nikal/src/objects/nikal.c:4114: error: ‘SA_SHIRQ’ undeclared (first use in this function)
make[2]: *** [/usr/local/natinst/nikal/src/objects/nikal.o] Error 1
make[1]: *** [_module_/usr/local/natinst/nikal/src/objects] Error 2
make[1]: Leaving directory `/usr/src/rpm/BUILD/kernel-2.6.25.9'
make: *** [objects/nikal.ko] Error 2

ERROR: make of nikal kernel module failed, not installing kernel module.
   updateNIDrivers should be called again after fixing the problem.
   Logging failure...

Do yourself a favour - grab a copy of kernel 2.6.22 from ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-2.6.22.tar.bz2 . This is not the latest or greatest kernel, but most of us deploying machines for lab measurement use probably do not care for the newest features as long as the vital hardware is supported. My kernel configuration file is attached to this post. My machine had SATA disks, just like most newer hardware. There has been some talk on NI fora that compiling the SATA disk support as modules can lead to problems. I have had my fill of problems with LabVIEW installs over the years (yeah - I tamed LabVIEW on Debian once), so I just want Something That Just Works (STJW (TM)). So, in this kernel config, disk support and file system support (ext3 for me) has been compiled into the kernel - not as modules.

How you compile and install the kernel is your business. I just followed the guide at http://www.howtoforge.com/kernel_compilation_mandriva  (compiling kernels the Mandriva way). I am a Debian / Ubuntu guy and make-kpkg beats the pants off the procudure described here but its an STJW, so no arguments. Do edit the grub or lilo configuration (rpm install does not take care of that) and do not forget to mkinitrd an image for the boot. My grub entry looked like this :

title compiled 2.6.22
kernel (hd0,0)/vmlinuz-2.6.22 BOOT_IMAGE=2.6.22 root=UUID=78b0097e-05d9-4af6-807c-4209bb724816 resume=/dev/sda6 splash=silent vga=788
initrd (hd0,0)/initrd-2.6.22


Again, your hardware is different, so do not do a blind copy. Remember to symlink /usr/src/linux-2.6.22 to /usr/src/linux. I have no idea if that is necessary but given what it takes for the installer to start spewing garbage (not much), why take a chance ? Now comes the dirty little secret - the NI-KAL and NI-VISA versions on the CD you are the proud owner of are not new enough. Go to NI's website and grab the latest NI-KAL and NI-VISA versions. I used the following :

NI-KAL version 1.7 : http://joule.ni.com/nidu/cds/view/p/id/990/lang/en
NI-VISA version 4.3 : http://joule.ni.com/nidu/cds/view/p/id/986/lang/en

Mount the iso file in each package like this (as root after su - Mandriva does not have sudo) :

mount -o loop /home/experimenter/Desktop/NI/NI-KAL/NIKAL17.iso /media/iso
/media/iso/INSTALL

If you did follow all my directions so far, this will work without any complaints. Next unmount this iso image and mount the VISA image :

mount -o loop /home/experimenter/Desktop/NI/NI-VISA/NI-VISA-4.3.0.iso /media/iso
/media/iso/INSTALL

I got a few non-fatal messages during the install :

5:nipali                 ########################################### [ 38%]
Warning: fuse is needed by nipal in runlevel 2
Warning: fuse is needed by nipal in runlevel 2
Warning: netfs is needed by nipal in runlevel 2
Warning: netfs is needed by nipal in runlevel 2

Since I want STJW, I simply installed fuse using *drake* or whatever they call that tool for installing software in Mandriva. Then, for good measure, I did :

chkconfig --add netfs
chkconfig --add fuse

Years of using Redhat long time ago (pre-2003) are useful for something, I guess.

An lsmod indicates :
Module                  Size  Used by
NiViPciK               82440  0
nipxirmk              122708  1
nidimk                344096  2 nipxirmk
niorbk                 98964  2 nipxirmk,nidimk
nipalk               1236496  6 NiViPciK,nipxirmk,nidimk,niorbk
nikal                  60192  3 nipalk

I do not have actual GPIB hardware on this machine (its on order from NI) but I do not see why it should not work from here. VISA interactive control etc. work without any crashing (they show the serial ports only). Post if this works for you or if you have any problems.

Now if I could only convince Shawn and other helpful spirits like him to admit that not supporting the 800 lb gorrilla in the linux market (Ubuntu) is not a bright idea, it would round off a good day 🙂
0 Kudos
Message 1 of 2
(2,975 Views)
I guess I spoke too soon. Just to try out things, I tried to run labview - it segfaulted with some memory error (never happened prior to NI-KAL / NI-VISA installation).

8.2 - Received SIGSEGV
Reason: address not mapped to object
Attempt to reference address: 0x0

I ran tune2fs on all my ext3 partitions. Did nothing.

Then I tried to run :

#updateNIDrivers
******************************** ERROR ****************************************
* Kernel source in /lib/modules/2.6.22/source does not appear to be
* configured for the 2.6.22 kernel.
* Configuration of kernel source is required to continue installation.        *
* Refer to the README file for the product you are installing for information *
* about configuring your kernel source.                                       *
******************************** ERROR ****************************************

I am so sick and tired of this. I use a supported distro, use the latest versions of everything and now this happens. Shawn - what is going on here ?

Attempts to install NI-KAL again fail with this stupid error.

Further info :

ldd /usr/local/bin/labview
        linux-gate.so.1 =>  (0xffffe000)
        libOSMesa.so.4 => /usr/local/natinst/LabVIEW-8.2/linux/libOSMesa.so.4 (0xb7e6b000)
        libGL.so.1 => /usr/local/natinst/LabVIEW-8.2/patchlib/libGL.so.1 (0xb7e27000)
        libX11.so.6 => /usr/lib/libX11.so.6 (0xb7d29000)
        libXext.so.6 => /usr/lib/libXext.so.6 (0xb7d19000)
        libdl.so.2 => /lib/libdl.so.2 (0xb7d02000)
        libpthread.so.0 => /lib/i686/libpthread.so.0 (0xb7ceb000)
        libstdc++.so.5 => /usr/lib/libstdc++.so.5 (0xb7c2b000)
        libm.so.6 => /lib/i686/libm.so.6 (0xb7c06000)
        libgcc_s.so.1 => /lib/libgcc_s.so.1 (0xb7bfa000)
        libc.so.6 => /lib/i686/libc.so.6 (0xb7ab6000)
        libxcb-xlib.so.0 => /usr/lib/libxcb-xlib.so.0 (0xb7ab3000)
        libxcb.so.1 => /usr/lib/libxcb.so.1 (0xb7a96000)
        libXau.so.6 => /usr/lib/libXau.so.6 (0xb7a93000)
        /lib/ld-linux.so.2 (0xb7fd4000)
        libXdmcp.so.6 => /usr/lib/libXdmcp.so.6 (0xb7a8d000)

0 Kudos
Message 2 of 2
(2,969 Views)