Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

nikal on 2.6.17 kernel

I'm not able to install nikal-1.4.0f0 on a Fedora Core 5 i686 machine, with kernel 2.6.17-1.2174_FC5. I have kernel and kernel-devel, and additionally instaled kernel-2.6.17-1.2174_FC5.src.rpm. I'm stuck with updateNIDrivers dying on

make -C /lib/modules/2.6.17-1.2174_FC5/source SUBDIRS=/usr/local/natinst/nikal/src/objects modules
make[1]: Entering directory `/usr/src/kernels/2.6.17-1.2174_FC5-i686'
  CC [M]  /usr/local/natinst/nikal/src/objects/nikal.o
/usr/local/natinst/nikal/src/objects/nikal.c: In function ���nNIKAL100_decrementPageRefcount���:
/usr/local/natinst/nikal/src/objects/nikal.c:1854: error: ���nLinux_physicalPage��� has no member named ���count���
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/kernels/2.6.17-1.2174_FC5-i686'
make: *** [objects/nikal.ko] Error 2

which leaves me at odd, as nikal.c:1854 doesn't reference any "count", as far as I'm able to track.
Any hint? Anybody encountered similar problems?
Thanks in advance to anyone who can help,
Enrico
0 Kudos
Message 1 of 7
(5,070 Views)
Hi Enrico,

As you may know, NI-Kal is not officially supported on Fedora Core 5.

However, you may want to check out this thread for suggestions on trying to get it to work.

Hope this helps!

Adam W
Applications Engineering

0 Kudos
Message 2 of 7
(5,049 Views)
Hi Adam,

>As you may know, NI-Kal is not officially supported on Fedora Core 5.

I know, but...

>However, you may want to check out this thread for suggestions on trying to get it to work.

I must have overlooked it in my keyword search for nikal, kernel, etc. It indeed reports success with my very kernel. I'll see how the detailed instructions there solve my problem, and report if I find something remarkable.

Thanks a lot, Enrico
0 Kudos
Message 3 of 7
(5,037 Views)
Truly helpful, lots of thanks. It turned out that at the point I was, all I needed to do, as mentioned in the thread you linked, was just to change line 87 (same in nikal 1.4 as reported for 1.3) of /usr/local/natinst/nikal/src/nikal.c from

#define put_page_testzero(p)   atomic_dec_and_test(&(p)->count)

to

#define put_page_testzero(p)   atomic_dec_and_test(&(p)->_count)

and then to run updateNIdrivers and reboot. Optionally, a  chmod a+rw /dev/ttyS0 to start using the serial port as ordinary user.

Just for the record (I didn't find explicit mention, but I can conclude it from my result), as long as nikal was not properly installed (and loading of the relevant kernel module failed), every attempt to open VIs containing a VISA resource constant or control used to crash labview.

Delighted, Enrico
0 Kudos
Message 4 of 7
(5,013 Views)
Checking in in order to report a lot of troubles, and finally a solution found, with respect
to the problem reported in this thread, when upgrading to Labview 8.20.
Upgrading from 8.0 to 8.20 broke the me the nipal/nikal stuff which I previously
managed to make work, thanks essentially to the useful information found on the forum.

This happens, I suspect, also because of a loophole in the installers found on the
Fall 2006 PDS-Linux CD. Among the rest, NI-VISA installs before NI-488-2, but while
NI-VISA-4.0 installs nipali-1.11.1.f0.i386.rpm, NI-488-2.5.1 tries to install
nipali-1.11.0.f0.i386.rpm and fails there because it founds a more recent package.
In addition, there are the usual lines of code to patch here and there.

I needed several hours of frustrating attempts before soring out. What follows is a
purged list of the steps which should be needed after installing Labview from the disk
(#sh /media/LabVIEW-8.2-PDS/INSTALL), unless I forgot something. I add them here hoping
they may be useful to someone besides me.




-took the opportunity to upgrade the kernel to 2.6.18-1.2257.fc5, with yumex

-got kernel sources as described in NIDAQmx_HowTo.pdf (see thread
 http://forums.ni.com/ni/board/message?board.id=250&message.id=23429&view=by_date_ascending&page=1 )
 and more or less followed up to its steps 5-6

- #make gconfig (I don't have qt currently installed, but gtk);
 unchecked "use 4k"; make; make modules; make install; make modules_install
 instead of steps 7-10.

-several files version.h need to be patched to include UTS_RELEASE (some are links),
 otherwise the following will complain about nonmatching kernel sources:

   /usr/src/redhat/BUILD/kernel-2.6.18/linux-2.6.18.i686/include/linux/version.h
   /lib/modules/2.6.18-1.2257.fc5/build/include/linux/version.h

 become for me

   #define UTS_RELEASE "2.6.18-1.2257.fc5"
   #define LINUX_VERSION_CODE 132626
   #define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 😎 + (c))


- #rpm -e nipali nikali nipxirmi niorbi nidimi

- #sh /media/LabVIEW-8.2-PDS/NI-488-2.5.1/INSTALL  before NI-VISA/INSTALL

  still fails because of 2 errors in  /usr/local/natinst/nikal/src/objects/nikal.c

-patch /usr/local/natinst/nikal/src/nikal.c: with:

  Line 87: #define put_page_testzero(p)   atomic_dec_and_test(&(p)->_count)
  Line 1163:  vma->vm_flags |= VM_RESERVED | VM_LOCKED  | VM_DONTCOPY | VM_DONTEXPAND;

- #updateNIDrivers, still doesn't find nipxirmk-unversioned.o,
  niorbk-unversioned.o,  nidimk-unversioned.o (which have just been removed)

- #sh /media/LabVIEW-8.2-PDS/NI-VISA-4.0/INSTALL

-updateNIDrivers once more

-reboot

-finally it works! (labview VIs can have VISA references without crashing;
 visaconf, gpibexplorer gpibintctrl  gpibtsw exist and work, etc.


Enrico
Message 5 of 7
(4,818 Views)
Thanks for the post, Enrico!

I'm sure many others will be thankful in the future as well!

Adam W
Applications Engineering
National Instruments

0 Kudos
Message 6 of 7
(4,799 Views)
One note added passing by: I needed today to recompile the kernel in order to add one certain module, after the recompilation and reboot I couldn't updateNIDrivers again. Maybe this had to do with issueing a make clean in /usr/src/linux before that (I needed to reclaim disk space). However, tracing updateNIDrivers --> /usr/local/natinst/nikal/src/configure --> /usr/local/natinst/nikal/bin/install/installerUtility.sh, it turned out that I just needed to hack

ln -s /usr/src/kernels/2.6.18-1.2257.fc5-i686/include/asm/asm-offsets.h /lib/modules/2.6.18-1.2257.fc5/source/include/asm/

Ask no questions, it seems to work...
Enrico

Message Edited by Enrico Segre on 02-06-2007 09:46 AM

0 Kudos
Message 7 of 7
(4,677 Views)