Linux Users

cancel
Showing results for 
Search instead for 
Did you mean: 

64/32 bit nightmare! NIvisaic not starting in Linux (take 2)

(Previously posted but I left immediately and did not see the "is this a question?" option, so reposting as question; sorry!)

I think my issue boils down to 32/64 bit issues:

I'm a long-time Linux user (about 90% GUI-level only, though), but am completely new to instrumentation control.  I am running Scientific Linux 6.5 (64 bit) in VirtualBox 4.3.10 on a Windows 7 (64 bit) machine.  I first read at this link

http://digital.ni.com/public.nsf/allkb/4857A755082E9E228625778900709661

that NI VISA 5.4 (for Linux) did support 64-bit, but later read in the README that only 32 bit was supported.  I thought I'd try though, since I had read online that some people were getting things going on a 64-bit system (the link below is more about pyvisa, but the person used an NI VISA driver, so...):

http://comments.gmane.org/gmane.comp.python.pyvisa.devel/59

Anyway, I followed the instruction in the NI-VISA-5.4.0.iso README and everything seemed to install.  When I ran "NIvisaic" from the command line (as root), I got:

[root@localhost bin]# NIvisaic

bash: /usr/local/bin/NIvisaic: /lib/ld-linux.so.2: bad ELF interpreter: No such file or directory

I found this was a "32-bit application on a 64-bit computer" issue. (http://stackoverflow.com/questions/14030306/lib-ld-linux-so-2-bad-elf-interprete r-no-such-file-or-d...).  The link seems to indicate I need to install ld-linux.so.2, so I checked yum:  "yum whatprovides ld-linux.so.2" and got (among other hits):

glibc-2.12-1.132.el6.i686 : The GNU libc libraries

Repo        : installed

Matched from:

Other       : Provides-match: ld-linux.so.2

which seems to indicate it's installed.

Anyway, I then ran "updateNIDrivers" and that seemed to go okay, but running "NIvisaic" again produced the same error.

My next step is to get Scientific Linux in 32-bit as mentioned in another post, but wondered if perhaps this one issue could easily be resolved meaning I won't have to reinstall/update/tweak a new OS.  I also read somewhere that useing "-m32" when building an application would work, and wondered if anyone knew how to apply that to the situation above.  Finally, I read a 64-bit Linux driver might be available in Fall 2014, and since market size is the key motivator, I'd like to let NI know there's at least one more person hearitly encourging its development!

So that's my issue; you can stop reading if you'd like, but for more background: I'm an EE intern and am trying, as a proof of concept, to communicate and control an NI USB-5132 Digitizer using Linux.  I don't have funding, but need to log data, so my intent was to use PyVISA (or maybe Python IVI, which I just discovered, but know nothing about) to do this.  Unfortunately, I need 32-bit Python for the NI VISA driver, and getting 32-bit Python on Linux is way harder than I guessed it would be.  I am using the book "Real World Instrumentation with Python" by J.M. Hughes as a guide (but he uses Python 2.6 and I'd like to "convert" it to 3.x, but getting either in 32-bits is, like I mentioned, seemingly impossible (for my skill level, anyway)).  Any help would be great!

0 Kudos
Message 1 of 2
(4,075 Views)

I think your primary issue is that the binary that is meant to run in userspace (the applications that interact with the drivers) is 32-bit (can be verified with something like "file /path/to/NIvisaic") but you don't have the 32-bit compatibility libraries installed.

The actual packages to install vary from distro to distro, but install those first and see if that fixes your issues.

For complete clarity, I would imagine the situation is that the userspace libraries and binaries are 32-bit and the kernel stuff must be 64-bit (you can check to see if those modules are installed with something like "lsmod"), the userspace side communicates with driver through a mechanism that permits the two sides to be different in terms of "bit-ness".

For example, on my linux machine, I have some Xilinx tools installed (as well as some compatibility libraries, otherwise I would not be able to run them). The compatibility glibc (libc6-i386 on my distro) installs a /lib32 folder that includes the 32-bit libraries and the 32-bit ld-linux.so that will be used when attempting to run a 32-bit binary.

There's plenty of guides on how to get things like this working online.

0 Kudos
Message 2 of 2
(3,112 Views)