Linux Users

cancel
Showing results for 
Search instead for 
Did you mean: 

Latest NI-KAL and dpkg- Possible Ubuntu/Debian support?

Shawn,

(yesterday, i was off)

After rebooting (AGAIN!), it worked! No error message any more when probing for module 'gpibprtk' and when accessing the bus via Labview. Reading and writing to/from the bus in Labview works as well.

So, i am agreeably surprised, since i am sure having tried installation and reboot several times. But anyhow: Hopefully, this story helps other readers in this forum and NI as well ...

And thanks a lot to you that you invest your time to help users even though Debian/Ubuntu is (not yet) supported by NI.

Best regards,

Manuel

0 Kudos
Message 21 of 42
(1,504 Views)

Continuing from my previous post at:- http://decibel.ni.com/content/message/7501#7501, I managed to convert all of the rpm files to deb using the alien -d *.rpm --scripts option. It seems like everything went OK, and also I can see nikal, nipal, gpibrtk loading at boot (yay!), but I get a huge bunch of errors at dmesg regarding nipxirtk. Here is the output from dmesg:-

[   36.338586] nikal: module license 'Copyright (c) 2002-2008 National Instruments Corporation.  All Rights Reserved.  Any and all use of the copyrighted materials is subject to the then current terms and conditions of the applicable license agreement, which can be found at <http://www.ni.com/linux/>.' taints kernel.
[   36.338807] Symbol usb_register_driver is being used by a non-GPL module, which will not be allowed in the future
[   36.338810] Please see the file Documentation/feature-removal-schedule.txt in the kernel source tree for more details.
[   36.339377] Symbol usb_deregister is being used by a non-GPL module, which will not be allowed in the future
[   36.339380] Please see the file Documentation/feature-removal-schedule.txt in the kernel source tree for more details.
[   36.459685] nipalk: no version for "nNIKAL100_unregisterPCIDriver" found: kernel tainted.
[   36.709519] usbcore: registered new interface driver ni488
[   37.222563] nipxirmk: Unknown symbol _ZTv0_n16_NK9nNIORB10010iCloneable20___CPPKRLDynamicCastEPKPv
[   37.222923] nipxirmk: Unknown symbol _ZNK9nNIORB1007tObject15getTObjectClassERl
[   37.223066] nipxirmk: Unknown symbol _ZN9nNIDIM10026iDeviceInterconnectManager11getInstanceERl
[   37.223300] nipxirmk: Unknown symbol _ZN9nNIDIM10020iReservationStrategyC2Ev
[   37.223443] nipxirmk: Unknown symbol _ZN9nNIDIM10022iInterconnectBusBridge20___CPPKRLDynamicCastEPKPv
[   37.223585] nipxirmk: Unknown symbol _ZN9nNIORB1007tObjectD2Ev
[   37.223882] nipxirmk: Unknown symbol _ZTv0_n16_NK9nNIDIM10020iReservationStrategy20___CPPKRLDynamicCastEPKPv
[   37.224014] nipxirmk: Unknown symbol _ZTv0_n16_N9nNIDIM10020iReservationStrategy20___CPPKRLDynamicCastEPKPv
[   37.224147] nipxirmk: Unknown symbol _ZTv0_n12_N9nNIORB10015iExternalizable20___CPPKRLDynamicCastEPKPv
[   37.224289] nipxirmk: Unknown symbol _ZN9nNIDIM10022iInterconnectBusBridge13___CPPKRLCastEPKS0_PKPv
[   37.224532] nipxirmk: Unknown symbol _ZTv0_n12_N9nNIDIM10020iReservationStrategy20___CPPKRLDynamicCastEPKPv
[   37.224675] nipxirmk: Unknown symbol _ZN9nNIDIM10020iReservationStrategyD2Ev
[   37.224808] nipxirmk: Unknown symbol _ZTv0_n16_N9nNIORB10024iCloneableExternalizable20___CPPKRLDynamicCastEPKPv
[   37.224954] nipxirmk: Unknown symbol _ZNK9nNIORB10024iCloneableExternalizable20___CPPKRLDynamicCastEPKPv
[   37.225196] nipxirmk: Unknown symbol _ZTv0_n20_NK9nNIDIM10020iReservationStrategy20___CPPKRLDynamicCastEPKPv
[   37.225329] nipxirmk: Unknown symbol _ZTv0_n16_NK9nNIDIM10022iInterconnectBusBridge20___CPPKRLDynamicCastEPKPv
[   37.225543] nipxirmk: Unknown symbol _ZN9nNIORB10020tClassImplementationD1Ev
[   37.225796] nipxirmk: Unknown symbol _ZN9nNIDIM10022iInterconnectBusBridgeC2Ev
[   37.226000] nipxirmk: Unknown symbol _ZN9nNIDIM10020iReservationStrategy13___CPPKRLCastEPKS0_PKPv
[   37.226142] nipxirmk: Unknown symbol _ZN9nNIORB10010iCloneableD2Ev
[   37.226347] nipxirmk: Unknown symbol _ZNK9nNIDIM10020iReservationStrategy20___CPPKRLDynamicCastEPKPv
[   37.226607] nipxirmk: Unknown symbol _ZTv0_n12_N9nNIORB10024iCloneableExternalizable20___CPPKRLDynamicCastEPKPv
[   37.226750] nipxirmk: Unknown symbol _ZN9nNIDIM10031tInterconnectBusEndpointFactory21createBySystemAddressERKN4_STL12basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEERlS9_P7iDeviceRK7tSSGUIDS9_
[   37.226896] nipxirmk: Unknown symbol _ZN9nNIORB10015iExternalizableD2Ev
[   37.227102] nipxirmk: Unknown symbol _ZNK9nNIDIM10022iInterconnectBusBridge20___CPPKRLDynamicCastEPKPv
[   37.227236] nipxirmk: Unknown symbol _ZTv0_n16_NK9nNIORB10015iExternalizable20___CPPKRLDynamicCastEPKPv
[   37.227382] nipxirmk: Unknown symbol _ZNK9nNIORB10010iCloneable20___CPPKRLDynamicCastEPKPv
[   37.227622] nipxirmk: Unknown symbol _ZNK9nNIORB10015iExternalizable20___CPPKRLDynamicCastEPKPv
[   37.227875] nipxirmk: Unknown symbol _ZN9nNIORB10024iCloneableExternalizableD2Ev
[   37.228008] nipxirmk: Unknown symbol _ZTv0_n16_NK9nNIORB10024iCloneableExternalizable20___CPPKRLDynamicCastEPKPv
[   37.228141] nipxirmk: Unknown symbol _ZTv0_n12_N9nNIDIM10022iInterconnectBusBridge20___CPPKRLDynamicCastEPKPv
[   37.228274] nipxirmk: Unknown symbol _ZTv0_n12_N9nNIORB10010iCloneable20___CPPKRLDynamicCastEPKPv
[   37.228512] nipxirmk: Unknown symbol _ZN9nNIORB1007tObjectaSERKS0_
[   37.228852] nipxirmk: Unknown symbol _ZN9nNIDIM10020iReservationStrategy20___CPPKRLDynamicCastEPKPv
[   37.228995] nipxirmk: Unknown symbol _ZN9nNIORB10024iCloneableExternalizable20___CPPKRLDynamicCastEPKPv
[   37.229138] nipxirmk: Unknown symbol _ZN9nNIORB10020tClassImplementationC1ERKN4_STL12basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEPFPNS_7tObjectERlEPFvSB_SC_EPKPv
[   37.229284] nipxirmk: Unknown symbol _ZN9nNIORB10010iCloneable20___CPPKRLDynamicCastEPKPv
[   37.229426] nipxirmk: Unknown symbol _ZN9nNIDIM10022iInterconnectBusBridgeD2Ev
[   37.229569] nipxirmk: Unknown symbol _ZN9nNIORB10015iExternalizable20___CPPKRLDynamicCastEPKPv
[   37.229731] nipxirmk: Unknown symbol _ZN9nNIORB1007tObjectC2Ev
[   37.229874] nipxirmk: Unknown symbol _ZN9nNIDIM10031tInterconnectBusEndpointFactory7destroyERPNS_24iInterconnectBusEndpointERl
[   37.230193] nipxirmk: Unknown symbol _ZTv0_n20_NK9nNIORB10024iCloneableExternalizable20___CPPKRLDynamicCastEPKPv

Output from grepping the modules loaded:-

anshul@sagarika:/lib/modules$ lsmod | grep ni
nipalk               1422608  3 gpibprtk
nikal                  79552  3 nipalk
usbcore               146412  5 nikal,usbhid,uhci_hcd,ehci_hcd
anshul@sagarika:/lib/modules$

I connected my GPIB-USB HS adapter and I was able to start gpibexplorer and edit the device, so I guess GPIB is taken care of. Now to figure out this huge mess of messages

0 Kudos
Message 22 of 42
(1,504 Views)

Anshul,

did you already manage to talk to your GPIB device? Because from my experience, it is still a difference whether one can see the device in the gpibexplorer or really talk to instruments hanging in the bus.

Concerning the messages:

1) I don't know about the "tainted kernel" messages. But i would not worry too much, if everything really works.

2) Do you really need PXI? Since NI-VISA package comes with plenty of NI drivers, there will be more drivers installed than really needed. So, maybe you want to disable nipxirmk?

Manuel

0 Kudos
Message 23 of 42
(1,504 Views)

All of those "Unknown symbol" messages simply mean that nipxirmk is looking for exported functions but can't find them.  This usually means that nipxirmk is expecting some other kernel modules to be loaded and to provide those functions.  By looking at the function names I can see that niorbk.ko and nidimk.ko are the kernel modules that are missing.

I'm actually a little surprised converting the rpms to deb packages with alien worked as well as it did.  Did you just install the deb package by hand after you converted them?  Normally each rpm requires an extra step to build the kernel module so for niorb, and nidim you should need to run something like:

. /usr/local/natinst/.nicore/bin/nidimiInstallerUtility.sh

nidimiPostInstall

. /usr/local/natinst/.nicore/bin/niorbiInstallerUtility.sh

niorbiPostInstall

You may want to run updateNIDrivers and reboot, but I'm guessing that will fix your missing symbols problem.

Shawn Bohrer

National Instruments

Use NI products on Linux? Come join the NI Linux Users Community
0 Kudos
Message 24 of 42
(1,504 Views)

Shawn,

Thanks for the tip, I'm gonna try it on my Ubuntu box tomorrow. Regarding the installation procedure- yes, I did convert each and every rpm to deb using the alien -d *.rpm --scripts command. Now I didn't using VISA 4.5, but VISA 4.4, and it did work...well atleast some of it did Also, I used NIKAL 1.9 instead of the newer NIKAL, because it doesn't go ahead if dpkg is found in the system. So, I had to use an older one.

The good things about Ubuntu 8.04 are- 1)  It is supported upto 3 years...2011 2) It takes care of the usbcore-GPIB-USB adapter as the kernel version is 2.6.24 and not 2.6.25 which locked out GPIB-USB-HS. Therefore I'm in the middle of evaluating Ubuntu as a possible candidate in addition to Mandriva and/or Opensuse. The IT guys in my company keep giving me a tough time about being the only non-Ubuntu guy around at work

-Anshul

0 Kudos
Message 25 of 42
(1,504 Views)

Nope, no luck with your suggestion. I still get the missing symbols errors. I have nipalk and nikal modules installed:-

anshulj@sagarika:~$ lsmod | grep ni
nipalk               1422608  1
nikal                  79552  2 nipalk
usbcore               146412  4 nikal,ehci_hcd,uhci_hcd

But none of the nipxi, niorb, nidmi etc modules installed. I am at my wits end...did you guys conjure up some magic juice on your Ubuntu installs to get VISA working ?

0 Kudos
Message 26 of 42
(1,504 Views)

So it looks like you are still missing the nidimk.ko and niorbk.ko kernel modules.  Can you run the following two commands and post the output?

find /usr/local/natinst/nikal/etc/clientkdb/

find /lib/modules/$(uname -r)/kernel/natinst/

I'm really just trying to confirm that those modules didn't get setup correctly.

Shawn Bohrer

National Instruments

Use NI products on Linux? Come join the NI Linux Users Community
0 Kudos
Message 27 of 42
(1,504 Views)

Shawn,

You're right, I am missing those modules. The question is how to get them installed. The script doesn't do anything at all useful for me to install them.

anshulj@sagarika:~$ find /usr/local/natinst/nikal/etc/clientkdb/

/usr/local/natinst/nikal/etc/clientkdb/
/usr/local/natinst/nikal/etc/clientkdb/nicore
/usr/local/natinst/nikal/etc/clientkdb/nicore/nidimk-unversioned.o
/usr/local/natinst/nikal/etc/clientkdb/nipxi
/usr/local/natinst/nikal/etc/clientkdb/nipxi/nipxirmk-unversioned.o
/usr/local/natinst/nikal/etc/clientkdb/vxipnp
/usr/local/natinst/nikal/etc/clientkdb/vxipnp/NiViPxiK-unversioned.o
/usr/local/natinst/nikal/etc/clientkdb/vxipnp/NiViPciK-unversioned.o
/usr/local/natinst/nikal/etc/clientkdb/nipal
/usr/local/natinst/nikal/etc/clientkdb/nipal/nipalk-unversioned.o

anshulj@sagarika:~$ find /lib/modules/$(uname -r)/kernel/natinst/
/lib/modules/2.6.24-24-generic/kernel/natinst/
/lib/modules/2.6.24-24-generic/kernel/natinst/nicore
/lib/modules/2.6.24-24-generic/kernel/natinst/nicore/nidimk.ko
/lib/modules/2.6.24-24-generic/kernel/natinst/nipxi
/lib/modules/2.6.24-24-generic/kernel/natinst/nipxi/nipxirmk.ko
/lib/modules/2.6.24-24-generic/kernel/natinst/vxipnp
/lib/modules/2.6.24-24-generic/kernel/natinst/vxipnp/NiViPciK.ko
/lib/modules/2.6.24-24-generic/kernel/natinst/vxipnp/NiViPxiK.ko
/lib/modules/2.6.24-24-generic/kernel/natinst/nikal
/lib/modules/2.6.24-24-generic/kernel/natinst/nikal/nikal.ko
/lib/modules/2.6.24-24-generic/kernel/natinst/nipal
/lib/modules/2.6.24-24-generic/kernel/natinst/nipal/nipalk.ko
anshulj@sagarika:~

0 Kudos
Message 28 of 42
(1,504 Views)

Seems like I might be getting close. I tinkered with NI-VISA 4.4 and used the --no-rpm option, after manually converting each rpm to a deb using alien. After installing all of the deb files, I ran the script as sudo ./INSTALL --no-rpm. The installer picked cpio over rpm, and configured the kernel modules. I rebooted and got this at dmesg:-

[   36.660505] nikal: module license 'Copyright (c) 2002-2008 National Instruments Corporation.  All Rights Reserved.  Any and all use of the copyrighted materials is subject to the then current terms and conditions of the applicable license agreement, which can be found at <http://www.ni.com/linux/>.' taints kernel.
[   36.660728] Symbol usb_register_driver is being used by a non-GPL module, which will not be allowed in the future
[   36.660730] Please see the file Documentation/feature-removal-schedule.txt in the kernel source tree for more details.
[   36.661268] Symbol usb_deregister is being used by a non-GPL module, which will not be allowed in the future
[   36.661270] Please see the file Documentation/feature-removal-schedule.txt in the kernel source tree for more details.
[   36.861149] nipalk: no version for "nNIKAL100_unregisterPCIDriver" found: kernel tainted.

The only thing that concerns me is the "[   36.861149] nipalk: no version for "nNIKAL100_unregisterPCIDriver" found: kernel tainted.". I am using it on my laptop and not a desktop..so could it be due to that? Also, using Shawn's commands as in the post above:-

anshulj@sagarika:~/Desktop$ find /usr/local/natinst/nikal/etc/clientkdb/
/usr/local/natinst/nikal/etc/clientkdb/
/usr/local/natinst/nikal/etc/clientkdb/nicore
/usr/local/natinst/nikal/etc/clientkdb/nicore/nidimk-unversioned.o
/usr/local/natinst/nikal/etc/clientkdb/nicore/niorbk-unversioned.o
/usr/local/natinst/nikal/etc/clientkdb/nipxi
/usr/local/natinst/nikal/etc/clientkdb/nipxi/nipxirmk-unversioned.o
/usr/local/natinst/nikal/etc/clientkdb/vxipnp
/usr/local/natinst/nikal/etc/clientkdb/vxipnp/NiViPxiK-unversioned.o
/usr/local/natinst/nikal/etc/clientkdb/vxipnp/NiViPciK-unversioned.o
/usr/local/natinst/nikal/etc/clientkdb/nipal
/usr/local/natinst/nikal/etc/clientkdb/nipal/nipalk-unversioned.o
anshulj@sagarika:~/Desktop$ find /lib/modules/$(uname -r)/kernel/natinst/
/lib/modules/2.6.24-24-generic/kernel/natinst/
/lib/modules/2.6.24-24-generic/kernel/natinst/nicore
/lib/modules/2.6.24-24-generic/kernel/natinst/nicore/nidimk.ko
/lib/modules/2.6.24-24-generic/kernel/natinst/nicore/niorbk.ko
/lib/modules/2.6.24-24-generic/kernel/natinst/nipxi
/lib/modules/2.6.24-24-generic/kernel/natinst/nipxi/nipxirmk.ko
/lib/modules/2.6.24-24-generic/kernel/natinst/vxipnp
/lib/modules/2.6.24-24-generic/kernel/natinst/vxipnp/NiViPciK.ko
/lib/modules/2.6.24-24-generic/kernel/natinst/vxipnp/NiViPxiK.ko
/lib/modules/2.6.24-24-generic/kernel/natinst/ni4882
/lib/modules/2.6.24-24-generic/kernel/natinst/ni4882/gpibprtk.ko
/lib/modules/2.6.24-24-generic/kernel/natinst/nikal
/lib/modules/2.6.24-24-generic/kernel/natinst/nikal/nikal.ko
/lib/modules/2.6.24-24-generic/kernel/natinst/nipal
/lib/modules/2.6.24-24-generic/kernel/natinst/nipal/nipalk.ko
anshulj@sagarika:~/Desktop$

Seems like everything's in order...am I right?

Now a quick observation, NI-VISA 4.5 does not have a --no-rpm option...4.4 has that. I find that this option is far more suitable as compared to the --nodeps option, as it allows the user to go ahead with the installation using cpio and also configures the kernel modules. This would be extremely useful for Debian and Gentoo based systems.

0 Kudos
Message 29 of 42
(1,504 Views)

anshuljain wrote:

Shawn,

You're right, I am missing those modules. The question is how to get them installed. The script doesn't do anything at all useful for me to install them.

anshulj@sagarika:~$ find /usr/local/natinst/nikal/etc/clientkdb/

...
/usr/local/natinst/nikal/etc/clientkdb/nicore/nidimk-unversioned.o
...

anshulj@sagarika:~$ find /lib/modules/$(uname -r)/kernel/natinst/
...
/lib/modules/2.6.24-24-generic/kernel/natinst/nicore/nidimk.ko
...

Actually from this output you now have nidimk.ko installed, but you are still missing niorbk.ko.  Previously your were missing both.  Let me briefly explain how this is supposed to work.  Each NI rpm will install a script named <rpmBaseName>InstallerUtility.sh so for example niorbi-1.8.0-f0.rpm installs /usr/local/natinst/.nicore/bin/niorbiInstallerUtility.sh.  After installing each rpm the INSTALL script will source each of these scripts and then run <rpmBaseName>PostInstall.  For example with niorbi-1.8.0-f0.rpm

. /usr/local/natinst/.nicore/bin/niorbiInstallerUtility.sh

niorbiPostInstall

You can find all of these NI scripts with:

find /usr/local/natinst/ -name "*InstallerUtility.sh"

This post install script may do a variety of things.  Some NI rpms contain kernel modules which are formed named something like <moduleName>-unversioned.o  These "unversioned" modules must be versioned against your current kernel and the post install script should perform that step.  updateNIDrivers will also perform this versioning step for all unversioned modules it finds in:

/usr/local/natinst/nikal/etc/clientkdb/

The post install script is supposed to create a symbolic link in the /usr/local/natinst/nikal/etc/clientkdb/ directory that points to the *-unversioned.o module.  On your system it looks like this link was never created for niorbk-unversioned.o and I'm not sure why.

Shawn Bohrer

National Instruments

Use NI products on Linux? Come join the NI Linux Users Community
0 Kudos
Message 30 of 42
(1,504 Views)