Gentoo patches for some reason remove inc_mod and dec_mod in struct i2c_adapter located in include/linux/i2c.h. These fields are used by i2c_dev.c in lirc to lock bttv in place while the IR receiver module is in use. This makes lirc fail to compile if the kernel in /usr/src/linux is from sys-kernel/gentoo-sources. Another thing, the lirc ebuild checks the currently running kernel for SMP support. This is ridiculous, what if I want to compile lirc for some other kernel (like for an embedded application)? At least, make this user overridable. Since the kernel source must be present anyway for this package to work, I propose that SMP support could be checked like this: if [ ! -z "`grep \"define CONFIG_SMP 1\" /usr/src/linux/include/config/smp.h`" ]; then export SMP=1; else export SMP=0; fi Existence of the file could be checked, but compilation fails anyway unless the kernel source is configured and split-includes is run. How about checking this and informing the user if it's not done? if [ ! -d /usr/src/linux/include/config ]; then ... fi Reproducible: Always Steps to Reproduce: 1.emerge sys-kernel/gentoo-sources 2.setup /usr/src/linux link to this kernel 3.emerge apps-misc/lirc Actual Results: make[3]: Entering directory `/var/tmp/portage/lirc-0.6.6-r1/work/lirc-0.6. 6/drivers/lirc_i2c' gcc -D__KERNEL__ -I/usr/src/linux-2.4.22-gentoo-r7/include -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common -finline-limit=2000 -fomit-frame-pointer -pipe -mpreferred-stack-boundary=2 -march=i486 -DMODULE -DMODVERSIONS -include /usr/src/linux-2.4. 22-gentoo-r7/include/linux/modversions.h -DHAVE_CONFIG_H -I. -I. -I../.. -nostdinc -iwithprefix include -DKBUILD_BASENAME=lirc_i2c -c -o lirc_i2c.o lirc_i2c.c lirc_i2c.c: In function `set_use_inc': lirc_i2c.c:235: error: structure has no member named `inc_use' lirc_i2c.c:236: error: structure has no member named `inc_use' lirc_i2c.c: In function `set_use_dec': lirc_i2c.c:245: error: structure has no member named `dec_use' lirc_i2c.c:246: error: structure has no member named `dec_use' lirc_i2c.c: In function `ir_attach': lirc_i2c.c:334: error: structure has no member named `inc_use' lirc_i2c.c:335: error: structure has no member named `inc_use' lirc_i2c.c: In function `ir_detach': lirc_i2c.c:345: error: structure has no member named `dec_use' lirc_i2c.c:346: error: structure has no member named `dec_use' make[3]: *** [lirc_i2c.o] Error 1 Related packages: sys-kernel/gentoo-sources-2.4.22-r7 app-misc/lirc-0.6.6-r1 /etc/make.conf: USE="alsa cdr directfb dga dvb dvd dvdr emacs encode fbcon flac ggi gpm jack java ladcca lirc mad matrox mmx mozilla mpi mysql nas samba sse usb xinerama" CHOST="i486-pc-linux-gnu" CFLAGS="-O3 -mcpu=i486 -funroll-loops -pipe" MAKEOPTS="-j2"
it only checks the smp support, because the parallel driver will fail to compile on smp systems
*** Bug 42346 has been marked as a duplicate of this bug. ***
Yes, if SMP is enabled in the source present in /usr/src/linux, the parallel driver fails to compile. It does NOT fail if the running kernel has SMP enabled, and that's checked. This is a problem for me since I compile the package on a unicpu machine, but the target is an SMP machine.
It doesn't compile anymore for me either. Looks to me as if this bug has been reopened: http://bugs.gentoo.org/show_bug.cgi?id=35671
Is htis still a bug? Does the problem still exist?
Since no comment has been received on this for more than 2 months, I'm assuming the problem is gone now and I'm closing this bug. Please reopen if this is still an issue.