Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 42346 - Lirc does not compile with Gentoo patched kernel
Summary: Lirc does not compile with Gentoo patched kernel
Status: RESOLVED DUPLICATE of bug 42270
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Gentoo Linux bug wranglers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-02-21 02:37 UTC by Andreas Johansson
Modified: 2005-07-17 13:06 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas Johansson 2004-02-21 02:37:58 UTC
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"
Comment 1 Andreas Johansson 2004-02-21 02:41:09 UTC

*** This bug has been marked as a duplicate of 42270 ***