[Pkg-lirc-maint] Bug#471383: Bug#471383: lirc-modules-source (0.8.2-2):  fails to build lirc_gpio with 2.6.23 and 2.6.24 (full kernel source)

Stefan Lippers-Hollmann s.L-H at gmx.de
Wed Mar 19 17:31:50 UTC 2008


On Montag, 17. März 2008, rUrek wrote:
> Package: lirc-modules-source
> Version: 0.8.2-2
> (...)
> gcc-4.1 -m32 -Wp,-MD,/usr/src/modules/lirc/drivers/lirc_gpio/.lirc_gpio.o.d  -nostdinc -isystem /usr/lib/gcc/i486-linux-gnu/4.1.3/include -D__KERNEL__ -Iinclude  -include 
> include/linux/autoconf.h -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Werror-implicit-function-declaration -Os -pipe -msoft-float -mregparm=3 -freg-struct-return -mpreferred-stack-boundary=2  -march=i686 -ffreestanding -maccumulate-outgoing-args -DCONFIG_AS_CFI=1 -DCONFIG_AS_CFI_SIGNAL_FRAME=1 -Iinclude/asm-x86/mach-default -fomit-frame-pointer  -fno-stack-protector -Wdeclaration-after-statement -Wno-pointer-sign   -DIRCTL_DEV_MAJOR=61 -DEXPORT_SYMTAB -DHAVE_CONFIG_H -I. -I. -I../.. -I/usr/src/modules/lirc/drivers/lirc_gpio/../.. -I/lib/modules/2.6.24-1-686/build/include/ -I/lib/modules/2.6.24-1-686/build/drivers/media/video/  -DMODULE -D"KBUILD_STR(s)=#s" -D"KBUILD_BASENAME=KBUILD_STR(lirc_gpio)"  -D"KBUILD_MODNAME=KBUILD_STR(lirc_gpio)" -c -o /usr/src/modules/lirc/drivers/lirc_gpio/.tmp_lirc_gpio.o /usr/src/modules/lirc/drivers/lirc_gpio/lirc_gpio.c
> /usr/src/modules/lirc/drivers/lirc_gpio/lirc_gpio.c:82:1: warning: "dprintk" 
> redefined
> In file included from /usr/src/modules/lirc/drivers/lirc_gpio/lirc_gpio.c:56:
> include/../drivers/media/video/bt8xx/bttvp.h:283:1: warning: this is the 
> location of the previous definition
> /usr/src/modules/lirc/drivers/lirc_gpio/lirc_gpio.c: In function 'get_queue':
> /usr/src/modules/lirc/drivers/lirc_gpio/lirc_gpio.c:371: error: implicit 
> declaration of function 'bttv_get_gpio_queue'
> /usr/src/modules/lirc/drivers/lirc_gpio/lirc_gpio.c:371: warning: return makes 
> pointer from integer without a cast
> /usr/src/modules/lirc/drivers/lirc_gpio/lirc_gpio.c: In 
> function 'init_module':
> /usr/src/modules/lirc/drivers/lirc_gpio/lirc_gpio.c:484: error: implicit 
> declaration of function 'bttv_get_cardinfo'
> make[6]: *** [/usr/src/modules/lirc/drivers/lirc_gpio/lirc_gpio.o] Error 1
> make[5]: *** [_module_/usr/src/modules/lirc/drivers/lirc_gpio] Error 2
> make[5]: Leaving directory `/usr/src/linux-headers-2.6.24-1-686'
> make[4]: *** [lirc_gpio.o] Error 2
> make[4]: Leaving directory `/usr/src/modules/lirc/drivers/lirc_gpio'
> make[3]: *** [all-recursive] Error 1
> make[3]: Leaving directory `/usr/src/modules/lirc/drivers'
> make[2]: *** [gpio] Error 2
> make[2]: Leaving directory `/usr/src/modules/lirc'
> make[1]: *** [binary-modules] Error 2
> make[1]: Leaving directory `/usr/src/modules/lirc'
> make: *** [kdist_build] Error 2
> This is kernel issue(?), but problem is with lirc_gpio.
> You have to path kernel:

Confirmed, for 2.6.24 and above, thanks for filing a separate bug, as these
are (while overlapping with #471301) separate issues.

> discussion about:
> http://sourceforge.net/mailarchive/message.php?msg_id=20080203211219.d5060925.ldarby%40tuffmail.com
> and working patch for kernel 2.6.24
> http://lirc.sourceforge.net/software/snapshots/lirc-bttv-linux-2.6.24.patch

Short answer (sorry, I don't have much time before the weekend), lirc is 
abusing private/ unexported kernel APIs to make use of gpio on bttv based 
cards (#436166), this is also the reason why kernel headers are not sufficient
to build lirc_cpio.

Now, in 2.6.24, this private interface has changes and lirc didn't adapt 
yet, the patches you are proposing revert these kernel changes and allow 
the unmodified lirc to build again. Applying these can't be done from 
within lirc, but would have to be done to linux-2.6, which isn't an option, 
neither upstream (the changes are intended and no in-tree module suffers 
from it, furthermore lirc_gpio has been accessing parts it was never meant 
to access) nor for Debian's kernel packages.

The solution... I'm not sure yet, but lirc_gpio needs to be fixed in a 
non-trivial way and I cannot speculate about the impact or a time frame, 

> greets

Thanks for reporting
	Stefan Lippers-Hollmann
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
Url : http://lists.alioth.debian.org/pipermail/pkg-lirc-maint/attachments/20080319/a6922a5d/attachment.pgp 

More information about the Pkg-lirc-maint mailing list