LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Debian (https://www.linuxquestions.org/questions/debian-26/)
-   -   Possibly missing /usr/include/linux header files.. how to fix? (https://www.linuxquestions.org/questions/debian-26/possibly-missing-usr-include-linux-header-files-how-to-fix-746263/)

brfindla 08-09-2009 01:49 PM

Possibly missing /usr/include/linux header files.. how to fix?
 
uname -a
Linux LinuxAtom 2.6.26-2-amd64 #1 SMP Sun Jul 26 20:35:48 UTC 2009 x86_64 GNU/Linux



Hi All,
The short story (which is still long) is I am trying to install openOCD and it craps out when I try to run config and it runs autoconf. It causes an error when it hits usb.h and that references mod_devicetable.h and it doesn't exist.

I have pulled down the linux source header files and tried copying it to where it would make it happy and it generates more errors.. there is this message at the top of mod_devicetable.h

/*
* Device tables which are exported to userspace via
* scripts/mod/file2alias.c. You must keep that file in sync with this
* header.
*/

I understand this has to do with installing device drivers, but have no clue how this mechanism works or how to fix what at first appeared to be a small problem. I have already tried this

brfindla@LinuxAtom:~$ sudo apt-get -f install linux-headers-$(uname -r)
Reading package lists... Done
Building dependency tree
Reading state information... Done
linux-headers-2.6.26-2-amd64 is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

does anyone understand what is going on here or have a suggestion? Any help or suggestions are appreciated..

Thanks!

Brian

knudfl 08-09-2009 03:56 PM

The data base still files the package as installed.
1) sudo dpkg -r --force-all <package>
2) sudo apt-get install <package>
I think, that will do the trick, if you really think,
all the headers are missing.
Did you do a 'ls /usr/include/linux' ?

The two headers mentioned, usb.h and mod_devicetable.h
are not supposed to be in /usr/include/linux .
Are they referred to as linux/<header> ?

'usb.h' : requirement will often be the one from libusb-dev.
'mod_devicetable.h' : only to be found in the kernel source. ?
.....

EDIT : openocd-0.2 : ./configure --enable-usbprog
"checking for usb.h... yes" : That's not a kernel header,
you will have to install 'libusb-dev' to get the right one.
.....

brfindla 08-10-2009 11:21 AM

Yes Yes Yes!
 
I am very, very thankful for your advice. Yes installing the usb lib did the trick! Perhaps I am dense, but I read/reread the info on installing the openOCD and didn't see anything about this anywhere.. if it was there then I apologize for my inability to see it.

Knudfl, I want to tell you that since I have been trying to really dive deeper into linux as of late, I have been extremely impressed by the helpfulness of many with deep knowledge. I thank you again, I am not sure I would have found this without many, many, more hours (or days) of hair pulling.

Best!

Brian


All times are GMT -5. The time now is 11:56 PM.