Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

fedora 9 compile problem

I'm trying to compile ni4882-2.5.4b1-release.tar.gz on my Fedora 9 x86_64 system. (Yes, I know NI doesn't support this officially.) I get these errors:

 

 make -C /lib/modules/2.6.26.3-29.fc9.x86_64/source SUBDIRS=/usr/local/natinst/nikal/src/objects modules
make[1]: Entering directory `/usr/src/kernels/2.6.26.3-29.fc9.x86_64'
  CC [M]  /usr/local/natinst/nikal/src/objects/nikal.o
/usr/local/natinst/nikal/src/objects/nikal.c:441: error: unknown field ‘nopage’ specified in initializer
/usr/local/natinst/nikal/src/objects/nikal.c:441: 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:2331: 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:2396: error: request for member ‘counter’ in something not a structure or union
/usr/local/natinst/nikal/src/objects/nikal.c: In function ‘nNIKAL100_registerPCIDriver’:
/usr/local/natinst/nikal/src/objects/nikal.c:2802: error: ‘nLinux_pciDriver’ has no member named ‘enable_wake’
/usr/local/natinst/nikal/src/objects/nikal.c: In function ‘nNIKAL100_reserveInterrupt’:
/usr/local/natinst/nikal/src/objects/nikal.c:4114: error: ‘SA_INTERRUPT’ undeclared (first use in this function)
/usr/local/natinst/nikal/src/objects/nikal.c:4114: error: (Each undeclared identifier is reported only once
/usr/local/natinst/nikal/src/objects/nikal.c:4114: error: for each function it appears in.)
/usr/local/natinst/nikal/src/objects/nikal.c:4114: error: ‘SA_SHIRQ’ undeclared (first use in this function)
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.26.3-29.fc9.x86_64'
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.

 

 

Is this problem fixable?

 

- Mike

0 Kudos
Message 1 of 11
(6,467 Views)

Howdy avtechmjc,

 

Unfortunately, you are correct that this is not a supported distribution of Linux.  Additionally, it looks like it is a 64 bit archecture, which we have no plans in the future to support according to www.ni.com/linux.   I hope someone else is able to offer you some additional advice, and you are more than welcome to submit a product suggestion at our Product Suggestion Center.  The more of these we get, the better case we have for developing support for the other distributions of Linux.  I'm sorry I can't be of more help at this point.  Good luck!

Sincerely,

Chris G in AE
0 Kudos
Message 2 of 11
(6,448 Views)

Hi,

 

the same error messages also occure if you use a 32bit Fedora core 9 system.

The reason is that in the latest kernel there were changes to some of the source files that are referenced by nikal.

Some structures have changed and therefore the structures inside nikal.c do not match which causes all these errors.

For example the "nopage" error comes from the structure nLinux_vmOperations which is of the type vm_operations_struct.

This comes from /usr/src/kernels/2.6.27.5-37.fc9.i686/include/linux/mm.h and the definition looks like that:

 

 struct vm_operations_struct {
        void (*open)(struct vm_area_struct * area);
        void (*close)(struct vm_area_struct * area);
        int (*fault)(struct vm_area_struct *vma, struct vm_fault *vmf);
        unsigned long (*nopfn)(struct vm_area_struct *area,
                        unsigned long address);

        /* notification that a previously read-only page is about to become
         * writable, if an error is returned it will cause a SIGBUS */
        int (*page_mkwrite)(struct vm_area_struct *vma, struct page *page);

        /* called by access_process_vm when get_user_pages() fails, typically
         * for use by special VMAs that can switch between memory and hardware
         */
        int (*access)(struct vm_area_struct *vma, unsigned long addr,
                      void *buf, int len, int write);

 

 So the current patches for Kernel 2.6.24 do not meet the requirements that are needed to compile with Kernel 2.6.26.

 

Question: is there already a patch to use with Kernel 2.6.26 and up or is there any plan/schedule to provide such a thing? This problem would also occure with other Linux distributions like OpenSuse 11 and so on that make use of Kernels higher than 2.6.24...

 

regards

Mario

0 Kudos
Message 3 of 11
(6,257 Views)

Mario--

 

This is very interesting.  I have not heard of this issue with our supported versions of Linux.  Which version of NI-KAL are you using?  The latest version of NI-KAL is v1.8--this could help if you are not already using this version.

 

Cheers!

--
Tyler C

0 Kudos
Message 4 of 11
(6,212 Views)

Hi,

 

many thanks for the answer and the hints.

I updated to NIKAL1.8 and now i get few error messages:

 

 /bin/cp nikal.c objects/nikal.c
/bin/cp nikal.h objects/nikal.h
make -C /lib/modules/2.6.27.5-37.fc9.i686/source SUBDIRS=/usr/local/natinst/nikal/src/objects modules
make[1]: Entering directory `/usr/src/kernels/2.6.27.5-37.fc9.i686'
  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/kernels/2.6.27.5-37.fc9.i686'
make: *** [objects/nikal.ko] Error 2

 

So the basic problem remains the same.

Did you have success installing the environment on a standard OpenSuse11 ?

 

regards

Mario

0 Kudos
Message 5 of 11
(6,205 Views)

Hey Mario,

 

NI-KAL 1.9 fixes these issues, and will add support for openSUSE 11.0 and Mandriva 2009.  I can't say exactly when NI-KAL 1.9 will be available, but we are in the final stages of testing so hopefully it shouldn't be too much longer.

 

Shawn Bohrer

National Instruments

Use NI products on Linux? Come join the NI Linux Users Community
Message 6 of 11
(6,191 Views)

Many thanks for the information.

Hence NIKAL1.9 is available i will try also on Fedora Core9 and post my results here.

Maybe you can write a short post here when it is released.

 

Regards

Mario

0 Kudos
Message 7 of 11
(6,184 Views)

NI-KAL 1.9 is now available here.  You may also be interested in joining our new Linux Users community where we can make new announcements of releases, and create tutorials etc.

 

Shawn Bohrer

National Instruments

Use NI products on Linux? Come join the NI Linux Users Community
0 Kudos
Message 8 of 11
(6,062 Views)

Hi,

 

i am happy to tell you that communication via GPIB works now with fedora core 9 and kernel 2.6.27.

I installed:

NI-KAL 1.9

NI 488.2

NI VISA 4.4

 

Visa is able to access the PCI-GPIB card and can communicate with the connected measurement devices.

 

What currently does not work is a GPIB-USB-B adapter.

It is detected by the USB host and shown when typing lsusb but nothing happens. Neither the adapter is initialized nor it can be detected using the tools.

But to be honest i did not check the forum for further information so far.

 

regards

Mario

0 Kudos
Message 9 of 11
(6,022 Views)

The GPIB-USB-B, and GPIB-USB-HS will not work on kernels 2.6.25 and newer because the kernel's USB APIs are now only accessable from GPL licensed kernel modules and NI-488.2 is not a GPL licensed kernel module.  If you need to use this hardware you have three options:

 

1. Use a kernel < 2.6.25

2. You could try using the open source driver http://linux-gpib.sourceforge.net/

3. You could wait for a version of NI-488.2 that resolves this issue (note: I have no idea if this is coming, so in the short term I would recommend 1 or 2)

 

Shawn Bohrer

National Instruments
Use NI products on Linux? Come join the NI Linux Users Community
0 Kudos
Message 10 of 11
(6,013 Views)