Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Errors installing visa on Debian Linux

Kernel has reparent_to_init(): yes
Number of arguments for do_munmap(): 3
pte_offset function: pte_offset_kernel()
Number of arguments for remap_page_range(): 4
Kernel has get_user_pages(): yes
Kernel exports get_user_pages(): yes
USB altsetting name: cur_altsetting
Kernel has usb_get_intf(): yes
Kernel has intf_cache member in usb_host_config: yes
Kernel exports usb_set_configuration(): no
Kernel has usb_endpoint_running(): no

Storing configuration in Makefile.in
If the values stored are incorrect they can be changed before running make.

Installing Kernel module...
/bin/cp nikal.c objects/nikal.c
/bin/cp nikal.h objects/nikal.h
make -C /lib/modules/2.6.14.3-raja/source
SUBDIRS=/usr/local/natinst/nikal/src/objects modules
make[1]: Entering directory `/usr/src/linux-2.6.14.3'
  CC [M]  /usr/local/natinst/nikal/src/objects/nikal.o
In file included from /usr/local/natinst/nikal/src/objects/nikal.c:86:
/usr/local/natinst/nikal/src/objects/nikal.h:172: warning: 'packed'
attribute ignored
/usr/local/natinst/nikal/src/objects/nikal.c: In function
'nNIKAL100_vmaClose':
/usr/local/natinst/nikal/src/objects/nikal.c:196: sorry, unimplemented:
inlining failed in call to 'nNIKAL100_isKernelContiguousPointer': function
body not available
/usr/local/natinst/nikal/src/objects/nikal.c:890: sorry, unimplemented:
called from here
/usr/local/natinst/nikal/src/objects/nikal.c: In function
'nNIKAL100_getKernelPageTableEntry':

<lot of such errors snipped - have to comply with 5000 character limit>

/usr/local/natinst/nikal/src/objects/nikal.c:3104: warning: passing argument
1 of 'readl' makes pointer from integer without a cast
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/linux-2.6.14.3'
make: *** [objects/nikal.ko] Error 2
0 Kudos
Message 1 of 28
(9,749 Views)

The only currently supported distributions of Linux are:

  • Mandrakelinux 10.0 Official
  • Mandrakelinux 10.1 Official
  • Red Hat Enterprise Linux WS 3
  • SUSE LINUX Professional 9.1
  • SUSE LINUX Professional 9.2

If you ever want to know whether or not your distribution of Linux is supported, you can check:

National Instruments and Linux: Frequently Asked Questions:  Which Linux distributions does National...

That being said, has anyone out there tried using VISA in Debian, encountered a similar problem, and managed to resolve it?

Logan S.

0 Kudos
Message 2 of 28
(9,704 Views)
Thanks for your response. I am aware that Debian and Debian based distros are not officially supported. However, as a long term user of Linux (close to a decade), I am yet to find a program that can be compiled on one distro but not another. I have lsb-base and rpm installed so I cannot see any technical reason for any program not compiling, unless there is a kernel option missing in my custom kernel (something that can happen on any distro, even those that National Instruments supports).

That said, I think National Instruments would be wise to support Debian officially. Debian and Debian based distros are the most widely used Linux distributions today (take a look at www.distrowatch.com - and add up the numbers for Ubuntu, Debian, MEPIS, Damn Small, Knoppix, etc. and compare them to the ones in your list). They all use the same packaging system and have nearly identical file configuration structure.

Moreover, if National Instruments just targets lsb (Linux Standards Base), it would ensure that their products would be supported on all Linux distributions, making life much easier for both NI and the end user. Many other vendors have done this with profit.
0 Kudos
Message 3 of 28
(9,702 Views)
National Instruments officially supported distributions have been tested and are known to work with our products.  There has been nothing done to stop you from using a different distribution, however we cannot garuntee that our products will work.  We appreciate your feedback about Debian, and as demand increases we will consider expanding our supported distributions.

It does seem that you have a missunderstanding about the LSB.  The LSB website states, "The LSB is an open source project to develop open standards for portable software on GNU/Linux systems. It describes a portability platform allowing compiled software to run correctly across versions and distributions."  As you can see the LSB referes only to compiled software.

The problem you experiencing is occuring during the compilation of a kernel module.  There are several technical reasons why the compilation could be failing:

1.  Your kernel is not configured with the correct options.  (We don't supported custom or recompiled kernels on our supported distributions)
2.  The version of your kernel is either too new, or too old, and thus the exported API has changed.
3.  Numerous patches could have been applied to your kernel changing the behavior, or API.

If you must use Debian I would suggest searching the forums for other users who have tried installing National Instruments drivers.  If the posts you find don't help you can try modifying the three parameters I listed above.

Shawn B.
National Instruments


Use NI products on Linux? Come join the NI Linux Users Community
Message 4 of 28
(9,696 Views)
Thanks for your message and the clarification regaring LSB. In light of your suggestions :

1. What kernel options need to be enabled for the kernel driver to compile ?
2.  Since you say that kernel version might be an issue in itself, what kernel versions does the kernel driver compile against ?
3. I will investigate the patch issue further. There is only one patch (suspend2) applied to my kernel, but this patch is commonly applied to lots of other distros as well (Fedora, which is an RH variant, carries this patch).

Yes, I have to use Debian as I find it very convenient to use.

And I think that instead of specifying distributions, you might consider specifying kernel options, kernel versions and with some user feedback, a list of incompatible patches. AFAIK, that seems to the best way to make sure that the modules compile cleanly.
0 Kudos
Message 5 of 28
(9,686 Views)
The best place to start is to checkout some other posts on the forums.  I recommend taking a look at NI-DAQmx Base on Debian since NI-DAQmx Base uses NI-VISA.  Also since NI-KAL is the kernel module that is failing to compile I would recommend downloading version 1.2 which can be found here.  Mandriva 2006 uses a version of kernel 2.6.12, and Mandriva 2006 is supporte by NI-KAL 1.2, so... you might want to start there.

As far are kernel configurations are concerned you can always start with Mandriva's config, which I have attached.

Shawn B.
National Instruments
Use NI products on Linux? Come join the NI Linux Users Community
Message 6 of 28
(9,676 Views)
Thanks for your help so far. I retried installing nadaqmx-base on a kernel 2.6.15.1 with the suspend2 patch, starting from the kernel config script you provided and it ended with an error. I have posted the errors on the other thread you suggested.

Separately, I downloaded the NIKAL iso from the ftp link you provided and it quits with the error :

sudo ./INSTALL

*****************************************************************************
  NI-KAL Installer Distribution
     version 1.2.0f0 for Linux/x86 32-bit
*****************************************************************************

National Instruments products support the following Linux distributions:
   Mandrakelinux Official
   SUSE LINUX Professional
   Red Hat Enterprise Linux WS
Refer to README.txt for the latest information at the time of release.
Refer to www.ni.com/linux for the most recent information about Linux
support at National Instruments.

Continue? [Yn] Y

Checking required install tools...
Checking installer tool versions...
rpm        4.4.1 can be used with a default installation path
tar        1.15.1
Checking dependencies...
glibc      2.3.5
Unpacking install files to /tmp/nikal-1.2.0f0.install...

******************************** ERROR ****************************************
* Kernel source in /lib/modules/2.6.15.1-raja/source does not appear to be
* configured for the 2.6.15.1-raja 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 ****************************************

Installer is aborted.

This is completely meaningless as :
1. The kernel was configured for the kernel I am running.
2. The installation procedure for nidaqmx-base did not give me this error.

The discussion on the other thread makes reference to installation working on 2.6.8, but not 2.6.12. But your suggestion was to try 2.6.12. So, I am a little confused by this mess. Let me try 2.6.12 now and see what gives.
0 Kudos
Message 7 of 28
(9,663 Views)
A followup to my own post :

I downloaded, configured and install kernel 2.6.12 without the suspend2 patch. I found that while ni488 and nidaqmx-base installations quit with the same error as before, the version 1.2 from that ftp site you pointed out installs without any problems :

NI-KAL version 1.2.0f0
is about to be installed using rpm at /usr/local/natinst

Would you like to continue? [Yn] Y

Installing NI-KAL version 1.2.0f0...
Pre Installation ..
Post Installation ..

FOR PATENTS COVERING NATIONAL INSTRUMENTS PRODUCTS, REFER TO
THE PATENTS.txt FILE ON /mnt/iso AND/OR
www.ni.com/patents

NI-KAL Installation completed successfully.

However, when I go to that directory, I see only the following :

/usr/local/natinst$ ls -lR
.:
total 0
drwxr-sr-x  3 root staff 72 2006-01-29 03:15 share

./share:
total 0
drwxr-sr-x  2 root staff 80 2006-01-29 03:15 etc

./share/etc:
total 4
-rw-r--r--  1 root staff 25 2006-01-29 03:15 share.dir


In other words, nothing is installed at all ! The file share.dir just contains one line, which is the path of the installation. I need to get libvisa.so installed on this system.

Could you suggest what is going on ?
0 Kudos
Message 8 of 28
(9,663 Views)
Well to answer some of your questions...

The version of NI-KAL (1.1) that shipped with NI-VISA 3.4 supported distributions whose latest kernel version was around 2.6.8.  That is why the previous forum mentioned that 2.6.8 worked, but 2.6.12 didn't.  In our continuous effort to support newer Linux distributions NI-KAL 1.2 supports Mandriva 2006 which has the 2.6.12 kernel. 

As far as it complaining that your kernel source isn't configured for you currently running kernel I would have to search through the installations scripts to see what triggers that error.  I don't have the install script infront of me, but I believe it looks in include/linux/version.h for your current running kernel.  You may be able to investigate this further.

You last question is quite mysterious.  The basic installations steps are fairly simple.  Setup a couple of files (probably the ones you are seeing), install the RPMs, run some post install scripts (for example compile the nikal kernel module).  All of the main files should be copied to your system when the RPMs are installed.  If you don't see the files in /usr/local/natinst/ then I would guess the RPMs were not installed.  You can verify if the RPMs were installed with the command:

rpm -q nikali

Also just out of curiosity, do you see any files in /usr/local/natinst/ or /usr/local/vxipnp/ when you run the NI-VISA or NI-488.2 installers?

Shawn B. National Instruments

Use NI products on Linux? Come join the NI Linux Users Community
0 Kudos
Message 9 of 28
(9,630 Views)
I have been having the same problems, though in my case I am running SuSE 10.0.

During the "./configure" step of compiling  NI-KAL (version 1.2), the installation script looks for a file called "asm_offsets.h" and if it doesn't find it returns an error like "kernel not configured. . .".  Look in your /usr/src/linux/include/asm" directory for this file.

This is a file I do not seem to have (for some reason) and so the compile is bad.  I can spoof the thing by making a (empty) file called asm_offsets.h, but when I go to run NIDAQmxbase, the thing starts up but then immediately terminates with nothing but "Aborted".
0 Kudos
Message 10 of 28
(9,598 Views)