You are not logged in.
Hi,
I need the old version 0.8.6 of lirc and lirc-utils because my xbox usb remote does not work with newer versions of lirc_atiusb module.
https://bugs.archlinux.org/task/21837
I tried to build version 0.8.6 with modified PKGBUILDs from ABS
lirc
# $Id: PKGBUILD 100623 2010-11-24 21:20:40Z tpowa $
# Maintainer: Paul Mattal <paul@archlinux.org>
pkgname=lirc
pkgver=0.8.6
pkgrel=3
_kernver=2.6.36-ARCH
pkgdesc="Linux Infrared Remote Control kernel modules for stock arch kernel"
arch=('i686' 'x86_64')
url="http://www.lirc.org/"
license=('GPL')
depends=('lirc-utils' 'kernel26>=2.6.36' 'kernel26<2.6.37')
makedepends=('help2man' 'kernel26-headers>=2.6.36' 'kernel26-headers<2.6.37')
replaces=('lirc+pctv')
options=('!makeflags')
install=$pkgname.install
source=("http://prdownloads.sourceforge.net/${pkgname}/${pkgname}-${pkgver}.tar.bz2")
md5sums=('4ca24da6f5e7c2dcea74878c27a4a3f7')
build() {
# configure
cd ${srcdir}/lirc-${pkgver}
./configure --enable-sandboxed --prefix=/usr \
--with-driver=all --with-kerneldir=/usr/src/linux-${_kernver}/ \
--with-moduledir=/lib/modules/${_kernver}/kernel/drivers/misc \
--with-transmitter
# disable parallel and bt829
# because of incompatibility with smp systems
sed -i -e "s:lirc_parallel::" -e "s:lirc_bt829::" \
Makefile drivers/Makefile drivers/*/Makefile tools/Makefile
# lirc_i2c lirc_igorplugusb lirc_imon lirc_it87 lirc_ite8709
# lirc_sasem lirc_serial lirc_sir lirc_ttusbir lirc_zilog
# because part of kernel 2.6.36 staging tree
sed -i -e "s:lirc_i2c::" -e "s:lirc_igorplugusb::" -e "s:lirc_imon::" \
-e "s:lirc_it87::" -e "s:lirc_ite8709::" -e "s:lirc_sasem::" \
-e "s:lirc_serial::" -e "s:lirc_sir::" -e "s:lirc_ttusbir::" \
-e "s:lirc_zilog::" Makefile drivers/Makefile drivers/*/Makefile tools/Makefile
# disable lirc_gpio due to brokeness of kernel 2.6.23
sed -i -e "s:lirc_gpio::" \
Makefile drivers/Makefile drivers/*/Makefile tools/Makefile
# build
cd drivers
make
}
package() {
cd ${srcdir}/${pkgver}/drivers
make DESTDIR=${pkgdir} install
# set the kernel we've built for inside the install script
sed -i -e "s/KERNEL_VERSION=.*/KERNEL_VERSION=${_kernver}/g" \
${startdir}/lirc.install
}
lirc-utils
# $Id: PKGBUILD 100578 2010-11-24 10:21:51Z tpowa $
# Maintainer:
# Contributor: Paul Mattal <paul@archlinux.org>
pkgname=lirc-utils
pkgver=0.8.6
pkgrel=1
pkgdesc="Linux Infrared Remote Control utils"
arch=('i686' 'x86_64')
url="http://www.lirc.org/"
license=('GPL')
_kernver=2.6.36-ARCH
depends=('alsa-lib' 'libusb' 'libx11' 'libsm' 'python2' 'libftdi')
makedepends=('help2man' 'kernel26-headers')
replaces=('lirc+pctv')
backup=('etc/conf.d/lircd.conf' 'etc/conf.d/irexec.conf')
options=('!libtool' '!makeflags')
source=("http://downloads.sourceforge.net/lirc/lirc-${pkgver}.tar.bz2"
lircd lircmd lirc.logrotate lircd.conf irexec.conf irexecd)
build() {
cd "${srcdir}/lirc-${pkgver}"
autoreconf
libtoolize
./configure --enable-sandboxed \
--prefix=/usr \
--with-driver=all \
--with-kerneldir=/usr/src/linux-${_kernver} \
--with-moduledir=/lib/modules/${_kernver}/kernel/drivers/misc \
--with-transmitter
# disable parallel and bt829
# because of incompatibility with smp systems
sed -i -e "s:lirc_parallel::" -e "s:lirc_bt829::" \
Makefile drivers/Makefile drivers/*/Makefile tools/Makefile
# lirc_i2c lirc_igorplugusb lirc_imon lirc_it87 lirc_ite8709
# lirc_sasem lirc_serial lirc_sir lirc_ttusbir lirc_zilog
# because part of kernel 2.6.36 staging tree
sed -i -e "s:lirc_i2c::" -e "s:lirc_igorplugusb::" -e "s:lirc_imon::" \
-e "s:lirc_it87::" -e "s:lirc_ite8709::" -e "s:lirc_sasem::" \
-e "s:lirc_serial::" -e "s:lirc_sir::" -e "s:lirc_ttusbir::" \
-e "s:lirc_zilog::" Makefile drivers/Makefile drivers/*/Makefile tools/Makefile
# Disabling lirc_gpio driver as it does no longer work Kernel 2.6.22+
sed -i -e "s:lirc_gpio\.o::" drivers/lirc_gpio/Makefile.am
make
}
package() {
cd "${srcdir}/lirc-${pkgver}"
make DESTDIR="${pkgdir}" install
install -d "${pkgdir}/usr/share/lirc" "${pkgdir}/etc/rc.d"
cp "${srcdir}"/{lircd,lircmd,irexecd} "${pkgdir}/etc/rc.d"
cp -rp remotes "${pkgdir}/usr/share/lirc"
chmod -R go-w "${pkgdir}/usr/share/lirc/"
# install the logrotate config
install -Dm644 "${srcdir}/lirc.logrotate" "${pkgdir}/etc/logrotate.d/lirc"
# install conf.d file
install -Dm644 "${srcdir}/lircd.conf" "${pkgdir}/etc/conf.d/lircd.conf"
# install conf.d file
install -Dm644 "${srcdir}/irexec.conf" "${pkgdir}/etc/conf.d/irexec.conf"
install -d "${pkgdir}/etc/lirc"
# remove built modules
rm -r "${pkgdir}/lib/"
}
md5sums=('4ca24da6f5e7c2dcea74878c27a4a3f7'
'8d0e238dc0eda95e340fe570605da492'
'85f7fdac55e5256967241864049bf5e9'
'3deb02604b37811d41816e9b4385fcc3'
'5b1f8c9cd788a39a6283f93302ce5c6e'
'f0c0ac930326168035f0c8e24357ae55'
'69d099e6deedfa3c1ee2b6e82d9b8bfb')
both package stop with an error
/home/michael/AUR/lirc/src/lirc-0.8.6/drivers/lirc_dev/lirc_dev.c:35:28: fatal error: linux/autoconf.h: No such file or directory
compilation terminated.
the autoconf.h file exists:
$ ll /usr/src/linux-2.6.36-ARCH/include/generated/autoconf.h
-rw-r--r-- 1 root root 136K Nov 26 13:29 /usr/src/linux-2.6.36-ARCH/include/generated/autoconf.h
here are the complete outputs
lirc: http://pastebin.com/fgK1kDpg
lirc-utils: http://pastebin.com/swy61Xsr
any ideas how to compile lirc 0.8.6 for kernels >= 2.6.36 ?
Offline
It's looking for linux/autoconf.h, not for generated/autoconf.h.
Got Leenucks? :: Arch: Power in simplicity :: Get Counted! Registered Linux User #392717 :: Blog thingy
Offline
oh , ok i missed that.
I also missed to use the two patches from the ABS directory
"kernel-2.6.33.patch" and "kernel-2.6.35.patch"
the 2.6.33 patch added this to src/lirc-0.8.6/drivers/lirc_dev/lirc_dev.c
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 33)
#include <linux/autoconf.h>
#else
#include <generated/autoconf.h>
#endif
and now I get this error
Making all in lirc_dev
make[1]: Entering directory `/home/michael/AUR/lirc/src/lirc-0.8.6/drivers/lirc_dev'
cp ./../lirc_dev/Module*.symvers .
cp: cannot stat `./../lirc_dev/Module*.symvers': No such file or directory
make[1]: [lirc_dev.o] Error 1 (ignored)
mv Makefile Makefile.automake
cp ./../Makefile.kernel Makefile
CPPFLAGS="" CFLAGS="" LDFLAGS="" \
make -C /usr/src/linux-2.6.36-ARCH/ SUBDIRS=/home/michael/AUR/lirc/src/lirc-0.8.6/drivers/lirc_dev modules \
KBUILD_VERBOSE=1
make[2]: Entering directory `/usr/src/linux-2.6.36-ARCH'
test -e include/generated/autoconf.h -a -e include/config/auto.conf || ( \
echo; \
echo " ERROR: Kernel configuration is invalid."; \
echo " include/generated/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 /home/michael/AUR/lirc/src/lirc-0.8.6/drivers/lirc_dev/.tmp_versions ; rm -f /home/michael/AUR/lirc/src/lirc-0.8.6/drivers/lirc_dev/.tmp_versions/*
make -f scripts/Makefile.build obj=/home/michael/AUR/lirc/src/lirc-0.8.6/drivers/lirc_dev
gcc -Wp,-MD,/home/michael/AUR/lirc/src/lirc-0.8.6/drivers/lirc_dev/.lirc_dev.o.d -nostdinc -isystem /usr/lib/gcc/i686-pc-linux-gnu/4.5.1/include -I/usr/src/linux-2.6.36-ARCH/arch/x86/include -Iinclude -include include/generated/autoconf.h -D__KERNEL__ -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Werror-implicit-function-declaration -Wno-format-security -fno-delete-null-pointer-checks -O2 -m32 -msoft-float -mregparm=3 -freg-struct-return -mpreferred-stack-boundary=2 -march=i686 -mtune=generic -Wa,-mtune=generic32 -ffreestanding -fstack-protector -DCONFIG_AS_CFI=1 -DCONFIG_AS_CFI_SIGNAL_FRAME=1 -DCONFIG_AS_CFI_SECTIONS=1 -pipe -Wno-sign-compare -fno-asynchronous-unwind-tables -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -Wframe-larger-than=1024 -fno-omit-frame-pointer -fno-optimize-sibling-calls -Wdeclaration-after-statement -Wno-pointer-sign -fno-strict-overflow -fconserve-stack -DIRCTL_DEV_MAJOR=61 -DEXPORT_SYMTAB -DHAVE_CONFIG_H -I. -I. -I../.. -I/home/michael/AUR/lirc/src/lirc-0.8.6/drivers/lirc_dev/. -I/home/michael/AUR/lirc/src/lirc-0.8.6/drivers/lirc_dev/ -I/home/michael/AUR/lirc/src/lirc-0.8.6/drivers/lirc_dev/../.. -I/home/michael/AUR/lirc/src/lirc-0.8.6/drivers/lirc_dev/../.. -I/usr/src/linux-2.6.36-ARCH//include/ -I/usr/src/linux-2.6.36-ARCH//drivers/media/video/ -DMODULE -D"KBUILD_STR(s)=#s" -D"KBUILD_BASENAME=KBUILD_STR(lirc_dev)" -D"KBUILD_MODNAME=KBUILD_STR(lirc_dev)" -c -o /home/michael/AUR/lirc/src/lirc-0.8.6/drivers/lirc_dev/lirc_dev.o /home/michael/AUR/lirc/src/lirc-0.8.6/drivers/lirc_dev/lirc_dev.c
/home/michael/AUR/lirc/src/lirc-0.8.6/drivers/lirc_dev/lirc_dev.c: In function 'lirc_register_driver':
/home/michael/AUR/lirc/src/lirc-0.8.6/drivers/lirc_dev/lirc_dev.c:306:16: error: 'const struct file_operations' has no member named 'ioctl'
/home/michael/AUR/lirc/src/lirc-0.8.6/drivers/lirc_dev/lirc_dev.c: In function 'irctl_ioctl':
/home/michael/AUR/lirc/src/lirc-0.8.6/drivers/lirc_dev/lirc_dev.c:681:30: error: 'const struct file_operations' has no member named 'ioctl'
/home/michael/AUR/lirc/src/lirc-0.8.6/drivers/lirc_dev/lirc_dev.c:682:22: error: 'const struct file_operations' has no member named 'ioctl'
/home/michael/AUR/lirc/src/lirc-0.8.6/drivers/lirc_dev/lirc_dev.c: At top level:
/home/michael/AUR/lirc/src/lirc-0.8.6/drivers/lirc_dev/lirc_dev.c:1011:2: error: unknown field 'ioctl' specified in initializer
/home/michael/AUR/lirc/src/lirc-0.8.6/drivers/lirc_dev/lirc_dev.c:1011:2: warning: initialization from incompatible pointer type
make[3]: *** [/home/michael/AUR/lirc/src/lirc-0.8.6/drivers/lirc_dev/lirc_dev.o] Error 1
make[2]: *** [_module_/home/michael/AUR/lirc/src/lirc-0.8.6/drivers/lirc_dev] Error 2
make[2]: Leaving directory `/usr/src/linux-2.6.36-ARCH'
make[1]: *** [lirc_dev.o] Error 2
make[1]: Leaving directory `/home/michael/AUR/lirc/src/lirc-0.8.6/drivers/lirc_dev'
make: *** [all-recursive] Error 1
Aborting...
Offline
Well you should google your errors instead of just sit around and wait .
First hit seems already relevant.
Got Leenucks? :: Arch: Power in simplicity :: Get Counted! Registered Linux User #392717 :: Blog thingy
Offline
ah, thanks
ok, I applied this changes to "/drivers/lirc_dev/lirc_dev.c" but still get an error
/home/michael/AUR/lirc/src/lirc-0.8.6/drivers/lirc_dev/lirc_dev.c: In function 'irctl_ioctl':
/home/michael/AUR/lirc/src/lirc-0.8.6/drivers/lirc_dev/lirc_dev.c:686:30: error: 'const struct file_operations' has no member named 'ioctl'
/home/michael/AUR/lirc/src/lirc-0.8.6/drivers/lirc_dev/lirc_dev.c:687:22: error: 'const struct file_operations' has no member named 'ioctl'
/home/michael/AUR/lirc/src/lirc-0.8.6/drivers/lirc_dev/lirc_dev.c: At top level:
/home/michael/AUR/lirc/src/lirc-0.8.6/drivers/lirc_dev/lirc_dev.c:1024:2: error: unknown field 'ioctl' specified in initializer
/home/michael/AUR/lirc/src/lirc-0.8.6/drivers/lirc_dev/lirc_dev.c:1024:2: warning: initialization from incompatible pointer type
line 686 to 690
/* if the driver has a ioctl function use it instead */
if (ir->d.fops && ir->d.fops->ioctl) {
result = ir->d.fops->ioctl(inode, file, cmd, arg);
if (result != -ENOIOCTLCMD)
return result;
}
seems this has to be changed like the other things in the link above, but I don't know how.
My kernel knowledge and C skills not very big.
I send a mail to the lirc-mailing list with this issue.
EDIT:
this is the complete lirc_dev.c I used.
http://pastebin.com/M5ySc1mA
Last edited by SiD (2010-12-06 14:48:23)
Offline
If you compare that error output to the previous one, you'll see the first function is fine, but the second one still errors out. Maybe the SVN has a similar patch that fixes the other function?
Got Leenucks? :: Arch: Power in simplicity :: Get Counted! Registered Linux User #392717 :: Blog thingy
Offline
I was able to compile the lirc_atiusb module with changing it to
/* if the driver has a ioctl function use it instead */
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 35)
if (ir->d.fops && ir->d.fops->ioctl) {
result = ir->d.fops->ioctl(inode, file, cmd, arg);
#else
if (ir->d.fops && ir->d.fops->unlocked_ioctl) {
result = ir->d.fops->unlocked_ioctl(file, cmd, arg);
#endif
if (result != -ENOIOCTLCMD)
return result;
}
and the struct to
static struct file_operations fops = {
.owner = THIS_MODULE,
.read = irctl_read,
.write = irctl_write,
.poll = irctl_poll,
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 35)
.ioctl = irctl_ioctl,
#else
.unlocked_ioctl = irctl_ioctl,
#endif
#ifdef CONFIG_COMPAT
.compat_ioctl = irctl_compat_ioctl,
#endif
.open = irctl_open,
.release = irctl_close
};
and the utils package needed another patch (called lirc-0.8.6-remove-obsolete-modes.patch) to compile.
But the xbox IR-Reciever does still not work. Same Problem as with the packages from the repos. The lirc_atiusb module crashes if the reciever is pluggend in. With kernel 2.6.35.x and lirc-0.8.6 it worked always.
Offline