xxorde / librekinect

Depth data from a kinect sensor! Small and fast kernel driver. Also for embedded devices like the raspberry pi!
408 stars 66 forks source link

error: ‘V4L2_FL_USE_FH_PRIO’ undeclared. while building for latest version of Raspberry Pi kernel #36

Open xor007 opened 9 years ago

xor007 commented 9 years ago

Hello,

While building for latest raspberry pi kernel, I got the following error:

pi@pi2 ~/libfreekinect/librekinect-master $ make 
make -C /lib/modules/4.1.8+/build M=/home/pi/libfreekinect/librekinect-master modules
make[1]: Entering directory '/usr/src/linux'
  CC [M]  /home/pi/libfreekinect/librekinect-master/gspca.o
/home/pi/libfreekinect/librekinect-master/gspca.c: In function ‘gspca_dev_probe2’:
/home/pi/libfreekinect/librekinect-master/gspca.c:2070:2: error: ‘V4L2_FL_USE_FH_PRIO’ undeclared (first use in this function)
/home/pi/libfreekinect/librekinect-master/gspca.c:2070:2: note: each undeclared identifier is reported only once for each function it appears in
scripts/Makefile.build:264: recipe for target '/home/pi/libfreekinect/librekinect-master/gspca.o' failed
make[2]: *** [/home/pi/libfreekinect/librekinect-master/gspca.o] Error 1
Makefile:1384: recipe for target '_module_/home/pi/libfreekinect/librekinect-master' failed
make[1]: *** [_module_/home/pi/libfreekinect/librekinect-master] Error 2
make[1]: Leaving directory '/usr/src/linux'
Makefile:24: recipe for target 'default' failed
make: *** [default] Error 2

If I comment out the offending line in gscpa.c it builds and inserts, but not sure yet it will work...

DrCroubie commented 9 years ago

I'm getting this too, pretty much exactly the same as above. Latest Wheezy clean install from NOOBS about a week ago, then github gave me kernel 4.1.10 (previously I had 4.1.7 from noobs). I'll uncomment out the line in gspca.c and see if that works for me too.

(ps, maybe also add a line in the instructions, /proc/config.gz doesn't exist apparently, unless you 'modprobe configs' first)

tophstar commented 8 years ago

I am having this same error on raspbian 3.18.16-v7. Has there been any movement on this front?

cwc-products commented 8 years ago

All of my questions were answered by https://github.com/xxorde/librekinect/issues/15.

LukeShu commented 8 years ago

If you have Linux 3.17 or above, this has already been merged into the mainline kernel (https://github.com/torvalds/linux/commit/c87c0f079cf8c9c346adbedd367ba53ad0afaded); toggle the 'kinect' module's depth_mode flag to toggle between this depth mode and the older video mode.

Oh, look 3.17 is also when V4L2_FL_USE_FH_PRIO was removed. That is: you don't need to build this.

Regarding the low-levels of V4L2_FL_USE_FH_PRIO: In https://github.com/torvalds/linux/commit/95cd5d5ee67c2108765ae87d34761d54fd6671ce it was removed outright. See the commit message for justification.