Linux Users

cancel
Showing results for 
Search instead for 
Did you mean: 

gpibprtk kernel module

Installing NI-488.2 2.5.1 Beta:

I am having problems getting the gpibprtk module to load.  It is returning:

FATAL: Error inserting gpibprtk (/lib/modules/2.6.28-11-generic/kernel/natinst/ni4882/gpibprtk.ko): Unknown symbol in module, or unknown parameter (see dmesg)

Looking at dmesg:

[ 1654.348236] gpibprtk: no symbol version for _ZNK10nNIMBDC10030iConfigurationCompleteObserver20___CPPKRLDynamicCastEPKPv
[ 1654.348242] gpibprtk: Unknown symbol _ZNK10nNIMBDC10030iConfigurationCompleteObserver20___CPPKRLDynamicCastEPKPv
[ 1654.348379] gpibprtk: no symbol version for _ZN9nNIPAL17013nDeviceEvents27iObserverCancelPowerSuspendD2Ev

... and so on..

This was built with NIKAL 1.10 Beta and NIPAL 2.4 installed.

Has anyone else had similar issues?

Thanks.

0 Kudos
Message 1 of 13
(9,128 Views)

Hi Qbits.

Messages like "no symbol version" and "Unknown symbol" tell us that you may not have all the kernel modules loaded you need.  Does running `lsmod` show you the required kernel modules?

You may find running updateNIDrivers and rebooting solves the issue (or perhaps not.)  If that doesn't work, please attach the results of niSystemReport.

Troy

0 Kudos
Message 2 of 13
(4,849 Views)

Hi Troy,

Yes, after running updateNIDrivers that resolved the problem. I should have tried that from the start..

lsmod:

gpibprtk              261012  0
nipalk               1404528  1 gpibprtk
nikal                  68936  1 nipalk

However, when I try running gpibexplorer I get an error:

libnipalu.so failed to initialize
Perhaps you need to run updateNIDrivers
Aborted

And remember this is after I had already ran updateNIDrivers so I don't think that is an issue anymore.

This is looking at /usr/local/lib:

LabVIEW-8.0           libgpib.so.0            liblvrt.so.8.2
LabVIEW-8.2           libgpib.so.0.1.5        libnipalu.so
libgpibapi.so         liblvgpibconf.so        libnipalu.so.1
libgpibapi.so.2       liblvgpibconf.so.2      libnipalu.so.2
libgpibapi.so.2.5.1   liblvgpibconf.so.2.5.1  libnipalu.so.2.4.0
libgpibconf.so        liblvrtdark.so          libNiSpyLog.so
libgpibconf.so.2      liblvrtdark.so.8.0      libNiSpyLog.so.2
libgpibconf.so.2.5.1  liblvrtdark.so.8.2      libNiSpyLog.so.2.4.0
libgpib.la            liblvrt.so              linux
libgpib.so            liblvrt.so.8.0          python2.6

Following the symlink everything looks good:

/usr/local/lib/libnipalu.so  --> /usr/local/lib/libnipalu.so.2

/usr/local/lib/libnipalu.so.2 --> /usr/local/lib/libnipalu.so.2.4.0

/usr/local/lib/libnipalu.so.2.4.0 --> /usr/local/natinst/nipal/lib/libnipalu.so.2.4.0


This is from the system log:

May 14 14:40:38 linux-pc gpibexplorer: [libnipalu.so.2.4]  Warning: source/lib/linux/linLoadKern.cpp:168 - libKernelDriverLoad: Failed to open nipalk, errno: 2
May 14 14:40:38 linux-pc gpibexplorer: [libnipalu.so.2.4]  Warning: source/initcln/initcln.cpp:147 - Posix: Init kInitClnPackage: kernelDriver: failed! status=-50204
May 14 14:40:38 linux-pc gpibexplorer: [libnipalu.so.2.4]  Warning: source/package/posix/ulibEntry.cpp:199 - initialize: unable to load NI-PAL. status=-50204
May 14 14:40:57 linux-pc gpibintctrl: [libnipalu.so.2.4]  Warning: source/lib/linux/linLoadKern.cpp:168 - libKernelDriverLoad: Failed to open nipalk, errno: 2
May 14 14:40:57 linux-pc gpibintctrl: [libnipalu.so.2.4]  Warning: source/initcln/initcln.cpp:147 - Posix: Init kInitClnPackage: kernelDriver: failed! status=-50204
May 14 14:40:57 linux-pc gpibintctrl: [libnipalu.so.2.4]  Warning: source/package/posix/ulibEntry.cpp:199 - initialize: unable to load NI-PAL. status=-50204
May 14 15:20:10 linux-pc gpibtsw: [libnipalu.so.2.4]  Warning: source/lib/linux/linLoadKern.cpp:168 - libKernelDriverLoad: Failed to open nipalk, errno: 2
May 14 15:20:10 linux-pc gpibtsw: [libnipalu.so.2.4]  Warning: source/initcln/initcln.cpp:147 - Posix: Init kInitClnPackage: kernelDriver: failed! status=-50204
May 14 15:20:10 linux-pc gpibtsw: [libnipalu.so.2.4]  Warning: source/package/posix/ulibEntry.cpp:199 - initialize: unable to load NI-PAL. status=-50204

It appears it can't open or load nipalk.  This strange because it is shown running using lsmod.

Would you have any idea's why libnipalu.so is failing?

Thanks again.

Message was edited by: Qbits

0 Kudos
Message 3 of 13
(4,849 Views)

I think there are a couple of possibilities.  Indeed it looks like it is failing to load nipalk, or perhaps open /dev/nipalk.  Since lsmod shows nipalk is loaded then I think there are probably two possible reasons why it is failing:

1)  The version of nipalk.ko that is loaded is a different version from libnipalu.so

2)  The /dev/nipalk device node was never created

To check #1 I would run updateNIDrivers reboot and run niSystemReport and look through the output for nipalk.ko and libnipalu.  The niSystemReport should tell you the versions of both and they should match.  To check #2 I would run "ls -l /dev/nipalk" to see if it exists.

Shawn Bohrer

National Instruments

Use NI products on Linux? Come join the NI Linux Users Community
0 Kudos
Message 4 of 13
(4,849 Views)

Hello Shawn,

I should probably disclose that I am using this on a non-supported system (Ubuntu 9.04) and have been installing the software/modules manually by reading the scripts. This is why I'm having some problems.  But, I think its good practice to really understand what is being done to your system (especially in linux).  Once I understand how everything is fitting together I am planning on creating a native package to support this system.

I have confirmed that nipalk.so and nipalu.so are of the same version.  I also looked to verify the device was created and it was not and this appears to be the problem.  After doing some more digging I realized that the device is created in the init.d script.  I had been loading the module at startup and not invoking the init script.  What I did was to unload the gpibprtk and nipalk modules, and then invoke the init script with the start argument.  This caused the modules to load and the device to be created. 

There still seems to be a problem when running any of the gpib apps after I rebooted.  I have checked the system logs for any errors and did not see any.

Here is the device that was created:

crw-rw-rw- 1 root root 250, 0 2009-05-15 10:53 /dev/nipalk

Also, I've attached the niSystemReport output, a screen shot showing the error message, and one showing gipbexplorer running (there is a GPIB-USB-HS device attached).

Do you have any other suggestions that might help me resolve this issue?

Thanks,

Qbits

Download All
0 Kudos
Message 5 of 13
(4,849 Views)

OK, a quick update..   I found the problem was with the GPIB enumeration service startup script.  After changing it from #! /bin/sh to /bin/bash the service is able to start correctly.  I had to make this same change to the nipal startup script earlier.

My next hurdle is getting it to recogize I have the GPIB-USB-HS plugged it.

0 Kudos
Message 6 of 13
(4,849 Views)

Qbits wrote:

OK, a quick update..   I found the problem was with the GPIB enumeration service startup script.  After changing it from #! /bin/sh to /bin/bash the service is able to start correctly.  I had to make this same change to the nipal startup script earlier.

My next hurdle is getting it to recogize I have the GPIB-USB-HS plugged it.

Sorry I'm a little slow sometimes, but I just now thought about what you said here.  The GPIB-USB-HS is not supported on kernels 2.6.25 and newer because on these kernel the USB APIs were made GPL only.  I believe you are using kernel 2.6.28.  If you want to use the GPIB-USB-HS on this machine you may want to try the open source GPIB drivers from the Linux GPIB Package.

On a side note can you tell me what problem you had with the nipal startup script when it was #!/bin/sh?

Shawn Bohrer

National Instruments

Use NI products on Linux? Come join the NI Linux Users Community
0 Kudos
Message 7 of 13
(4,849 Views)

ShawnB. wrote:

On a side note can you tell me what problem you had with the nipal startup script when it was #!/bin/sh?

Ubuntu has been using dash as the default shell for a few years.

Joe Friedchicken
NI Configuration Based Software
Get with your fellow OS users
[ Linux ] [ macOS ]
Principal Software Engineer :: Configuration Based Software
Senior Software Engineer :: Multifunction Instruments Applications Group (until May 2018)
Software Engineer :: Measurements RLP Group (until Mar 2014)
Applications Engineer :: High Speed Product Group (until Sep 2008)
0 Kudos
Message 8 of 13
(4,849 Views)

Yep I know.  I thought we had fixed everything in the nipal startup script to make it dash compatible.  Of course we don't regularly test with dash as the shell so I'm not surprised something was broken, I'm just wondering what was broken.

Shawn Bohrer

Use NI products on Linux? Come join the NI Linux Users Community
0 Kudos
Message 9 of 13
(4,849 Views)

I think I just changed it to use dash as a precaution after I noticed it.  I just changed it back to sh and it loaded fine, so I do not think there is a problem with nipal, only gpib.

Thanks for the info.. I've been pulling my hair out trying to figure out what I was missing to get USB working.  So does this mean that all NI USB devices will not work with newer linux kernels?  I would think supporting USB would be essential simply because of how many you offer (GPIB, NI-DAQmx, etc..) and how widespread they are used.  I know that almost all of our test stations are now using USB interfaces.  My suggestion would be to use libusb for USB interfacing instead of going directly to the kernel.  I will look at the linux-gpib project, but would rather like to see NI supporting the hardware directly.

Thanks,

Qbits

0 Kudos
Message 10 of 13
(4,849 Views)