Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

ERROR: GPL-incompatible module nikal.ko uses GPL-only symbol 'usb_unlink_urb'

Another problem in getting the PCI-GPIB card running under openSuSE 11.0 and the "2.6.25.5-1.1-pae" kernel.

After fixing the problem with the wrong gcc version number and finding that in the /usr/local/natinst/src/nikal.c the SA_INTERRUPT variable has been replaced by IRQF_DISABLED and SA_SHIRQ has been replaced with IRQF_SHARED,I am now stuck on the follwing error.

The following shows up when I try and update the driver using "updateNIDrivers":
...
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.25.5-1.1-pae/source SUBDIRS=/usr/local/natinst/nikal/src/objects modules
make[1]: Entering directory `/usr/src/linux-2.6.25.5-1.1'
  CC [M]  /usr/local/natinst/nikal/src/objects/nikal.o
  Building modules, stage 2.
  MODPOST 1 modules
FATAL: modpost: GPL-incompatible module nikal.ko uses GPL-only symbol 'usb_unlink_urb'
make[2]: *** [__modpost] Error 1
make[1]: *** [modules] Error 2
make[1]: Leaving directory `/usr/src/linux-2.6.25.5-1.1'
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.

Any help would be most appreciated.
0 Kudos
Message 1 of 6
(14,999 Views)
Hi,
 
It appears as though the module creation has come across an issue when trying to use the function to unlink the urb (Linux USB communication protocol) which is leading you to these issues. Sadly as OpenSuSE 11.0 is currently unsupported by National Instruments I am unable to offer you further support regarding the NI-KAL issues you are having, I'm sure this is something R&D will come across during testing if OpenSuSE 11.0 is due for linux support by National Instruments.
 
Sorry I can't be of more help, it looks like a fairly final error to get from the shared objects
All the best,
Applications Engineer
0 Kudos
Message 2 of 6
(14,986 Views)
Hi,

I am having the same problem on openSuSE11.0. Just wondering if anyone found the solution yet?

Thanks
0 Kudos
Message 3 of 6
(14,777 Views)
I don't know of a solution and to be honest I believe its down to the NI guys to fix that little license conflict. There is a nasty fix which works, but I am not sure how many rules its breaking. So only as an academic exercise:

If you were to look in the right C file(s), I believe it may be called nikal.c, and change the definition of the MODULE_LICENSE variable from the NI blurb to "GPL", then that may fool the installation process into thinking that the software is actually GPL and not some encumbered piece of NI software.

Just a thought and no guarantees given.
Since NI supports openSUSE 10.3 it can only be hoped that they will move on and support its successor soon.
0 Kudos
Message 4 of 6
(14,758 Views)

This problem will not go away, as the NI driver with a GPL-incompatible license uses kernel symbols that are marked usable only by GPL licensed code. The error the OP sees is to stop a license violation. According to the commit (more than 6 months ago now)

 

http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=782e70c6fc2290a0395850e8e02583b8b62264d8 

 

"Over two years ago, the Linux USB developers stated that they believed
there was no way to create a USB kernel driver that was not under the
GPL.  This patch moves the USB apis to enforce that decision."

 

So even in 2006 the NIKAL module already violated the license as it was understood by the Linux kernel developers, even though it was not yet enforced.

 

Which leads to the following question: Why is this NIKAL module necessary at all?  It seems to me that libusb allows all of this to be done in userspace, without requiring any kernel modules at all.

Message 5 of 6
(14,571 Views)

@cryotak wrote:

If you were to look in the right C file(s), I believe it may be called nikal.c, and change the definition of the MODULE_LICENSE variable from the NI blurb to "GPL", then that may fool the installation process into thinking that the software is actually GPL and not some encumbered piece of NI software.

That would be an direct and intentional license infringement, thus terminating the license immediately. NI then would loose the right to use the Linux kernel as a whole.

 

Seems they just decided just killing any Linux support for their usb devices (at least legally correct).

 

Looks like few pieces of information on how to talk to these devices must be some military-level secret, as important as nuclear launch keys, so they don't even dare to hand out libusb-based userland driver binaries ...

Linux Embedded / Kernel Hacker / BSP / Driver development / Systems engineering
0 Kudos
Message 6 of 6
(8,362 Views)