Automatic Activation, Hotplug and UDEV, Configuration
Post Reply
sid
Posts: 2
Joined: 11 May 2009, 22:03

unable to compile usb_modeswitch on fedora 9

Post by sid » 11 May 2009, 22:22

Hi,

This looks like the lowest level newbie stuff of all that i've seen in the forum so far, so please bear with me! :oops:

I have a vanilla kernel running on fedora 9, and usb_modeswitch just won't compile as it can't seem to find one or the other header file, though lots of files of the same name are present under the include directory:

Code: Select all

$ gcc -l usb -o usb_modeswitch -I /usr/src/linux-2.6.29/ usb_modeswitch.c
usb_modeswitch.c:60:17: error: usb.h: No such file or directory
<snip>

$ find /usr/src/linux-2.6.29/ -name usb.h
/usr/src/linux-2.6.29/arch/arm/plat-omap/include/mach/usb.h
/usr/src/linux-2.6.29/arch/arm/plat-mxc/include/mach/usb.h
/usr/src/linux-2.6.29/arch/mips/include/asm/mach-pnx8550/usb.h
/usr/src/linux-2.6.29/drivers/usb/core/usb.h
/usr/src/linux-2.6.29/drivers/usb/storage/usb.h
/usr/src/linux-2.6.29/include/linux/usb.h
/usr/src/linux-2.6.29/include/config/usb.h
/usr/src/linux-2.6.29/include/config/i2c/tiny/usb.h
/usr/src/linux-2.6.29/include/config/dvb/b2c2/flexcop/usb.h
/usr/src/linux-2.6.29/include/config/dvb/usb.h
I've tried multiple variations of the include directory but i still can't get it to compile. I face the same kind of errors even when booted into the fedora kernel.

I realize that this is not a usb_modeswitch problem per se, but i'm stuck even before i could get around to using usb_modeswitch to solve my problem. :( Any help would be greatly appreciated.

Josh
Site Admin
Posts: 6570
Joined: 03 Nov 2007, 00:30

Post by Josh » 12 May 2009, 08:41

You need to search for and install the package "libusb-dev" (or probably "libusb-devel").

sid
Posts: 2
Joined: 11 May 2009, 22:03

unable to compile usb_modeswitch on fedora 9

Post by sid » 16 May 2009, 21:14

Josh wrote:You need to search for and install the package "libusb-dev" (or probably "libusb-devel").
Thanks for the response. I'm sorry, there is an instruction to this effect on the intro page in the Download section, but i didn't get its significance the first time around. I guess i got confused cause i had a package called libusb, and since the "lib" prefix is usually used for development libraries, it didn't occur to me that there could be a different libusb-devel package. :?

Anyway, thanx a million for your response. libusb-devel was all that was needed. Compiled perfectly once i installed it.

Post Reply