Linux Users

cancel
Showing results for 
Search instead for 
Did you mean: 

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

Alright, I don't speak any Spanish (that is Spanish right?) but I did recognize "sort: ... +1 ....".  Newer versions of the sort command do not support the +1 +2 syntax.  Newer versions of LabVIEW should have fixed this, but since you are using LabVIEW 8.2.1 there is probably a line somewhere like:

sort -t. +0 +1 +2 +3 +4 +5 +6 +7 +8 +9

That should be:

sort -t. -k 1 -k 2 -k 3 -k 4 -k 5 -k 6 -k 7 -k 8 -k 9 -k 10

Shawn Bohrer

National Instruments

Use NI products on Linux? Come join the NI Linux Users Community
0 Kudos
Message 11 of 42
(980 Views)

I want to install NI_KAL in Debian Lenny. From the ./INSTALL script installs every thing.

But when i m compileing nikal source it geives me few errors.

yogeshg:/usr/local/natinst/nikal/src# make

/bin/cp nikal.c objects/nikal.c
make -C /lib/modules/2.6.26-2-686/build SUBDIRS=/usr/local/natinst/nikal/src/objects modules
make[1]: Entering directory `/usr/src/linux-headers-2.6.26-2-686'
  CC   /usr/local/natinst/nikal/src/objects/nikal.o
/usr/local/natinst/nikal/src/objects/nikal.c:447: error: unknown field ‘nopage’ specified in initializer
/usr/local/natinst/nikal/src/objects/nikal.c:447: warning: initialization from incompatible pointer type
/usr/local/natinst/nikal/src/objects/nikal.c: In function ‘nNIKAL100_destroySemaphore’:
/usr/local/natinst/nikal/src/objects/nikal.c:2357: error: ‘nLinux_semaphore’ has no member named ‘sleepers’
/usr/local/natinst/nikal/src/objects/nikal.c: In function ‘nNIKAL100_releaseSemaphore’:
/usr/local/natinst/nikal/src/objects/nikal.c:2422: error: request for member ‘counter’ in something not a structure or union
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-headers-2.6.26-2-686'
make: *** [objects/nikal.ko] Error 2

What could be error. Need help regarding this.

I m attaching niSystemReport.out.gz

Thanks in Advance.

0 Kudos
Message 12 of 42
(980 Views)

You are using NI-KAL 1.8, try installiing NI-KAL 1.9 it should fix the problem.

Shawn Bohrer

National Instruments

Use NI products on Linux? Come join the NI Linux Users Community
0 Kudos
Message 13 of 42
(980 Views)

Hi,

i can confirm YogeshGaikwad's problem, also with NI-KAL 1.9 on Ubuntu 9.04 with Kernel 2.6.28-13 and gcc Ubuntu 4.3.3-5ubuntu4:

make -C /lib/modules/2.6.28-13-generic/build SUBDIRS=/usr/local/natinst/nikal/src/objects modules
make[1]: Entering directory `/usr/src/linux-headers-2.6.28-13-generic'
  CC   /usr/local/natinst/nikal/src/objects/nikal.o
/usr/local/natinst/nikal/src/objects/nikal.c: In function ânNIKAL100_getKernelPageTableEntryâ:
/usr/local/natinst/nikal/src/objects/nikal.c:1795: error: implicit declaration of function âpte_offsetâ
/usr/local/natinst/nikal/src/objects/nikal.c:1795: warning: assignment makes pointer from integer without a cast
/usr/local/natinst/nikal/src/objects/nikal.c: In function ânNIKAL100_mapUserPageTableEntryâ:
/usr/local/natinst/nikal/src/objects/nikal.c:1808: warning: return makes pointer from integer without a cast
/usr/local/natinst/nikal/src/objects/nikal.c: In function ânNIKAL100_getPhysicalAddressâ:
/usr/local/natinst/nikal/src/objects/nikal.c:1996: warning: assignment makes pointer from integer without a cast
/usr/local/natinst/nikal/src/objects/nikal.c: In function ânNIKAL100_loadDriverâ:
/usr/local/natinst/nikal/src/objects/nikal.c:4226: warning: format not a string literal and no format arguments
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-headers-2.6.28-13-generic'
make: *** [objects/nikal.ko] Error 2

I tried nikal1.8 with the same result. So, if never arrived to compile the module 'nikal' in nikal1.8 and nikal1.9.

Trying

#./INSTALL --nodeps

on nikal1.10b does not even enter the compilation process. Instead, the scripts claims to have finished installation even though this is not true. But a manual compilation is with SUCCESS, except for some warnings:

/bin/cp nikal.c objects/nikal.c
/bin/cp nikal.h objects/nikal.h
make -C /lib/modules/2.6.28-13-generic/build SUBDIRS=/usr/local/natinst/nikal/src/objects modules
make[1]: Entering directory `/usr/src/linux-headers-2.6.28-13-generic'
  CC   /usr/local/natinst/nikal/src/objects/nikal.o
/usr/local/natinst/nikal/src/objects/nikal.c: In function ânNIKAL100_loadDriverâ:
/usr/local/natinst/nikal/src/objects/nikal.c:4226: warning: format not a string literal and no format arguments
  Building modules, stage 2.
  MODPOST 1 modules
WARNING: modpost: module nikal.ko uses symbol 'init_mm' marked UNUSED
  CC      /usr/local/natinst/nikal/src/objects/nikal.mod.o
  LD   /usr/local/natinst/nikal/src/objects/nikal.ko

Afterwards,

#sudo make install

#sudo modprobe nikal

installs the module without problems.

The installation of NI-488.2-beta-2.5.1 was done without any problems. But it was necesary to sucessfully install nikal before, otherwise i could not install NI-488.2! The gpibexplorer shows the device properly> it is a NI PCI GPIB 488.2.

Then, i wanted to probe for the module gpibprtk:

#sudo modprobe gpibprtk

result:

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


The lines in /var/log/kern.log concerning this problem are attached. By the way, trying to access the gpib device via a simple labview program shows the same problem (probably since labview tries to load the module as well, when gpib routines are called in VIs).


Do you have any hints?

Many thanks, if you could help on this!

Manuel

Message was edited by: fahrer

Sorry for the double posting: When sending for the first time, the NI site reported a "fatal error". So i assumed, that the mesaage has not been posted.

0 Kudos
Message 14 of 42
(980 Views)

Hi,

i can confirm YogeshGaikwad's problem, also with NI-KAL 1.9 on Ubuntu 9.04 with Kernel 2.6.28-13 and gcc Ubuntu 4.3.3-5ubuntu4:

make -C /lib/modules/2.6.28-13-generic/build SUBDIRS=/usr/local/natinst/nikal/src/objects modules
make[1]: Entering directory `/usr/src/linux-headers-2.6.28-13-generic'
  CC   /usr/local/natinst/nikal/src/objects/nikal.o
/usr/local/natinst/nikal/src/objects/nikal.c: In function ânNIKAL100_getKernelPageTableEntryâ:
/usr/local/natinst/nikal/src/objects/nikal.c:1795: error: implicit declaration of function âpte_offsetâ
/usr/local/natinst/nikal/src/objects/nikal.c:1795: warning: assignment makes pointer from integer without a cast
/usr/local/natinst/nikal/src/objects/nikal.c: In function ânNIKAL100_mapUserPageTableEntryâ:
/usr/local/natinst/nikal/src/objects/nikal.c:1808: warning: return makes pointer from integer without a cast
/usr/local/natinst/nikal/src/objects/nikal.c: In function ânNIKAL100_getPhysicalAddressâ:
/usr/local/natinst/nikal/src/objects/nikal.c:1996: warning: assignment makes pointer from integer without a cast
/usr/local/natinst/nikal/src/objects/nikal.c: In function ânNIKAL100_loadDriverâ:
/usr/local/natinst/nikal/src/objects/nikal.c:4226: warning: format not a string literal and no format arguments
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-headers-2.6.28-13-generic'
make: *** [objects/nikal.ko] Error 2

I tried nikal1.8 with the same result. So, if never arrived to compile the kernel module 'nikal' in nikal1.8 and nikal1.9.

Trying

#sudo ./INSTALL --nodeps

on nikal1.10b does not even enter the compilation process. The script claims having finished the installation properly even though this is not true. But a manual compilation is with SUCCESS, except for some warnings:

/bin/cp nikal.c objects/nikal.c
/bin/cp nikal.h objects/nikal.h
make -C /lib/modules/2.6.28-13-generic/build SUBDIRS=/usr/local/natinst/nikal/src/objects modules
make[1]: Entering directory `/usr/src/linux-headers-2.6.28-13-generic'
  CC   /usr/local/natinst/nikal/src/objects/nikal.o
/usr/local/natinst/nikal/src/objects/nikal.c: In function ânNIKAL100_loadDriverâ:
/usr/local/natinst/nikal/src/objects/nikal.c:4226: warning: format not a string literal and no format arguments
  Building modules, stage 2.
  MODPOST 1 modules
WARNING: modpost: module nikal.ko uses symbol 'init_mm' marked UNUSED
  CC      /usr/local/natinst/nikal/src/objects/nikal.mod.o
  LD   /usr/local/natinst/nikal/src/objects/nikal.ko

Afterwards,

#sudo make install

#sudo modprobe nikal

installs the module without problems.

The installation of NI-488.2-beta-2.5.1 was done without any problems. But it was necesary to sucessfully install nikal before, otherwise i could not install NI-488.2! The gpibexplorer shows the device properly:It is a NI PCI GPIB tnt488.2.

Then, i wanted to probe for the module gpibprtk:

#sudo modprobe gpibprtk

result:

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

The lines in /var/log/kern.log containing the appropriate error messages are attached. By the way, trying to access the gpib bus via labview shows the same problem (probably since labview tries to load the module as well).

Thank you very much for any hint & help,

Manuel

0 Kudos
Message 15 of 42
(980 Views)

gpibprtk.ko is failing to load because it requires that nikal.ko and nipalk.ko are loaded.  In your case nipalk.ko is not loaded.  To load nipalk.ko you should run:

/etc/init.d/nipal start

Shawn Bohrer

National Instruments

Use NI products on Linux? Come join the NI Linux Users Community
0 Kudos
Message 16 of 42
(980 Views)

Thank you Shawn,

but this did not help. After doing like you posted and trying to load gpibprtk.ko afterwards, the result remains like this:

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

With

#ps aux | grep nipal

i checked, that nipal daemon really was running.

Manuel

0 Kudos
Message 17 of 42
(980 Views)

fahrer wrote:

Thank you Shawn,

but this did not help. After doing like you posted and trying to load gpibprtk.ko afterwards, the result remains like this:

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

It sounds like nipalk.ko failed to load.  Try running "/etc/init.d/nipal restart" are there any errors or messages?  If you then run "lsmod | grep nipalk" is it loaded?  If not run "dmesg" and check the end of the log are there any useful error messages?  Is nipalk.ko even present on your system?  You can check by running:

find /lib/modules/$(uname -r)/ -name "nipalk.ko"

If it isn't present on your system try running "updateNIDrivers".  Are there any error messages?  Do you see nipalk.ko in the list of modules updated?

Shawn Bohrer

National Instruments

Use NI products on Linux? Come join the NI Linux Users Community
0 Kudos
Message 18 of 42
(980 Views)

Thank you!

So,

#/etc/init.d/nipal restart

tells me, that it is used somewhere and cannot be unloaded.

WARNING: could not unload module nipalk from memory
Failed to unload nipalk because it is being used!

This command

#lsmod | grep nipalk

results in

nipalk               1302992  1
nikal                  68936  2 nipalk

After having tried this, dmesg and kern.log show no new (interesting) lines. Even not after trying to reload gpibprtk.

I checked, that nipalk.ko is on my system. But anyhw, i tried out updateNIdrivers to see, if there are any additional useful messages:

Configuring for linux kernel version 2.6.28-13-generic.

********************************* NOTE *********************************
Using kernel headers found in /lib/modules/2.6.28-13-generic/build.
If this does not correspond to the location of the 2.6.28-13-generic 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
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 kthread: 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

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

Uninstalling NI-KAL (nikal): WARNING: could not unload module nipalk from memory
done
/bin/rm -rf objects
Updating NI-KAL:
NI-KAL successfully updated.
Updating client modules:
WARNING: could not unload module nipalk from memory
nipalk.ko successfully updated.
gpibprtk.ko successfully updated.
Rebooting is required to ensure that National Instruments drivers
have been successfully updated.
Would you like to reboot now? [yes|no]

Except for the know error, there is nothing else of interest ? ...

Cheers,

Manuel

0 Kudos
Message 19 of 42
(980 Views)

Everything from that output looks normal to me.  Did you reboot the system?  Does gpibprtk.ko still fail to load?  If it still fails to load run "dmesg" and post some of the last lines from the output.

Shawn Bohrer

National Instruments

Use NI products on Linux? Come join the NI Linux Users Community
0 Kudos
Message 20 of 42
(980 Views)