[mythtv-users] Link for Lirc compile problems on newer kernels

Seth Daniel mythtv.org at sethdaniel.org
Mon Mar 19 23:35:00 UTC 2007


On Mon, Mar 19, 2007 at 04:22:59PM -0700, mike wrote:
> On Monday 19 March 2007 14:13, Dave wrote:
> > Hi guys
> > I just updated this page with the correct fix for lirc compilation
> > problems on kernels over 2.6.18
> > Hopefully a copy/paste should see you on your way.
> > Let me know if there's any problem or if I've b0rked it.
> >
> > Regards
> >
> > Dave
> > http://www.mythtv.org/wiki/index.php/South_Africa_MUG#.27.27.27LIRC.27.27.2
> 
> Thanks Dave, I followed that and it still won't compile for some reason. 
> (Debian etch, Kernel-2.6.20.1)
> I don't get what it wants now, but I don't know much anyhow... here is a long 
> list of errors:
> 
> 
> localhost:/usr/local/src/linux-2.6.20.1# make-kpkg modules_image
> exec debian/rules  DEBIAN_REVISION=custom.1.0  modules_image
> for module in /usr/src/modules/lirc ; do                       \
>           if test -d  $module; then                                \
>             (cd $module;                                          \
>               if ./debian/rules KVERS="2.6.20.1" 
> KSRC="/usr/local/src/linux-2.6.20.1" \
>                              KMAINT="Unknown Kernel Package Maintainer" 
> KEMAIL="unknown at unconfigured.in.etc.kernel-pkg.conf"      \
>                              KPKG_DEST_DIR="/usr/local/src/linux-2.6.20.1/.."       
> \
>                              KPKG_MAINTAINER="Unknown Kernel Package 
> Maintainer"        \
>                              KPKG_EXTRAV_ARG=""        \
>                              ARCH="x86_64"                  \
>                              KDREV="custom.1.0" kdist_image; then    \
>                   echo "Module $module processed fine";            \
>               else                                                  \
>                    echo "Module $module failed.";                  \
>                    if [ "X" != "X" ]; then      \
>                       echo "Perhaps $module does not understand --rootcmd?";  
> \
>                       echo "If you see messages that indicate that it is not"; 
> \
>                       echo "in fact being built as root, please file a bug ";  
> \
>                       echo "against $module.";                     \
>                    fi;                                              \
>                    echo "Hit return to Continue";                   \
>                  read ans;                                        \
>               fi;                                                   \
>              );                                                    \
>           else                                                      \
>                echo "Module $module does not exist";               \
>                echo "Hit return to Continue?";                      \
>           fi;                                                       \
>         done
> make[1]: Entering directory `/usr/src/modules/lirc'
> /usr/bin/make -w -f debian/rules binary-modules
> make[2]: Entering directory `/usr/src/modules/lirc'
> sed -e "s!\$KVERS!2.6.20.1!g; s!\$KSRC!/usr/local/src/linux-2.6.20.1!; s!
> \$KARCH!amd64!; s!\$KEMAIL!unknown at unconfigured.in.etc.kernel-pkg.conf!; s!
> \$KMAINT!Unknown Kernel Package Maintainer!; s!\$KDREV!custom.1.0!; s!
> \$DEBDATE!Mon, 19 Mar 2007 16:15:40 -0700!" debian/control.in > 
> debian/control
> dh_testdir
> # Add here commands to compile the package.
> /usr/bin/make debconf
> make[3]: Entering directory `/usr/src/modules/lirc'
> /usr/bin/make -C drivers SUBDIRS="lirc_dev"
> make[4]: Entering directory `/usr/src/modules/lirc/drivers'
> Making all in lirc_dev
> make[5]: Entering directory `/usr/src/modules/lirc/drivers/lirc_dev'
> Makefile:8: **************************************************
> Makefile:8: *** Makefile trick not undone, trying to recover *
> Makefile:8: **************************************************
> mv Makefile.automake Makefile
> /usr/bin/make all
> make[6]: Entering directory `/usr/src/modules/lirc/drivers/lirc_dev'
> mv Makefile Makefile.automake
> cp ../Makefile.kernel Makefile
> /usr/bin/make -C /usr/local/src/linux-2.6.20.1 
> SUBDIRS=/usr/src/modules/lirc/drivers/lirc_dev modules \
>                 KBUILD_VERBOSE=1
> make[7]: Entering directory `/usr/local/src/linux-2.6.20.1'
> test -e include/linux/autoconf.h -a -e include/config/auto.conf || (            
> \
>         echo;                                                           \
>         echo "  ERROR: Kernel configuration is invalid.";               \
>         echo "         include/linux/autoconf.h or include/config/auto.conf 
> are missing.";      \
>         echo "         Run 'make oldconfig && make prepare' on kernel src to 
> fix it.";  \
>         echo;                                                           \
>         /bin/false)
> mkdir -p /usr/src/modules/lirc/drivers/lirc_dev/.tmp_versions
> rm -f /usr/src/modules/lirc/drivers/lirc_dev/.tmp_versions/*
> /usr/bin/make -f scripts/Makefile.build 
> obj=/usr/src/modules/lirc/drivers/lirc_dev
>   
> gcc -Wp,-MD,/usr/src/modules/lirc/drivers/lirc_dev/.lirc_dev.o.d  -nostdinc -isystem /usr/lib/gcc/x86_64-linux-gnu/4.1.2/include -D__KERNEL__ -Iinclude  -include 
> include/linux/autoconf.h -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Os   -m64 -mno-red-zone -mcmodel=kernel -pipe -fno-reorder-blocks -Wno-sign-compare -fno-asynchronous-unwind-tables -funit-at-a-time -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -maccumulate-outgoing-args -DCONFIG_AS_CFI=1 -DCONFIG_AS_CFI_SIGNAL_FRAME=1 -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_dev/../.. -I/usr/local/src/linux-2.6.20.1/include/  -DMODULE -D"KBUILD_STR(s)=#s" -D"KBUILD_BASENAME=KBUILD_STR(lirc_dev)"  -D"KBUILD_MODNAME=KBUILD_STR(lirc_dev)" -c -o /usr/src/modules/lirc/drivers/lirc_dev/.tmp_lirc_dev.o /usr/src/modules/lirc/drivers/lirc_dev/lirc_dev.c
> /usr/src/modules/lirc/drivers/lirc_dev/lirc_dev.c:35:26: error: 
> linux/config.h: No such file or directory


I don't know anything about the instructions on the wiki, but the last
line quoted above is your problem.  It looks like you are using the
debian way to compile the lirc package.  This will, by default,
overwrite any patches you have made to the source.  You can edit
/usr/src/modules/lirc/drivers/lirc_dev/lirc_dev.c manually and replace
the line that looks like:

#include <include/config.h>

and replace it with:

#include <include/autoconf.h>

and it will compile assuming you just use 'make'.  

You will need to replace similar lines in other files.  The files you
need to edit will depend on the lirc modules you are trying to compile.

I use ubuntu and it has a similar 'problem'.  On ubuntu I can simply
move /usr/src/lirc-0.8.1.tar.gz to a new file name and it will skip over
the part of the build that unpacks the pristine, unpatched source and
will leave any manually placed patches in place.


-- 
seth / @sethdaniel.org
Silence is the only virtue you have left.


More information about the mythtv-users mailing list