Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 125424 - app-misc/lirc-0.8.0 - no hardware I can use - does not work with usbirboy
Summary: app-misc/lirc-0.8.0 - no hardware I can use - does not work with usbirboy
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Matthias Schwarzott
URL: http://usbirboy.sourceforge.net/
Whiteboard:
Keywords:
Depends on:
Blocks: lirc-tracker
  Show dependency tree
 
Reported: 2006-03-07 17:44 UTC by DEMAINE Benoît-Pierre, aka DoubleHP
Modified: 2006-06-13 05:14 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 DEMAINE Benoît-Pierre, aka DoubleHP 2006-03-07 17:44:19 UTC
root@moon_gen:~# lircd -d /dev/usbirboy
lircd: there's no hardware I can use and no peers are specified
root@moon_gen:~# strace lircd -d /dev/usbirboy
execve("/usr/sbin/lircd", ["lircd", "-d", "/dev/usbirboy"], [/* 61 vars */]) = 0
uname({sys="Linux", node="moon_gen", ...}) = 0
brk(0)                                  = 0x8055000
access("/etc/ld.so.preload", R_OK)      = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY)      = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=107641, ...}) = 0
mmap2(NULL, 107641, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb7fa1000
close(3)                                = 0
open("/lib/libc.so.6", O_RDONLY)        = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\20V\1\000"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=1203776, ...}) = 0
mmap2(NULL, 1146228, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb7e89000
mmap2(0xb7f9b000, 16384, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x112) = 0xb7f9b000
mmap2(0xb7f9f000, 7540, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xb7f9f000
close(3)                                = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7e88000
mprotect(0xb7f9b000, 4096, PROT_READ)   = 0
mprotect(0xb7fd1000, 4096, PROT_READ)   = 0
munmap(0xb7fa1000, 107641)              = 0
open("/dev/urandom", O_RDONLY)          = 3
read(3, "\342\177\334x", 4)             = 4
close(3)                                = 0
write(2, "lircd: there\'s no hardware I can"..., 64lircd: there's no hardware I can use and no peers are specified
) = 64
exit_group(1)                           = ?
Process 19719 detached

using http://usbirboy.sourceforge.net/
Device works since cat /dev/usbirboy gets verbose when I press the remote ... seems like something brteak the binary (I re emerged it twice).

root@moon_gen:~# emerge -vp lirc
[ebuild   R   ] app-misc/lirc-0.8.0  USE="X alsa doc usb -debug" 0 kB
Total size of downloads: 0 kB

I will try to update the rest of the system (emerge -DaNuv lirc want to update about 15 lines ...), but that may take a few days.

*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** 

# emerge --info
Portage 2.1_pre4-r1 (default-linux/x86/2005.1, gcc-3.3.6, glibc-2.3.6-r2, 2.6.15-gentoo-r5-Gentoo-moon_04 i686)
=================================================================
System uname: 2.6.15-gentoo-r5-Gentoo-moon_04 i686 AMD Athlon(tm) 4 Processor
Gentoo Base System version 1.12.0_pre16
distcc 2.18.3 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled]
dev-lang/python:     2.3.5, 2.4.2-r1
sys-apps/sandbox:    1.2.17
sys-devel/autoconf:  2.13, 2.59-r7
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r1
sys-devel/binutils:  2.16.1-r1
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.11-r3
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=pentium3 -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.4/env /usr/kde/3.4/share/config /usr/kde/3.4/shutdown /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/kde/3/share/config /usr/lib/X11/xkb /usr/lib/mozilla/defaults/pref /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/texmf/web2c /etc/env.d"
CXXFLAGS="-O2 -march=pentium3 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig distlocks keeptemp keepwork noclean sandbox sfperms strict"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
LANG="en_GB"
LC_ALL="en_GB"
MAKEOPTS="-j2"
PKGDIR="/tmp"
PORTAGE_TMPDIR="/mnt/big"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="x86 X a52 aac aalib acpi aim alsa amuled apache2 apic apm arts audiofile avi bash-completion berkdb bidi binfilter bitmap-fonts bl bonjour bootsplash cdda cdparanoia cdr cjk cmov cpudetection crypt cups curl cx8 dbus de dga directfb doc dri dts dv dvb dvd dvdread dynamic eds emboss encode esd ethereal examples fbcon ffmpeg flac flash foomaticdb fortran fping fpu freetype fxsr gdbm ggi gif gnome gnutls gpm gs gstreamer gtk gtk2 httpd i8x0 icq idea idn ieee1394 imagemagick imlib ipv6 irc jabber jack java javascript jpeg kde lcms libcaca libg++ libwww lirc listentcp live lj logrotate lzo mad mca mce mikmod mmx mmxext mono motif mozcalendar mp3 mpeg mplayer msn msr mtrr mtyhtv ncurses network nls no-htdocs nsplugin offensive ogg oggvorbis opengl oss pae pam pat pdflib perl pge png pse pse36 python qt quicktime rar readline real rss rtc samba screen sdl sensord sep silc skey skins sndfile speex spell sse ssl stream subtitles svg svga swat symlink tcpd tga theora threads tiff truetype truetype-fonts tsc type1-fonts unicode urandom usb v4l v4l2 vcd vim vlm vme vorbis win32codecs wmf wxwindows xanim xinerama xml2 xmms xosd xscreensaver xv xvid xvmc yahoo zeroconf zlib elibc_glibc kernel_linux userland_GNU"
Unset:  ASFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, LDFLAGS, LINGUAS
Comment 1 DEMAINE Benoît-Pierre, aka DoubleHP 2006-03-07 17:49:42 UTC
wanna add a dep in http://bugs.gentoo.org/show_bug.cgi?id=122774 ?
Comment 2 DEMAINE Benoît-Pierre, aka DoubleHP 2006-03-08 02:21:01 UTC
First obvious question would be:
- why doesnt it try to open device file ?

no ... why not even the conf file ?

hmmm neither:
never seen such a short strace ... lirc fails just after reading urandom ... and such call is not present in any source file of lirc
grep -nri urandom /var/tmp/portage/*lirc*/work ....

so, maybe lirc fails due to something else ? like a system library ?
I need an other 12h to finish upgrading compleetely my system, and run revdeprebuild ...

I ll also try to 
grep urandom
against all deps returned by ldd on lircd

valgrind is not either an obvious debug app, but some times it shows better which library induce a bug ... more news soon.
Comment 3 DEMAINE Benoît-Pierre, aka DoubleHP 2006-03-08 04:26:29 UTC
root@moon_gen:/home/dhp# which lircd
/usr/sbin/lircd
root@moon_gen:/home/dhp# ldd /usr/sbin/lircd
        linux-gate.so.1 =>  (0xffffe000)
        libc.so.6 => /lib/libc.so.6 (0xb7dbc000)
        /lib/ld-linux.so.2 (0xb7eef000)
root@moon_gen:/home/dhp# locate linux-gate
root@moon_gen:/home/dhp#
Comment 4 DEMAINE Benoît-Pierre, aka DoubleHP 2006-03-08 05:12:39 UTC
irrecord also have problems:

root@moon_gen:/var/log/portage# irrecord -d/dev/usbirboy /tmp/lircd.conf
irrecord: irrecord does not make sense without hardware
root@moon_gen:/var/log/portage# strace irrecord -d/dev/usbirboy /tmp/lircd.conf
execve("/usr/bin/irrecord", ["irrecord", "-d/dev/usbirboy", "/tmp/lircd.conf"], [/* 61 vars */]) = 0
uname({sys="Linux", node="moon_gen", ...}) = 0
brk(0)                                  = 0x8055000
access("/etc/ld.so.preload", R_OK)      = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY)      = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=107853, ...}) = 0
mmap2(NULL, 107853, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb7f8e000
close(3)                                = 0
open("/lib/libc.so.6", O_RDONLY)        = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\0V\1\000"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=1203744, ...}) = 0
mmap2(NULL, 1146228, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb7e76000
madvise(0xb7e76000, 1146228, MADV_SEQUENTIAL|0x1) = 0
mmap2(0xb7f88000, 16384, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x112) = 0xb7f88000
mmap2(0xb7f8c000, 7540, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xb7f8c000
close(3)                                = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7e75000
mprotect(0xb7f88000, 4096, PROT_READ)   = 0
mprotect(0xb7fbe000, 4096, PROT_READ)   = 0
munmap(0xb7f8e000, 107853)              = 0
open("/dev/urandom", O_RDONLY)          = 3
read(3, "\225\271\325\31", 4)           = 4
close(3)                                = 0
write(2, "irrecord: irrecord does not make"..., 56irrecord: irrecord does not make sense without hardware
) = 56
exit_group(1)                           = ?
Process 16649 detached

it complains missing hardware even when using -d option !!!

at last, I have tried vanilla from http://www.lirc.org/html/ , and it seems to work better:
# /home/tmp/lirc-0.8.0/daemons/irrecord -d/dev/usbirboy /tmp/lircd.conf
irrecord -  application for recording IR-codes for usage with lirc

then is asks me to press buttons, as normal ...

to me, all binaries generated by ebuild are faulty ... likely unable to parse CLI arguments ... 

From here, if vanilla works for me, I will stop tracking bug if the Gentoo-build-emerged binary, and will install and use vanilla app.
Comment 5 Matthias Schwarzott gentoo-dev 2006-04-20 08:19:15 UTC
Do you have your needed driver loaded? Seems to me like an existing device node without driver behind.
If the driver is from lirc directly: Did you set LIRC_OPTS to a good value when compiling lirc?

If you want to compile all drivers you can set
LIRC_OPTS="--with-driver=all"
in /etc/make.conf.
Comment 6 DEMAINE Benoît-Pierre, aka DoubleHP 2006-04-29 05:09:25 UTC
ah, I remember linuxgate.so is a virtual library ... address given by ldd is absolute adress of routine in kernel space ... still, thats not the point with "missing hardware".

Yes hardware is working with verbatim hand compiled daemon.
driver is loaded and works with latest version of source from lirc.org.

I dont need LIRC_OPTS since I use USB device IrBoy ! loaded driver with hotplug already !

LIRC_OPTS="--with-driver=all"
will not include IrBoy any way, 

AND
wont fix since home build daemon works. problem IS FROM EBUILD. Verbatim source works. I forgot a bit about that bug, but from memory problem is linked with "gentoo patched stuff" not able to find conf file.
Comment 7 Matthias Schwarzott gentoo-dev 2006-06-07 22:38:07 UTC
Added usbirboy to Summary, and added Homepage.
Comment 8 Matthias Schwarzott gentoo-dev 2006-06-08 06:19:15 UTC
Does the daemon work if you compile lirc with
LIRC_DEVICES="userspace" (or all)

or for older lirc: LIRC_OPTS="--with-driver=userspace" (or all)

If this works one could add usbirboy as an ebuild and add
LIRC_DEVICES="usbirboy" (will not work atm).

Zzam
Comment 9 DEMAINE Benoît-Pierre, aka DoubleHP 2006-06-08 08:18:45 UTC
(In reply to comment #8)
> Does the daemon work if you compile lirc with

I do not understand your point. Hand compile from verbatim sources work perfectly when I download them myself from sourceforge.

In actual case, ebuild breaks Lirc ! Maybe Gentoo inserts patches, or build commands inserts options that I dont have with the default
configure && make && make install

IrBoy guys do not provide any patch for Lirc: the device is 100% compliant with verbatim sources (provided required KERNEL module have been loeaded by udev).
Comment 10 Matthias Schwarzott gentoo-dev 2006-06-08 11:19:43 UTC
(In reply to comment #9)
> (In reply to comment #8)
> > Does the daemon work if you compile lirc with
> 
> I do not understand your point. Hand compile from verbatim sources work
> perfectly when I download them myself from sourceforge.
> 
> In actual case, ebuild breaks Lirc ! Maybe Gentoo inserts patches, or build
> commands inserts options that I dont have with the default
> configure && make && make install
> 
Gentoo does only add a patch for lirc to compile with kernel 2.6.16 but this is irrelevant to you.


> IrBoy guys do not provide any patch for Lirc: the device is 100% compliant with
> verbatim sources (provided required KERNEL module have been loeaded by udev).
> 
I will create an ebuild for usbirboy.

And now the thing for you to test:

Please try out this:
For lirc-0.8.0-r1 set LIRC_DEVICES="userspace"
or for lirc-0.8.0 set LIRC_OPTS="--with-drivers=userspace"
emerge lirc

This should result in about the same configured lirc-daemon.

Then try if it works like your hand-compiled lirc.
If yes, report it here and I can integrate this into the ebuild.

You can also come to IRC (Network: Freenode) #gentoo-vdr.
Comment 11 DEMAINE Benoît-Pierre, aka DoubleHP 2006-06-13 03:12:23 UTC
> Gentoo does only add a patch for lirc to compile with kernel 2.6.16 but this is
> irrelevant to you.

but ... vanilla source does work fine on 2.6 ! so, IMHO, your patch is useless.

going to test your options today. More news within 24h.
Comment 12 DEMAINE Benoît-Pierre, aka DoubleHP 2006-06-13 03:14:32 UTC
You also told about writing an ebuild for IrBoy ... but at which point du you want this ebuild to be dedicated ?

only kernel driver ?
also including firmware ?

a new patch for LIRC tree ? what would be imho useless since vanilla works.
Comment 13 DEMAINE Benoît-Pierre, aka DoubleHP 2006-06-13 03:15:46 UTC
root@moon_gen:~# LIRC_OPTS="--with-drivers=userspace" emerge -va lirc

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild   R   ] app-misc/lirc-0.8.0  USE="X alsa doc usb -debug" 502 kB

Total size of downloads: 502 kB

Would you like to merge these packages? [Yes/No]
>>> Emerging (1 of 1) app-misc/lirc-0.8.0 to /

[...]

checking for linux/input.h... yes
checking sys/soundcard.h usability... yes
checking sys/soundcard.h presence... yes
checking for sys/soundcard.h... yes
configure: error: no driver specified, try ./configure --help

!!! Please attach the following file when filing a report to bugs.gentoo.org:
!!! /mnt/big/portage/lirc-0.8.0/work/lirc-0.8.0/config.log

!!! ERROR: app-misc/lirc-0.8.0 failed.
Call stack:
  ebuild.sh, line 1527:   Called dyn_compile
  ebuild.sh, line 931:   Called src_compile
  lirc-0.8.0.ebuild, line 115:   Called econf '--localstatedir=/var' '--with-sys
log=LOG_DAEMON' '--enable-sandboxed' '--with-kerneldir=/usr/src/linux' '--with-m
oduledir=/lib/modules/2.6.16-gentoo-r8-Gentoo-moon_07/misc' '--disable-debug' '-
-with-X' '--with-drivers=userspace'
  ebuild.sh, line 533:   Called die

Trying -r1 within hours.
Comment 14 DEMAINE Benoît-Pierre, aka DoubleHP 2006-06-13 03:21:59 UTC
what happened with the last error is that ... I emerged sucessfully the ebuild long time ago, and then, overwrittent the binaries with "make install" of vanilla. That why portage thinks I use lirc-0.8.0 and says it will "Re-install it" ... when in fact, I am not using it ... ok thats dirty, but it have been working for weeks now, and next time at upgrade is available for the ebuild, bah, portage is gonna replace my actual vanilla silently :)

I prefer sending seperate comments, so that people can reply topic-to-topic using references to comment number ... easier IMHO than few long comments. (I know it makes more emails for CC )
Comment 15 DEMAINE Benoît-Pierre, aka DoubleHP 2006-06-13 05:14:07 UTC
root@moon_gen:~# emerge -va =lirc-0.8.0-r1

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild     U ] app-misc/lirc-0.8.0-r1 [0.8.0] USE="X alsa doc transmitter% usb -debug -hardware-carrier%" LIRC_DEVICES="userspace% -act200l% -act220l% -adaptec% -all% -alsa_usb% -animax% -atilibusb% -atiusb% -audio% -audio_alsa% -avermedia% -avermedia98% -avermedia_vdomate% -bestbuy% -bestbuy2% -breakoutbox% -bte% -bw6130% -caraca% -chronos% -cmdir% -com1% -com2% -com3% -com4% -cph06x% -creative% -creative_infracd% -devinput% -digimatrix% -dsp% -dvico% -ea65% -exaudio% -flyvideo% -gvbctv5pci% -hauppauge% -hauppauge_dvb% -hercules_smarttv_stereo% -igorplugusb% -imon% -imon_pad% -imon_pad2keys% -imon_rsc% -irdeo% -irdeo_remote% -irman% -irreal% -it87% -knc_one% -kworld% -leadtek_0007% -leadtek_0010% -leadtek_pvr2000% -livedrive_midi% -livedrive_seq% -logitech% -lpt1% -lpt2% -mceusb% -mceusb2% -mediafocusI% -mouseremote% -mouseremote_ps2% -mp3anywhere% -nslu2% -packard_bell% -parallel% -pcmak% -pcmak_usb% -pctv% -pixelview_bt878% -pixelview_pak% -pixelview_pro% -provideo% -realmagic% -remotemaster% -sa1100% -sasem% -serial% -serial_igor_cesko% -silitek% -sir% -slinke% -streamzap% -tekram% -tekram_bt829% -tira% -tvbox% -udp% -uirt2% -uirt2_raw% -xboxusb%" 0 kB

Total size of downloads: 0 kB

Would you like to merge these packages? [Yes/No]

Ebuild works fine now. Over-written vanilla as said before. restarted daemon; just notify mayybe in "enotice" that USBIrBoy shall be used with that userspace option.

Closing, and creating indep bug for ebuild querry: bug #136642