Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 42270 - Lirc does not compile with Gentoo patched kernel
Summary: Lirc does not compile with Gentoo patched kernel
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: x86-kernel@gentoo.org (DEPRECATED)
URL:
Whiteboard:
Keywords:
: 42346 (view as bug list)
Depends on:
Blocks:
 
Reported: 2004-02-20 07:55 UTC by Andreas Johansson
Modified: 2004-06-20 05:17 UTC (History)
3 users (show)

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-20 07:55:36 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 Heinrich Wendel (RETIRED) gentoo-dev 2004-02-20 15:26:04 UTC
it only checks the smp support, because the parallel driver will fail to compile on smp systems
Comment 2 Andreas Johansson 2004-02-21 02:41:09 UTC
*** Bug 42346 has been marked as a duplicate of this bug. ***
Comment 3 Andreas Johansson 2004-02-21 02:47:26 UTC
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.
Comment 4 Michael Prager 2004-03-14 04:40:14 UTC
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
Comment 5 Jason Cox (RETIRED) gentoo-dev 2004-04-16 17:29:32 UTC
Is htis still a bug? Does the problem still exist?
Comment 6 Michal Januszewski (RETIRED) gentoo-dev 2004-06-20 05:17:27 UTC
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.