Missing hcd.h file

Hi

I hope this is the correct forum for this. If not, apologies.

I have openSuse 11.0 32-bit installed, using kernel 2.6.25.20-0.1-pae i686 (why not i586???). I am trying to run a make file to install a usb device server, but get the following errors:

In file included from /opt/Quatech/NuportLinuxClientRelease1.11/drivers/vhci_sysfs.c:24:
/opt/Quatech/NuportLinuxClientRelease1.11/drivers/vhci.h:24:20: error: /lib/modules/2.6.25.20-0.1-pae/build/drivers/usb/core/hcd.h: No such file or directory
In file included from /opt/Quatech/NuportLinuxClientRelease1.11/drivers/vhci_sysfs.c:24:
/opt/Quatech/NuportLinuxClientRelease1.11/drivers/vhci.h:133: warning: ‘struct usb_hcd’ declared inside parameter list
/opt/Quatech/NuportLinuxClientRelease1.11/drivers/vhci.h:133: warning: its scope is only this definition or declaration, which is probably not what you want
/opt/Quatech/NuportLinuxClientRelease1.11/drivers/vhci.h: In function ‘hcd_to_vhci’:
/opt/Quatech/NuportLinuxClientRelease1.11/drivers/vhci.h:135: error: dereferencing pointer to incomplete type
/opt/Quatech/NuportLinuxClientRelease1.11/drivers/vhci.h: In function ‘vhci_to_hcd’:
/opt/Quatech/NuportLinuxClientRelease1.11/drivers/vhci.h:140: error: dereferencing pointer to incomplete type
/opt/Quatech/NuportLinuxClientRelease1.11/drivers/vhci.h:140: warning: type defaults to ‘int’ in declaration of ‘__mptr’
/opt/Quatech/NuportLinuxClientRelease1.11/drivers/vhci.h:140: error: invalid use of undefined type ‘struct usb_hcd’
/opt/Quatech/NuportLinuxClientRelease1.11/drivers/vhci.h: In function ‘vhci_dev’:
/opt/Quatech/NuportLinuxClientRelease1.11/drivers/vhci.h:145: error: dereferencing pointer to incomplete type
make[4]: *** [/opt/Quatech/NuportLinuxClientRelease1.11/drivers/vhci_sysfs.o] Error 1
make[3]: *** [_module_/opt/Quatech/NuportLinuxClientRelease1.11/drivers] Error 2
make[2]: *** [sub-make] Error 2
make[1]: *** [all] Error 2
make[1]: Leaving directory `/usr/src/linux-2.6.25.20-0.1-obj/i386/pae'
make: *** [default] Error 2

I have searched around a variety of sites but cannot get an answer which will let me install the software I need.

Can anyone help?

First of all, do you have the kernel-source and kernel-syms packages installed?

If you do, does the directory /lib/modules/2.6.25.20-0.1-pae contain a symlink called build and does that symlink lead to a path in /usr/src/?

To view the contents of the directory and the symlink; ls -l /lib/modules/2.6.25.20-0.1-pae/

And you most likely have i586 kernel, not i686.

Hi

OK, I’ve done as you asked. there is no “build” symlink. I’ll have a go at creating one (I’ve found where it should point to), but I’d apprecaite some guidance to make sure I’m on the right track.

The build symlink is automatically created if you have the kernel-syms package installed - please install that package ( and make sure you have the kernel-source installed as well! )

Do not manually create it.

I’ve got kernel-source and kernel-syms installed but no build symlink.


rpm -qa "*kernel*"

gives?

And a link to the program you want to build might also be a good idea, so that we know what we are dealing with.

I get the following:

linux-rmct:~ # rpm -qa "*kernel*"
kernel-pae-2.6.25.20-0.1
kernel-default-2.6.25.20-0.1
linux-kernel-headers-2.6.25-8.1
kernel-debug-2.6.25.20-0.1
kernel-xen-2.6.25.20-0.1
kernel-syms-2.6.25.20-0.1
kernel-source-2.6.25.20-0.1

I am trying to build a driver program for a USB device server from Quantech (a USB-500NAS). The device is to plug into an ethernet port on a router and allow USB devices to be shared over a network.

It’s not critical - I got it working under Windows (the project PC) but I’d like to get this issue resolved.

First of all remove all unnecessary kernel-flavors you don’t need (xen and default as you are using pae, you most certainly don’t need them), secondly, post a link to the program (as I told you).

If your output in #1 is complete, your problem is not missing kernel-sources (there would be another error much earlier).


find /lib/modules -iname "build" 

Sorry - forgot the link - here it is

http://www.quatech.com/ManualsDriversFirmware/Communication/USBN-500NAS-Linux.zip

How do I remove the unneccessary kernels? I’m a bit wary of doing that…!

the "find /lib/… “build” returns

find /lib/modules -iname "build"
/lib/modules/2.6.25.20-0.1-debug/build
/lib/modules/2.6.25.20-0.1-xen/build
/lib/modules/2.6.25.20-0.1-lockdep/build
/lib/modules/2.6.25.20-0.1-default/build

What should I do next?

Remove the respective packages via YaST.

Why? You are not using them (you use kernel-pae), so what should happen?

Anything at it’s place, your build environment is fine, the problem is in the source itsself.

vhci.h:24:20: error: /lib/modules/2.6.25.20-0.1-pae/build/drivers/usb/core/hcd.h: No such file or directory

Line 24 of vhci.h is this one:


#include <linux/platform_device.h>
**#include HCD_HEADER **

#define VHCI_DEVICE_INFO_SIZE 80

This definition seems to be faulty, definition is made in Makefile:


HCD_HEADER:=$(KSOURCE)/drivers/usb/core/hcd.h

What returns:


find /usr/src/ -iname "*hcd.h*"

OK, I’ve removed the extra kernels, rebooted and everything seems OK - thanks for that.

The output of

find /usr/src/ -name "*hcd.h*"

is

/usr/src/linux-2.6.25.20-0.1/drivers/usb/host/uhci-hcd.h
/usr/src/linux-2.6.25.20-0.1/drivers/usb/core/hcd.h
/usr/src/linux-2.6.25.20-0.1-obj/i386/pae/drivers/usb/core/hcd.h
/usr/src/linux-2.6.25.20-0.1-obj/i386/pae/include/config/usb/ehci/hcd.h
/usr/src/linux-2.6.25.20-0.1-obj/i386/pae/include/config/usb/arch/has/hcd.h
/usr/src/linux-2.6.25.20-0.1-obj/i386/pae/include/config/usb/sl811/hcd.h
/usr/src/linux-2.6.25.20-0.1-obj/i386/pae/include/config/usb/ohci/hcd.h
/usr/src/linux-2.6.25.20-0.1-obj/i386/pae/include/config/usb/isp116x/hcd.h
/usr/src/linux-2.6.25.20-0.1-obj/i386/pae/include/config/usb/r8a66597/hcd.h
/usr/src/linux-2.6.25.20-0.1-obj/i386/pae/include/config/usb/uhci/hcd.h
/usr/src/linux-2.6.25.20-0.1-obj/i386/lockdep/include/config/usb/ehci/hcd.h
/usr/src/linux-2.6.25.20-0.1-obj/i386/lockdep/include/config/usb/arch/has/hcd.h
/usr/src/linux-2.6.25.20-0.1-obj/i386/lockdep/include/config/usb/sl811/hcd.h
/usr/src/linux-2.6.25.20-0.1-obj/i386/lockdep/include/config/usb/ohci/hcd.h
/usr/src/linux-2.6.25.20-0.1-obj/i386/lockdep/include/config/usb/isp116x/hcd.h
/usr/src/linux-2.6.25.20-0.1-obj/i386/lockdep/include/config/usb/r8a66597/hcd.h
/usr/src/linux-2.6.25.20-0.1-obj/i386/lockdep/include/config/usb/uhci/hcd.h
/usr/src/linux-2.6.25.20-0.1-obj/i386/default/include/config/usb/ehci/hcd.h
/usr/src/linux-2.6.25.20-0.1-obj/i386/default/include/config/usb/arch/has/hcd.h
/usr/src/linux-2.6.25.20-0.1-obj/i386/default/include/config/usb/sl811/hcd.h
/usr/src/linux-2.6.25.20-0.1-obj/i386/default/include/config/usb/ohci/hcd.h
/usr/src/linux-2.6.25.20-0.1-obj/i386/default/include/config/usb/isp116x/hcd.h
/usr/src/linux-2.6.25.20-0.1-obj/i386/default/include/config/usb/r8a66597/hcd.h
/usr/src/linux-2.6.25.20-0.1-obj/i386/default/include/config/usb/uhci/hcd.h
/usr/src/linux-2.6.25.20-0.1-obj/i386/xen/include/config/usb/ehci/hcd.h
/usr/src/linux-2.6.25.20-0.1-obj/i386/xen/include/config/usb/arch/has/hcd.h
/usr/src/linux-2.6.25.20-0.1-obj/i386/xen/include/config/usb/sl811/hcd.h
/usr/src/linux-2.6.25.20-0.1-obj/i386/xen/include/config/usb/ohci/hcd.h
/usr/src/linux-2.6.25.20-0.1-obj/i386/xen/include/config/usb/isp116x/hcd.h
/usr/src/linux-2.6.25.20-0.1-obj/i386/xen/include/config/usb/r8a66597/hcd.h
/usr/src/linux-2.6.25.20-0.1-obj/i386/xen/include/config/usb/uhci/hcd.h
/usr/src/linux-2.6.25.20-0.1-obj/i386/debug/include/config/usb/ehci/hcd.h
/usr/src/linux-2.6.25.20-0.1-obj/i386/debug/include/config/usb/arch/has/hcd.h
/usr/src/linux-2.6.25.20-0.1-obj/i386/debug/include/config/usb/sl811/hcd.h
/usr/src/linux-2.6.25.20-0.1-obj/i386/debug/include/config/usb/ohci/hcd.h
/usr/src/linux-2.6.25.20-0.1-obj/i386/debug/include/config/usb/isp116x/hcd.h
/usr/src/linux-2.6.25.20-0.1-obj/i386/debug/include/config/usb/r8a66597/hcd.h
/usr/src/linux-2.6.25.20-0.1-obj/i386/debug/include/config/usb/uhci/hcd.h

Hope this helps.

I really appreciate all of the help - how did you get to be so knowledgeable?

change


#include HCD_HEADER

in “drivers/vhci.h” to

#include <config/usb/uhci/hcd.h>

OK - but now I get this error:


linux-rmct:/opt/Quatech/NuportLinuxClientRelease1.11/drivers # make
make -C /lib/modules/2.6.25.20-0.1-pae/build LANG=C KBUILD_VERBOSE=1  SUBDIRS=`pwd` modules
make: *** /lib/modules/2.6.25.20-0.1-pae/build: No such file or directory.  Stop.
make: *** [default] Error 2

I’ve obviously changed something - but what? And how do I change it back?

You must have uninstalled kernel-source and/or kernel-syms as well, otherwise this file would be found.

No, they were installed. I’m refreshing them just now. I’ll post a reply when I’ve done that.

Ok, the refresh worked, but I still get errors:

linux-rmct:/opt/Quatech/NuportLinuxClientRelease1.11/drivers # make
make -C /lib/modules/2.6.25.20-0.1-pae/build LANG=C KBUILD_VERBOSE=1  SUBDIRS=`pwd` modules
make[1]: Entering directory `/usr/src/linux-2.6.25.20-0.1-obj/i386/pae'
make -C /usr/src/linux-2.6.25.20-0.1 O=/usr/src/linux-2.6.25.20-0.1-obj/i386/pae/. modules
make -C /usr/src/linux-2.6.25.20-0.1-obj/i386/pae \
        KBUILD_SRC=/usr/src/linux-2.6.25.20-0.1 \
        KBUILD_EXTMOD="/opt/Quatech/NuportLinuxClientRelease1.11/drivers" -f /usr/src/linux-2.6.25.20-0.1/Makefile \
        modules
test -e include/linux/autoconf.h -a -e include/config/auto.conf || (            \
        echo;                                                           \
        echo "  ERROR: Kernel configuration is invalid.";               \
        echo "         include/linux/autoconf.h or include/config/auto.conf are missing.";      \
        echo "         Run 'make oldconfig && make prepare' on kernel src to fix it.";  \
        echo;                                                           \
        /bin/false)
mkdir -p /opt/Quatech/NuportLinuxClientRelease1.11/drivers/.tmp_versions ; rm -f /opt/Quatech/NuportLinuxClientRelease1.11/drivers/.tmp_versions/*
make -f /usr/src/linux-2.6.25.20-0.1/scripts/Makefile.build obj=/opt/Quatech/NuportLinuxClientRelease1.11/drivers
  gcc -Wp,-MD,/opt/Quatech/NuportLinuxClientRelease1.11/drivers/.vhci_sysfs.o.d  -nostdinc -isystem /usr/lib/gcc/i586-suse-linux/4.3/include -D__KERNEL__ -Iinclude -Iinclude2 -I/usr/src/linux-2.6.25.20-0.1/include -include include/linux/autoconf.h  -I/opt/Quatech/NuportLinuxClientRelease1.11/drivers -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Werror-implicit-function-declaration -Os -fno-stack-protector -m32 -msoft-float -mregparm=3 -freg-struct-return -mpreferred-stack-boundary=2 -march=i586 -mtune=generic -ffreestanding -DCONFIG_AS_CFI=1 -DCONFIG_AS_CFI_SIGNAL_FRAME=1 -pipe -Wno-sign-compare -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -I/usr/src/linux-2.6.25.20-0.1/include/asm-x86/mach-generic -Iinclude/asm-x86/mach-generic -I/usr/src/linux-2.6.25.20-0.1/include/asm-x86/mach-default -Iinclude/asm-x86/mach-default -fno-omit-frame-pointer -fno-optimize-sibling-calls -fasynchronous-unwind-tables -Wdeclaration-after-statement -Wno-pointer-sign -DHCD_HEADER=\"/lib/modules/2.6.25.20-0.1-pae/build/drivers/usb/core/hcd.h\" -DMODULE -D"KBUILD_STR(s)=#s" -D"KBUILD_BASENAME=KBUILD_STR(vhci_sysfs)"  -D"KBUILD_MODNAME=KBUILD_STR(mos8140)" -c -o /opt/Quatech/NuportLinuxClientRelease1.11/drivers/.tmp_vhci_sysfs.o /opt/Quatech/NuportLinuxClientRelease1.11/drivers/vhci_sysfs.c
In file included from /opt/Quatech/NuportLinuxClientRelease1.11/drivers/vhci_sysfs.c:24:
/opt/Quatech/NuportLinuxClientRelease1.11/drivers/vhci.h:134: warning: ‘struct usb_hcd’ declared inside parameter list
/opt/Quatech/NuportLinuxClientRelease1.11/drivers/vhci.h:134: warning: its scope is only this definition or declaration, which is probably not what you want
/opt/Quatech/NuportLinuxClientRelease1.11/drivers/vhci.h: In function ‘hcd_to_vhci’:
/opt/Quatech/NuportLinuxClientRelease1.11/drivers/vhci.h:136: error: dereferencing pointer to incomplete type
/opt/Quatech/NuportLinuxClientRelease1.11/drivers/vhci.h: In function ‘vhci_to_hcd’:
/opt/Quatech/NuportLinuxClientRelease1.11/drivers/vhci.h:141: error: dereferencing pointer to incomplete type
/opt/Quatech/NuportLinuxClientRelease1.11/drivers/vhci.h:141: warning: type defaults to ‘int’ in declaration of ‘__mptr’
/opt/Quatech/NuportLinuxClientRelease1.11/drivers/vhci.h:141: error: invalid use of undefined type ‘struct usb_hcd’
/opt/Quatech/NuportLinuxClientRelease1.11/drivers/vhci.h: In function ‘vhci_dev’:
/opt/Quatech/NuportLinuxClientRelease1.11/drivers/vhci.h:146: error: dereferencing pointer to incomplete type
make[4]: *** [/opt/Quatech/NuportLinuxClientRelease1.11/drivers/vhci_sysfs.o] Error 1
make[3]: *** [_module_/opt/Quatech/NuportLinuxClientRelease1.11/drivers] Error 2
make[2]: *** [sub-make] Error 2              

What next?

And now you would need somebody who is able to debug the code for your kernel version (I am most certainly not that guy).

Bad luck.

OK - thanks for all your help anyway.

Well, maybe you don’t need that stuff at all.

These files looked familiar to me, and indeed, they are also inside a project called “usbip”

http://sourceforge.net/projects/usbip/

and the author of all source files is the same.

Software.openSUSE.org - usbip & openSUSE 11.0

Try to install the packages “usbip” and “usbip-kmp-pae” matching your kernel version.

Maybe this will do the trick.

aescott adjusted his/her AFDB on Sunday 24 May 2009 13:56 to write:

>

> echo;
> echo " ERROR: Kernel configuration is invalid.";
> echo " include/linux/autoconf.h or include/config/auto.conf are
> missing.";
> echo " Run ‘make oldconfig && make prepare’ on kernel src to fix
> it.";
> echo;
>

Try this:

<code>

cd /usr/src/linux
make cloneconfig
make prepare

</code>

then try again or post any errors

HTH


Mark

Nullus in verba
Nil illegitimi carborundum