11-29-2010 05:22 PM
I knew I'm not the only one who have problem with nipal but I don't quite seem to be able to find a solution that's applicable to my case.
We used to use the "NI PCI-GPIB" to drive our lab instruments. After some lab renovation, our measurement equipment is out of reach of the GPIB cable so we decided to drive it by LAN.
The computer has OpenSUSE 11.3 newly installed. The Ethernet interface is directly connected to the instrument. Attempted to install the NI-VISA-5.0.0 and NI-VISA-Runtime-5.0.0. The ./INSTALL seems to have ran fine on both but then I realize nothing was actually being created in /usr/local/natinst,. Thus, I manually un-tar and do rpm -i for those files in the rpm/ folder for both the NI-VISA and the NI-VISA Runtime..
Since I'm writing my scripts in Python, I'm using the PyVISA module. When I first ran the script, it complained about:
libnipalu.so failed to initialize
libnipalu.so failed to initializePerhaps you need to run updateNIDrivers
Aborted
Manually ran the /usr/local/natinst/nikal/binupdateNIDrivers
Configuring for linux kernel version 2.6.34.7-0.5-desktop.
********************************* NOTE *********************************
Using kernel headers found in /lib/modules/2.6.34.7-0.5-desktop/source.
If this does not correspond to the location of the 2.6.34.7-0.5-desktop headers,
then define KERNELHEADERS in your environment to point to the location
of the kernel headers, define KERNELTARGET as the version of the
kernel for which to compile, and then rerun ./configure.
********************************* NOTE *********************************
Kernel has reparent_to_init(): no
Number of arguments for do_munmap(): 3
pte_offset function: pte_offset_kernel()
Levels in page table: 4
Kernel has remap_pfn_range: yes
Kernel has kzalloc: yes
USB altsetting name: cur_altsetting
Kernel has usb_get_intf(): yes
Kernel has intf_cache member in usb_host_config: yes
Kernel has ep[] members in usb_device: yes
Kernel exports usb_set_configuration(): no
Units of USB_CTRL_GET_TIMEOUT: msec
Kernel has owner member in usb_driver: no
Kernel has put_page_testzero(): yes
Kernel has mutex method: yes
Kernel has wait_for_completion_interruptible: yes
Kernel has config.h: no
Kernel has ioctl32.h: no
IRQ handlers have pt_regs: no
Kernel has work_struct and delayed_work: yes
Kernel supports fault method in vm_operations_struct: yes
Kernel uses 'generated' dir: yes
Storing configuration in Makefile.in
If the values stored are incorrect they can be changed before running make.
Installing NI-KAL:
NI-KAL successfully updated.
Rebooting is required to ensure that National Instruments drivers
have been successfully updated.
Would you like to reboot now? [yes|no]yes
Rebooted but it still gave me the same issue.
I was poking around, ran into the nipal folder and see if I can start things manually:
lab-server:/usr/local/natinst/nipal/etc/init.d # ./nipal
Usage: ./nipal {start|stop|restart|reload|force-reload|status|condrestart}
lab-server:/usr/local/natinst/nipal/etc/init.d # ./nipal start
error: /lib/modules/2.6.34.7-0.5-desktop/kernel/natinst/nipal/nipalk.ko not found
error: Please compile and install nipalk.ko by running
error: updateNIDrivers
Re-did updateNIDrivers, didn't help.
I did a search on the PC but couldn't find the nipalk.ko file nor found a way to generate it.
I have no clue what part of the installation is broken. Please let me know if I can provide any further info for debugging.
THANK YOU!
Ziphion
Solved! Go to Solution.
11-30-2010 10:04 AM
Hi Ziphion,
In the readme for the installer it says:
Q2: During installation I get a message similar to the following one: "Kernel source does not appear to be configured for the running kernel. Configuration of kernel source is required to continue installation." I do have kernel sources installed; is there anything else that needs to be done? A2: This problem can occur even if you have installed the correct kernel sources, if the sources require configuration. This problem has been seen on openSUSE. However, it is possible that other distributions will require similar steps to resolve this problem. 1. Ensure you have installed kernel-source and kernel-syms packages corresponding to the version of the currently running kernel. The version of the currently running kernel can be determined by issuing the command `uname -r`. 2. Change the directory to the /usr/src/linux-<version> directory, where <version> corresponds to the currently running kernel version. 3. Run "zcat /boot/symvers-<version>.gz > Module.symvers" as root to prepare modversion support. 4. Run "make cloneconfig" as root to configure the sources for the currently running kernel. 5. Run "make modules_prepare" as root to prepare the headers for compilation. 6. THIS STEP IS STRICTLY OPTIONAL. Completing this step removes the warning: WARNING: Symbol version dump /usr/src/linux/Module.symvers is missing, modules will have CONFIG_MODVERSIONS disabled. Run "make modules" as root to compile all modules and generate Module.symvers; this step may take 30 minutes or more to complete. 7. Run the INSTALL script for the NI-VISA software for Linux from this directory.
Have you attempted to run through that?
11-30-2010 02:04 PM
I did.
Kernel-source and Kernel-syms are both installed and their version matches.
At first, I ran into some issue:
lab-server:/boot # zcat symvers-2.6.34.7-0.5-desktop.gz > Module.symverslab-server:/boot # make cloneconfigmake: *** No rule to make target `cloneconfig'. Stop.lab-server:/boot # make modules_preparemake: *** No rule to make target `modules_prepare'. Stop.
lab-server:/boot #
From the installation notes from a colleague who left the company, I realize the make cloneconfig and modules_prepare has to be done in "/usr/src/linux".
I did that. Also did the "make modules" and waited for almost 45 min for it to complete. Re-run the ./INSTALL. Reboot and I got the same issue.
libnipalu.so failed to initialize
Perhaps you need to run updateNIDrivers
Aborted
"updateNIDrivers" gave me different error msg this time:
lab-server:/usr/local/bin # ./updateNIDrivers
Configuring for linux kernel version 2.6.34.7-0.5-desktop.
********************************* NOTE *********************************
Using kernel headers found in /lib/modules/2.6.34.7-0.5-desktop/source.
If this does not correspond to the location of the 2.6.34.7-0.5-desktop headers,
then define KERNELHEADERS in your environment to point to the location
of the kernel headers, define KERNELTARGET as the version of the
kernel for which to compile, and then rerun ./configure.
********************************* NOTE *********************************
Kernel has reparent_to_init(): no
Number of arguments for do_munmap(): 3
pte_offset function: pte_offset_kernel()
Levels in page table: 4
Kernel has remap_pfn_range: yes
Kernel has kzalloc: yes
USB altsetting name: cur_altsetting
Kernel has usb_get_intf(): yes
Kernel has intf_cache member in usb_host_config: yes
Kernel has ep[] members in usb_device: yes
Kernel exports usb_set_configuration(): no
Units of USB_CTRL_GET_TIMEOUT: msec
Kernel has owner member in usb_driver: no
Kernel has put_page_testzero(): yes
Kernel has mutex method: yes
Kernel has wait_for_completion_interruptible: yes
Kernel has config.h: no
Kernel has ioctl32.h: no
IRQ handlers have pt_regs: no
Kernel has work_struct and delayed_work: yes
Kernel supports fault method in vm_operations_struct: yes
Kernel uses 'generated' dir: yes
Storing configuration in Makefile.in
If the values stored are incorrect they can be changed before running make.
Installing NI-KAL:
NI-KAL successfully updated.
Updating client modules:
make -C ../../../linux-2.6.34.7-0.5 O=/usr/src/linux-2.6.34.7-0.5-obj/i386/desktop/. modules
CC [M] /usr/local/natinst/nikal/src/client/gpibprtk-interface.o
/usr/local/natinst/nikal/src/client/gpibprtk-interface.c:20:31: fatal error: linux/autoconf.h: No such file or directory
compilation terminated.
make[4]: *** [/usr/local/natinst/nikal/src/client/gpibprtk-interface.o] Error 1
make[3]: *** [_module_/usr/local/natinst/nikal/src/client] Error 2
make[2]: *** [sub-make] Error 2
make[1]: *** [all] Error 2
make: *** [all] Error 2
ERROR: failed to build gpibprtk.ko
gpibprtk.ko failed to update.
Update of National Instruments drivers failed.
lab-server:/usr/local/bin #
I am new to OpenSUSE. So, any pointers would be appreciated. I still see the note about the KERNALHEADERS. Am I still missing something in setting up the installation environment?
Also, I've ran the install from a image, ni488225L.iso as instructed in the notes from the colleague who left. I am suspecting whether that's the cause of those gpibprk.ko errors. Right now, we had the GPIB-PCI card removed and wanted to use LAN for remote interface instead. Shall I uninstall the drivers from ni488225L.iso?
THANK YOU!
12-01-2010 09:25 AM
If you look at the readme for VISA 5.0 here: http://ftp.ni.com/support/softlib/visa/NI-VISA/5.0/linux/README.txt it states that it is only supported for OpenSUSE 11.1 & 11.2, so perhaps that is why you are seeing these issues.
12-01-2010 10:28 PM
Hassan is correct about the supported versions, which may explain why the install scripts did not work for you.
Is your system a 32-bit system with 4 GB of memory or more? If so, this is probably causing your problem. Take a look at the link below for more details. The title says "greater than 4 GB," but due to the way the memory is allocated, it applies to machines with 4 GB as well.
NI-KAL fails to load when I have greater than 4 GB of RAM
What type of interfaces will you be using with VISA on your machine (e.g. GPIB, Serial, TCP/IP, etc...)?
Thanks,
Jason S.
12-02-2010 12:17 AM
12-02-2010 11:29 AM
Thanks, JasonS. But my system has 2Gb RAM only. So, I don't think it's RAM related.
I'm trying to do a fresh install for OpenSUSE 11.2 per Hassan suggested.
Took me a while to get the iso image. I'll update and see if that works.
12-06-2010 03:26 PM
Did a fresh install of OpenSUSE 11.2, did all the make modules/prep_modules procedure per the README suggested, then re-run the INSTALL, things are working now.
Thanks!