09-17-2008 11:40 PM
I am trying to install the Ni-Visa but the modules fail to compile into my kernel.....
I am using 2.6.26 kernel Version.
Can somebody help me a bit ?
the installation output is here:
Configuring for linux kernel version 2.6.26-gentoo-r1.
********************************* NOTE *********************************
Using kernel headers found in /lib/modules/2.6.26-gentoo-r1/source.
If this does not correspond to the location of the 2.6.26-gentoo-r1 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
Storing configuration in Makefile.in
If the values stored are incorrect they can be changed before running make.
Uninstalling NI-KAL (nikal): done
/bin/rm -rf objects
Updating NI-KAL:
NI-KAL update failed.
/bin/cp nikal.c objects/nikal.c
/bin/cp nikal.h objects/nikal.h
make -C /lib/modules/2.6.26-gentoo-r1/source SUBDIRS=/usr/local/natinst/nikal/src/objects modules
make[1]: Entering directory `/usr/src/linux-2.6.26-gentoo-r1'
CC [M] /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:2355: 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:2420: 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-2.6.26-gentoo-r1'
make: *** [objects/nikal.ko] Error 2
ERROR: make of nikal kernel module failed, not installing kernel module.
updateNIDrivers should be called again after fixing the problem.
Logging failure...
Include the file /tmp/niSystemReport.out.gz when contacting
National Instruments for support.
and the niSystemReport :
09-19-2008 04:06 PM
modules compiles fine with kernels (gentoo-sources) :
09-22-2008 02:15 PM
Hello,
NI VISA 4.4 for Linux requires one of the following distributions : Mandriva 2008, Mandriva 2007, openSUSE 10.3, openSUSE 10.2, Red Hat Enterprise Linux Desktop, Red Hat Enterprise Linux WS 4. This info can be found in the NI VISA 4.4.0 readme file. I do not know why other kernals compile. I will try and find a work-around for you.
10-06-2008 05:06 PM
Hi,
It only works with kernel 2.6.22 and below.
12-03-2008 05:46 PM
We just released NI-KAL 1.9 which should compile on kernels up to 2.6.27. We also just created a new Linux Users community where we can post announcements of new releases, and everyone can create tutorials and content on the wiki-like interface.
Shawn Bohrer
National Instruments
12-04-2008 06:08 AM
It failed compiling on my 2.6.25 gentoo kernel. I've attached the system report as well.
=====
/bin/cp nikal.c objects/nikal.c
/bin/cp nikal.h objects/nikal.h
make -C /lib/modules/2.6.25-gentoo-r7/source SUBDIRS=/usr/natinst/nikal/src/objects modules
make[1]: Entering directory `/usr/src/linux-2.6.25-gentoo-r7'
CC [M] /usr/natinst/nikal/src/objects/nikal.o
Building modules, stage 2.
MODPOST 1 modules
WARNING: "init_mm" [/usr/natinst/nikal/src/objects/nikal.ko] undefined!
CC /usr/natinst/nikal/src/objects/nikal.mod.o
LD [M] /usr/natinst/nikal/src/objects/nikal.ko
make[1]: Leaving directory `/usr/src/linux-2.6.25-gentoo-r7'
Installing NI-KAL (nikal): Starting NI-KAL failed!
make: *** [install] Error 1
======
12-04-2008 09:12 AM
Um, have you applied additional kernel patches to your kernel? I just took a peek in on my gentoo system where I still have 2.6.25-gentoo-r6 hanging around and init_mm is still defined and exported in:
arch/x86/kernel/init_task.c
So unless you have applied a patch that unexports init_mm I'm not sure why it is failing. P.S. your niSystemReport shows you are still using NI-KAL 1.8 instead of 1.9, but it shouldn't matter unless you want to run newer kernels.
Shawn Bohrer
National Instruments
12-04-2008 10:06 AM
Hi,
I'm using the default gentoo-sources. I have that file too and init_mm is defined there:
struct mm_struct init_mm = INIT_MM(init_mm);
I'm not sure why it's complaining.
PS. is ni-kal updated for newer kernels as well?
12-04-2008 10:43 AM
does your file have:
struct mm_struct init_mm = INIT_MM(init_mm);
EXPORT_UNUSED_SYMBOL(init_mm); /* will be removed in 2.6.26 */
It is actually the EXPORT_UNUSED_SYMBOL(init_mm) part that is important as that lets external kernel modules see the symbol.
hamid.ohadi wrote:PS. is ni-kal updated for newer kernels as well?
NI-KAL 1.9 should compile against kernels 2.6.27 and older.
Shawn Bohrer
National Instruments
12-04-2008 11:51 AM
Hi,
Kernel headers are OK. I've found that the INSTALL script is not actually doing anything! Reading the INSTALL script it seems like I need to have either dpkg or rpm. is that correct?