Hi,
Has anyone gotten the IOW SDK (latest) to compile with a recent kernel? On Fedora Core 5 I get the following error -- as if my usb headers are too new / different:
# uname -a
Linux xxxx 2.6.16-1.2111_FC5 #1 SMP Thu May 4 21:16:04 EDT 2006 x86_64 x86_64 x86_64 GNU/Linux
# rpm -q kernel libusb libusb-devel
kernel-2.6.16-1.2111_FC5
libusb-0.1.11-2.2
libusb-devel-0.1.11-2.2
# make
make -C /lib/modules/2.6.16-1.2111_FC5/build SUBDIRS=/home/martin/src/iow/LinuxSDK/Kernel_2.6/Driver modules
make[1]: Entering directory `/usr/src/kernels/2.6.16-1.2111_FC5-x86_64'
CC [M] /home/martin/src/iow/LinuxSDK/Kernel_2.6/Driver/iowarrior.o
/home/martin/src/iow/LinuxSDK/Kernel_2.6/Driver/iowarrior.c:166: error: unknown field ‘mode’ specified in initializer
/home/martin/src/iow/LinuxSDK/Kernel_2.6/Driver/iowarrior.c:173: error: unknown field ‘owner’ specified in initializer
/home/martin/src/iow/LinuxSDK/Kernel_2.6/Driver/iowarrior.c:173: warning: initialization from incompatible pointer type
/home/martin/src/iow/LinuxSDK/Kernel_2.6/Driver/iowarrior.c: In function ‘iowarrior_read’:
/home/martin/src/iow/LinuxSDK/Kernel_2.6/Driver/iowarrior.c:412: warning: format ‘%d’ expects type ‘int’, but argument 4 has type ‘size_t’
/home/martin/src/iow/LinuxSDK/Kernel_2.6/Driver/iowarrior.c: In function ‘iowarrior_ioctl’:
/home/martin/src/iow/LinuxSDK/Kernel_2.6/Driver/iowarrior.c:468: warning: ISO C90 forbids mixed declarations and code
make[2]: *** [/home/martin/src/iow/LinuxSDK/Kernel_2.6/Driver/iowarrior.o] Error 1
make[1]: *** [_module_/home/martin/src/iow/LinuxSDK/Kernel_2.6/Driver] Error 2
make[1]: Leaving directory `/usr/src/kernels/2.6.16-1.2111_FC5-x86_64'
make: *** [default] Error 2
Can anyone help?
iowarrior sdk doesn't compile with fedora kernel 2.6.16
Moderator: Guido Körber
-
- Posts: 543
- Joined: Mon Dec 01, 2003 6:09 pm
the .owner element has also been removed from struct usb_driver in Kernel 2.6.16 so you have to remove this line, too./home/martin/src/iow/LinuxSDK/Kernel_2.6/Driver/iowarrior.c:173: error: unknown field 'owner' specified in initializer
By the way :
As I see from the top of your post:
there are references to libusb .# rpm -q kernel libusb libusb-devel
kernel-2.6.16-1.2111_FC5
libusb-0.1.11-2.2
libusb-devel-0.1.11-2.2
If you intend to use libusb with the iowarrior there are two things you
have to keep in mind:
1. You don't need the Kernel-Module for the iowarrior if you use libusb . It will actually get in your way, so you have to call usb_detach_kernel_driver_np
to get access to the device.
2. If you're libusb-application is going to use more than one thread for reading and writing to the device, it will NOT work with the 0.1.xx release of libusb .
You will have to wait for the new libusb-API 1.0.x. But development in this area is progressing at the speed of a snail, so I doubt that we will even see an alpha-release this year. :-(
Eberhard
thanks for the hint about not needing the kernel module. I only quoted the versions of my libusb because the kernel module includes usb.h, which on fedora seems to be provided by the libusb packages I mentioned.
I am just trying to get some python code talking to the iow. I apologize for any/all these stupid questions.
1. Are there any existing rpms for fedora? I don't think so as all documentation says that only suse is supported.
2. Sounds like I should still try to build the kernel module -- am I missing some build documentation?
3. If not, where should I get the right version of jni.h? What is the right version? I ask because I've had to do this to get anything to start to compile:
a) install kdevelop & cmake
b) change all references to /usr/local/bin/cmake to the real location of cmake (fedora packages put it in /usr/bin/cmake)
c) change all references to /home/rom/iowkit to the directory wherein I've unpacked the SDK.zip (LinuxSDK/Kernel_2.6/iowkit).
Now I can get further but can't build iowkitjni.cpp since I lack jni.h. Is this provided by some java sdk?
Thanks,
Martin
I am just trying to get some python code talking to the iow. I apologize for any/all these stupid questions.
1. Are there any existing rpms for fedora? I don't think so as all documentation says that only suse is supported.
2. Sounds like I should still try to build the kernel module -- am I missing some build documentation?
3. If not, where should I get the right version of jni.h? What is the right version? I ask because I've had to do this to get anything to start to compile:
a) install kdevelop & cmake
b) change all references to /usr/local/bin/cmake to the real location of cmake (fedora packages put it in /usr/bin/cmake)
c) change all references to /home/rom/iowkit to the directory wherein I've unpacked the SDK.zip (LinuxSDK/Kernel_2.6/iowkit).
Now I can get further but can't build iowkitjni.cpp since I lack jni.h. Is this provided by some java sdk?
Thanks,
Martin
Hi Martin,
If you use libusb, you don't need the Kernel-module.
But since you want to use the Iowkit-library, you need the Kernel-Module too.
The include-file <linux/usb.h> is at /usr/src/linux/include/linux/usb.h. I
never ran Fedora, but since this file is part of the default Linux-Kernel I don't think you will need libusb at all.
no Suse-specific code int the Kernel-module or the Iowkit-Library. The
Library was developed on a Suse-System but as far as I know it is at least
used on Debian as well.
What's the compiler output?
(the 2 warnings can be ignored for now. The don't have any effect on the
functions of the module. I think they will be taken care of very soon by a
new release, because in 2 days the new Suse 10.1 will be available that
uses Kernel 2.6.16 like you do. So there will be a lot more users that run
into the same problems you have.
From the SDK you will actually need 2 files jni.h and jni_md.h
Descending from the directory where the Java-Sdk is installed
(on my machine it's at /usr/java/ but this depends on the installation)
these files are at jdk1.MajorVersion.MinorVersion/inlude/jni.h and
jdk1.MajorVersion.MinorVersion/inlude/linux/jni_md.h
You will have to copy these 2 files into your project, or at least copy them
into the src-directory of the IowKit-Library.
Hope that helps
Eberhard
Looks like you got me wrong.echion wrote: thanks for the hint about not needing the kernel module. I only quoted the versions of my libusb because the kernel module includes usb.h, which on fedora seems to be provided by the libusb packages I mentioned.
If you use libusb, you don't need the Kernel-module.
But since you want to use the Iowkit-library, you need the Kernel-Module too.
The include-file <linux/usb.h> is at /usr/src/linux/include/linux/usb.h. I
never ran Fedora, but since this file is part of the default Linux-Kernel I don't think you will need libusb at all.
There are no rpms for any plarform, sorry. But on the other hand, thereechion wrote: 1. Are there any existing rpms for fedora? I don't think so as all documentation says that only suse is supported.
no Suse-specific code int the Kernel-module or the Iowkit-Library. The
Library was developed on a Suse-System but as far as I know it is at least
used on Debian as well.
Yes, you have to build it! With the changes from the previous posts applyed, do you still have problems compiling?echion wrote: 2. Sounds like I should still try to build the kernel module -- am I missing some build documentation?
What's the compiler output?
(the 2 warnings can be ignored for now. The don't have any effect on the
functions of the module. I think they will be taken care of very soon by a
new release, because in 2 days the new Suse 10.1 will be available that
uses Kernel 2.6.16 like you do. So there will be a lot more users that run
into the same problems you have.
You will need the Java-SDK for Linux from Sun. (any version >=1.3 will do)echion wrote: 3. If not, where should I get the right version of jni.h? What is the right version? I ask because I've had to do this to get anything to start to compile:
a) install kdevelop & cmake
b) change all references to /usr/local/bin/cmake to the real location of cmake (fedora packages put it in /usr/bin/cmake)
c) change all references to /home/rom/iowkit to the directory wherein I've unpacked the SDK.zip (LinuxSDK/Kernel_2.6/iowkit).
From the SDK you will actually need 2 files jni.h and jni_md.h
Descending from the directory where the Java-Sdk is installed
(on my machine it's at /usr/java/ but this depends on the installation)
these files are at jdk1.MajorVersion.MinorVersion/inlude/jni.h and
jdk1.MajorVersion.MinorVersion/inlude/linux/jni_md.h
You will have to copy these 2 files into your project, or at least copy them
into the src-directory of the IowKit-Library.
Hope that helps
Eberhard