05-23-2013 11:46 AM
See log below... any idea?
(The grep error in the first line of configure output is afaik harmless and can be ignored, I checked in the source. It comes from installerUtility.sh line 314. version.h has moved in 3.8 to include/generated/uapi/linux/version.h; if the file is not found, the check if the kernel headers correspond to the correct kernel version is just skipped in the installer. (good.) nikal configure is cleverer in figuring out the kernel version.)
measurement nikal # LANG=C ./configure
/bin/grep: /lib/modules/3.8.13-gentoo/source/include/linux/version.h: No such file or directory
Configuring for linux kernel version 3.8.13-gentoo.
********************************* NOTE *********************************
Using kernel headers found in /lib/modules/3.8.13-gentoo/source.
If this does not correspond to the location of the 3.8.13-gentoo 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 *********************************
/usr/bin/expr: syntax error
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
Kernel has chained SGL support: 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 has ioremap_wc: yes
Kernel has pgprot_writecombine: yes
Storing configuration in Makefile.in
If the values stored are incorrect they can be changed before running make.
measurement nikal # LANG=C make
CC
/usr/local/natinst/nikal/src/nikal/nikal.c: In function 'nNIKAL220_registerDeviceInterfaceCommon':
/usr/local/natinst/nikal/src/nikal/nikal.c:1163:7: warning: format '%d' expects argument of type 'int', but argument 5 has type 'size_t' [-Wformat]
/usr/local/natinst/nikal/src/nikal/nikal.c: In function 'nNIKAL100_mmap':
/usr/local/natinst/nikal/src/nikal/nikal.c:1993:24: error: 'VM_RESERVED' undeclared (first use in this function)
/usr/local/natinst/nikal/src/nikal/nikal.c:1993:24: note: each undeclared identifier is reported only once for each function it appears in
/usr/local/natinst/nikal/src/nikal/nikal.c: In function 'nNIKAL190_vmaPageFaultHandler':
/usr/local/natinst/nikal/src/nikal/nikal.c:2148:11: error: 'VM_CAN_NONLINEAR' undeclared (first use in this function)
/usr/local/natinst/nikal/src/nikal/nikal.c: In function 'nNIKAL220_vmaPageFaultHandler':
/usr/local/natinst/nikal/src/nikal/nikal.c:2161:11: error: 'VM_CAN_NONLINEAR' undeclared (first use in this function)
/usr/local/natinst/nikal/src/nikal/nikal.c: In function 'nNIKAL100_remapPageRange':
/usr/local/natinst/nikal/src/nikal/nikal.c:2625:22: error: 'VM_RESERVED' undeclared (first use in this function)
/usr/local/natinst/nikal/src/nikal/nikal.c: In function 'nNIKAL100_doMMap':
/usr/local/natinst/nikal/src/nikal/nikal.c:2658:4: error: implicit declaration of function 'do_mmap' [-Werror=implicit-function-declaration]
/usr/local/natinst/nikal/src/nikal/nikal.c: In function 'nNIKAL100_enumeratePCIBuses':
/usr/local/natinst/nikal/src/nikal/nikal.c:3818:43: error: 'nLinux_pciBus' has no member named 'secondary'
/usr/local/natinst/nikal/src/nikal/nikal.c: In function 'nNIKAL220_vmaPageFaultHandler':
/usr/local/natinst/nikal/src/nikal/nikal.c:2162:1: warning: control reaches end of non-void function [-Wreturn-type]
/usr/local/natinst/nikal/src/nikal/nikal.c: In function 'nNIKAL190_vmaPageFaultHandler':
/usr/local/natinst/nikal/src/nikal/nikal.c:2149:1: warning: control reaches end of non-void function [-Wreturn-type]
cc1: some warnings being treated as errors
make[2]: *** [/usr/local/natinst/nikal/src/nikal/nikal.o] Error 1
make[1]: *** [_module_/usr/local/natinst/nikal/src/nikal] Error 2
make: *** [all] Error 2
measurement nikal #
I'll write a longer post about the experience of trying to install VISA and DAQmxBase on Gentoo, but for now this is the main point where I'm stuck...
05-23-2013 11:49 AM
For the record, this is nikali-2.3.0-f0 from the NI-DAQmx Base 3.6.0-f0 ISO file.
05-24-2013 08:23 AM
I re-based the patch from https://decibel.ni.com/content/message/51362 on NI-KAL-2.3.1 (there are some intermediary commits missing, it does not apply cleanly because the context changed). This takes care of all the VM_* symbols. Here are the remaining errors:
measurement nikal # LANG=C make
CC
/usr/local/natinst/nikal/src/nikal/nikal.c: In function 'nNIKAL220_registerDeviceInterfaceCommon':
/usr/local/natinst/nikal/src/nikal/nikal.c:1166:7: warning: format '%d' expects argument of type 'int', but argument 5 has type 'size_t' [-Wformat]
/usr/local/natinst/nikal/src/nikal/nikal.c: In function 'nNIKAL100_doMMap':
/usr/local/natinst/nikal/src/nikal/nikal.c:2661:4: error: implicit declaration of function 'do_mmap' [-Werror=implicit-function-declaration]
/usr/local/natinst/nikal/src/nikal/nikal.c: In function 'nNIKAL100_enumeratePCIBuses':
/usr/local/natinst/nikal/src/nikal/nikal.c:3821:43: error: 'nLinux_pciBus' has no member named 'secondary'
cc1: some warnings being treated as errors
make[2]: *** [/usr/local/natinst/nikal/src/nikal/nikal.o] Error 1
make[1]: *** [_module_/usr/local/natinst/nikal/src/nikal] Error 2
make: *** [all] Error 2
measurement nikal #
05-24-2013 08:52 AM
Next step. Given the following commit
I suspect the fix for the pcibus structure should be (disclaimer, I am no kernel hacker and don't really know what I am doing)
measurement nikal # diff -ruN src.orig src
diff -ruN src.orig/nikal/nikal.c src/nikal/nikal.c
--- src.orig/nikal/nikal.c 2013-05-19 09:21:53.694994655 +0200
+++ src/nikal/nikal.c 2013-05-19 09:46:24.528886569 +0200
@@ -3818,7 +3818,7 @@
}
}
pciBusInformation.primary = bus->primary;
- pciBusInformation.secondary = bus->secondary;
+ pciBusInformation.secondary = bus->busn_res.start;
(*visitor)(visitorArgument, &pciBusInformation);
}
measurement nikal #
Indeed that builds and we're down to one fatal error.
measurement nikal # LANG=C make
CC
/usr/local/natinst/nikal/src/nikal/nikal.c: In function 'nNIKAL220_registerDeviceInterfaceCommon':
/usr/local/natinst/nikal/src/nikal/nikal.c:1166:7: warning: format '%d' expects argument of type 'int', but argument 5 has type 'size_t' [-Wformat]
/usr/local/natinst/nikal/src/nikal/nikal.c: In function 'nNIKAL100_doMMap':
/usr/local/natinst/nikal/src/nikal/nikal.c:2661:4: error: implicit declaration of function 'do_mmap' [-Werror=implicit-function-declaration]
cc1: some warnings being treated as errors
make[2]: *** [/usr/local/natinst/nikal/src/nikal/nikal.o] Error 1
make[1]: *** [_module_/usr/local/natinst/nikal/src/nikal] Error 2
make: *** [all] Error 2
measurement nikal #
05-24-2013 10:33 AM
Kudos for being very resourceful, and you've been sharing your findings/methods so others can benefit as well. Thanks man!
Here are some files from the latest nikal 2.4 beta (it's not released yet till later this year).. Looks like this can help you make progress for now. Please use the release version later though.
Replace those files in your /usr/local/natinst/nikal folder and do updateNIDriver
It should work.. unless I forgot to attach some other files for you to use.. Please post your finding here.
Thanks again!
05-24-2013 11:19 AM
measurement nikal # make
CC
Building modules, stage 2.
MODPOST 1 modules
CC /usr/local/natinst/nikal/src/nikal/nikal.mod.o
LD
measurement nikal #
Builds fine! Thanks!
This is for now just a vmware virtual machine without any hardware attached (so I can easily return to "clean snapshots"). Some other stuff still needs fixing (init scripts for gentoo etc), but that is doable from here. I'll post more once I run it with some real instrument.