Bug List: (This bug is not in your last search results)   Show last search results      Search page      Enter new bug
Bug#: 200295
Alias:
Product:
Component:
Status: RESOLVED
Resolution: FIXED
Assigned To: Mobile Herd <mobile@gentoo.org>
Hardware:
OS:
Version:
Priority:
Severity:
Reporter: Cyberjun <cyberjun@gmail.com>
Add CC:
CC:
Remove selected CCs
URL:
Summary:
Status Whiteboard:
Keywords:

Filename Description Type Creator Created Size Actions
irda-utils-0.9.18.ebuild.diff irda-utils-0.9.18.ebuild.diff patch Jakub Moc (RETIRED) 2007-11-25 17:35 0000 1.72 KB Details | Diff
irda.diff irda-utils-0.9.18.diff patch Francisco Javier 2007-11-30 05:19 0000 1.43 KB Details | Diff
irda.diff Irda-utils-0.9.18.ebuild text/plain Francisco Javier 2007-11-30 05:24 0000 1.59 KB Details
52-irda.rules 52-irda.rules text/plain Francisco Javier 2007-11-30 05:25 0000 268 bytes Details
irda.sh irda.sh (udev-script for attaching usb-irda dongles) text/plain Stefan Briesenick 2008-03-06 20:19 0000 573 bytes Details
irda /etc/conf.d/irda text/plain Cyberjun 2008-03-23 05:22 0000 1.05 KB Details
irda /etc/modprobe.d/irda text/plain Cyberjun 2008-03-23 05:24 0000 1.90 KB Details
smsc_ircc2 /etc/modules.d/smsc_ircc2 text/plain Cyberjun 2008-03-23 05:25 0000 218 bytes Details
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 200295 depends on: Show dependency tree
Bug 200295 blocks: 200808
Votes: 0    Show votes for this bug    Vote for this bug

Additional Comments: (this is where you put emerge --info)


Not eligible to see or edit group visibility for this bug.






View Bug Activity   |   Format For Printing   |   XML   |   Clone This Bug


Description:   Opened: 2007-11-25 16:31 0000
The latest ~x86 version of the irda-utils package fails to compile smcinit
binary. Still the emerge process completes successfully. Since
app-laptop/smcinit has been marked for removal (bug # 194859), this is
worrisome. 

Reproducible: Always

Steps to Reproduce:
1. emerge =irda-utils-0.9.18
2. smcinit fails to compile
3.

Actual Results:  
The smcinit fails to compile withh error:
........<snip>.........
 [CC]  irdadump
 [CC]  smcinit.c
 [CC]  smcinit
/usr/lib/gcc/i686-pc-linux-gnu/4.1.2/../../../libpci.a(names.o): In function
`pci_load_name_list':
(.text+0x533): undefined reference to `gzopen'
/usr/lib/gcc/i686-pc-linux-gnu/4.1.2/../../../libpci.a(names.o): In function
`pci_load_name_list':
(.text+0x5cd): undefined reference to `gzgets'
/usr/lib/gcc/i686-pc-linux-gnu/4.1.2/../../../libpci.a(names.o): In function
`.L154':
(.text+0x6d3): undefined reference to `gzclose'
/usr/lib/gcc/i686-pc-linux-gnu/4.1.2/../../../libpci.a(names.o): In function
`.L154':
(.text+0x6f8): undefined reference to `gzeof'
/usr/lib/gcc/i686-pc-linux-gnu/4.1.2/../../../libpci.a(names.o): In function
`.L154':
(.text+0x788): undefined reference to `gzclose'
/usr/lib/gcc/i686-pc-linux-gnu/4.1.2/../../../libpci.a(names.o): In function
`.L154':
(.text+0xb9c): undefined reference to `gzopen'
/usr/lib/gcc/i686-pc-linux-gnu/4.1.2/../../../libpci.a(names.o): In function
`.L155':
(.text+0xd33): undefined reference to `gzerror'
/usr/lib/gcc/i686-pc-linux-gnu/4.1.2/../../../libpci.a(names.o): In function
`.L155':
(.text+0xd53): undefined reference to `gzclose'
collect2: ld returned 1 exit status
make[1]: *** [smcinit] Error 1
make: [all] Error 2 (ignored)
>>> Source compiled.


Expected Results:  
The smcinit binary should be compiled and installed successfully

emerge --info
Portage 2.1.3.19 (default-linux/x86/2006.1/desktop, gcc-4.1.2, glibc-2.6.1-r0,
2.6.22-suspend2-r2 i686)
=================================================================
System uname: 2.6.22-suspend2-r2 i686 Intel(R) Pentium(R) M processor 1700MHz
Timestamp of tree: Sun, 25 Nov 2007 06:00:03 +0000
app-shells/bash:     3.2_p17
dev-java/java-config: 1.3.7, 2.0.33-r1
dev-lang/python:     2.4.4-r6
dev-python/pycrypto: 2.0.1-r6
sys-apps/baselayout: 1.12.9-r2
sys-apps/sandbox:    1.2.18.1-r2
sys-devel/autoconf:  2.13, 2.61-r1
sys-devel/automake:  1.4_p6, 1.5, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10
sys-devel/binutils:  2.18-r1
sys-devel/gcc-config: 1.3.16
sys-devel/libtool:   1.5.24
virtual/os-headers:  2.6.22-r2
ACCEPT_KEYWORDS="x86"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=pentium-m -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/X11/xkb"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/gconf /etc/revdep-rebuild
/etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-O2 -march=pentium-m -pipe"
DISTDIR="/var/portage/distfiles"
FEATURES="collision-protect distlocks metadata-transfer sandbox sfperms strict
unmerge-orphans userfetch"
GENTOO_MIRRORS="http://distfiles.gentoo.org
http://distro.ibiblio.org/pub/linux/distributions/gentoo"
MAKEOPTS="-j2"
PKGDIR="/var/portage/packages"
PORTAGE_RSYNC_EXTRA_OPTS="--progress"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress
--force --whole-file --delete --delete-after --stats --timeout=180
--exclude=/distfiles --exclude=/local --exclude=/packages
--filter=H_**/files/digest-*"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/var/portage"
PORTDIR_OVERLAY="/var/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="3dnow 3dnowext X a52 acl acpi alsa asf avi berkdb bitmap-fonts bzip2 cairo
cdr cli cracklib crypt cups curl dbus directfb dri dts dvd dvdr dvdread emboss
encode esd exif fam fbcon firefox flac ftp gdbm gif gnome gpm gstreamer gtk
gtk2 hal iconv idn ieee1394 isdnlog java jpeg lcms ldap lirc mad midi mikmod
mmx mmxext mng mp3 mpeg mudflap ncurses nls nptl nptlonly nsplugin nvidia ogg
oggvorbis opengl openmp pam pcmcia pcre perl png ppds pppd python quicktime
readline real reflection samba sdl session spell spl sse sse2 ssl tcpd theora
tiff truetype truetype-fonts type1-fonts usb vcd video4linux vorbis win32codecs
wmf x86 xine xml xorg xv xvid zlib" ALSA_CARDS="ali5451 als4000 atiixp
atiixp-modem bt87x ca0106 cmipci emu10k1 emu10k1x ens1370 ens1371 es1938 es1968
fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx
via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop
empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi
null plug rate route share shm softvol" ELIBC="glibc" INPUT_DEVICES="keyboard
mouse synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk
hd44780 lb216 lcdm001 mtxorb ncurses text" USERLAND="GNU" VIDEO_CARDS="nv
nvidia vesa fbdev"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL,
LDFLAGS, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS

------- Comment #1 From Jakub Moc (RETIRED) 2007-11-25 16:40:15 0000 -------
- missing sys-apps/pciutils dependency
- fails when sys-apps/pciutils is compiled w/ USE=zlib
- this completely ignored CFLAGS
- crosscompile fails as well, as it calls gcc/ld directly

------- Comment #2 From Jakub Moc (RETIRED) 2007-11-25 17:35:10 0000 -------
Created an attachment (id=136993) [details]
irda-utils-0.9.18.ebuild.diff

Please test this. Fixes the above mentioned issues, removes redundant sed
dependency (part of system) plus the following QA notice:

 * QA Notice: Package has poor programming practices which may compile
 *            fine but exhibit random runtime failures.
 * irpsion5.c:467: warning: dereferencing type-punned pointer will break
strict-aliasing rules

------- Comment #3 From Cyberjun 2007-11-26 11:42:14 0000 -------
(In reply to comment #2)
The new ebuild works fine on my arch (x86). It doesn't however install the conf
and init files for smcinit (as app-laptop/smcinit currently does).
Before removing app-laptop/smcinit I hope the config files will also be moved
into the irda-utils package. 

Thanks for the prompt response.

------- Comment #4 From Francisco Javier 2007-11-30 05:19:00 0000 -------
Created an attachment (id=137363) [details]
irda-utils-0.9.18.diff

more elegant patch

------- Comment #5 From Francisco Javier 2007-11-30 05:24:58 0000 -------
Created an attachment (id=137365) [details]
Irda-utils-0.9.18.ebuild

insert udev rules from SUSE

------- Comment #6 From Francisco Javier 2007-11-30 05:25:21 0000 -------
Created an attachment (id=137367) [details]
52-irda.rules

------- Comment #7 From Cyberjun 2008-03-04 13:21:49 0000 -------
Any updates on this one? Will a irda-utils-0.9.18-r1 version be released along
with smcinit conf and init files?

------- Comment #8 From Stefan Briesenick 2008-03-06 20:15:06 0000 -------
irda-rules are NOT good for USB-style IRDA, because the init-script is not
really thought out for this. ;-)

I made a better appoach for myself long time ago. I will try to bring in my
ideas...

first of all my udev-rule:

KERNEL=="irda[0-9]*", RUN+="/lib/udev/irda.sh"

but this is based on an older udev-relase, so maybe it should adapted to your
new rule.

I will attach "irda.sh" asap. stay tuned. That's the most important part. ;-)

------- Comment #9 From Stefan Briesenick 2008-03-06 20:19:39 0000 -------
Created an attachment (id=145434) [details]
irda.sh (udev-script for attaching usb-irda dongles)

this script attaches the new irda-interface. the corresponding "irattach" will
be killed when dongle is unplugged. It only takes care of usb-dongles. All
other types are ignored.

------- Comment #10 From Stefan Briesenick 2008-03-06 21:20:08 0000 -------
ok, added all patches to CVS. hope it works for all of you. At least, it works
for me. ;-)

Wasn't my package, but I needed it also. And this bug was 4 months old. So I've
taken the chance... But please, mobile heard, clean it up. There're some old
and obsolete versions which should be removed. Thanks!

------- Comment #11 From Cyberjun 2008-03-10 03:51:05 0000 -------
The build compiles fine for me as well. Why are the /etc/conf.d/smcinit and
/etc/init.d/smcinit files not included in the package? I need separate startup
script for smcinit, since I have to initialize the chip for gnokii (without
irda).

(In reply to comment #10)
> ok, added all patches to CVS. hope it works for all of you. At least, it works
> for me. ;-)
> 
> Wasn't my package, but I needed it also. And this bug was 4 months old. So I've
> taken the chance... But please, mobile heard, clean it up. There're some old
> and obsolete versions which should be removed. Thanks!
> 

------- Comment #12 From Stefan Briesenick 2008-03-17 21:12:00 0000 -------
hmmm. not found them inside the tarball. I have to check it again. :-/

------- Comment #13 From Stefan Briesenick 2008-03-18 00:14:25 0000 -------
ahhh, this init/conf-stuff is from app-laptop/smcinit.
Ok, I will try to include it.

------- Comment #14 From Stefan Briesenick 2008-03-18 00:24:02 0000 -------
well, it doesn't make sense to have 2 init-scripts for non-usb-irda. we should
merge them into one.

@Cyberjun: can you explain how you setup your dongle?

I don't have this kind of hardware...

------- Comment #15 From Cyberjun 2008-03-18 02:13:35 0000 -------
hi,
         Thanks for having a look at this bug.
I have a Toshiba Satellite M30 laptop. I have to run smcinit with certain
arguments to initialize my chip. Without it no irda communication would work. 

I also use lirc on my machine. It needs access to the irda chip but without
smsc-ircc2 module being loaded (smsc-ircc2 is loaded by irda).

Hence at a given time either lirc would work or irda. Not both. However to work
with any of them I have to execute smcinit (atleast once after a reboot).

So separate smcinit conf.d and init.d scripts are needed in my case. If you
club them with irda, I will be forced to write new scripts for lirc.

I hope my explanation is clear :) 

(In reply to comment #14)
> well, it doesn't make sense to have 2 init-scripts for non-usb-irda. we should
> merge them into one.
> 
> @Cyberjun: can you explain how you setup your dongle?
> 
> I don't have this kind of hardware...
> 

------- Comment #16 From Cyberjun 2008-03-18 02:20:26 0000 -------
Well. I think you can merge them. I just had a look at my startup scripts. I
have already included a call to smcint in /etc/init.d/lircd. So I think if you
merge /etc/init.d/smcinit with irda's scripts, it would be ok. Since not all
people need smcinit, you can put a configuration setting in the conf.d/irda
file for smcinit. 

So the startup script for irda would look in conf.d/irda and if it finds
settings for smcinit, it would execute smcinit with the specified arguments and
then the regular irda stuff.

cheers!

(In reply to comment #15)
> hi,
>          Thanks for having a look at this bug.
> I have a Toshiba Satellite M30 laptop. I have to run smcinit with certain
> arguments to initialize my chip. Without it no irda communication would work. 
> 
> I also use lirc on my machine. It needs access to the irda chip but without
> smsc-ircc2 module being loaded (smsc-ircc2 is loaded by irda).
> 
> Hence at a given time either lirc would work or irda. Not both. However to work
> with any of them I have to execute smcinit (atleast once after a reboot).
> 
> So separate smcinit conf.d and init.d scripts are needed in my case. If you
> club them with irda, I will be forced to write new scripts for lirc.
> 
> I hope my explanation is clear :) 
> 
> (In reply to comment #14)
> > well, it doesn't make sense to have 2 init-scripts for non-usb-irda. we should
> > merge them into one.
> > 
> > @Cyberjun: can you explain how you setup your dongle?
> > 
> > I don't have this kind of hardware...
> > 
> 

------- Comment #17 From Stefan Briesenick 2008-03-21 13:34:58 0000 -------
I'm working on improved init-scripts. I also got an old Toshoba-Notebook with
smc-chip. Please gimme a few days for testing.

------- Comment #18 From Stefan Briesenick 2008-03-21 15:16:18 0000 -------
Ubuntu has a quite advanced IrDA-setup. Quite cool. I try to adapt it for
Gentoo.

------- Comment #19 From Stefan Briesenick 2008-03-22 11:42:49 0000 -------
ok, almost finished. Just a few final tests. I will commit it later this day.

------- Comment #20 From Stefan Briesenick 2008-03-22 18:37:07 0000 -------
ok, *-r2 in CVS. Please check!

Hint: smcinit & friends are configured in /etc/modprobe.d/irda.

------- Comment #21 From Cyberjun 2008-03-23 03:45:38 0000 -------
I can see settings for smsc-ircc2 module both in /etc/modules.d/smsc-ircc2 and
/etc/modprobe.d/irda. Which of the settings will be really used?

(In reply to comment #20)
> ok, *-r2 in CVS. Please check!
> 
> Hint: smcinit & friends are configured in /etc/modprobe.d/irda.
> 

------- Comment #22 From Cyberjun 2008-03-23 05:22:40 0000 -------
Created an attachment (id=146981) [details]
/etc/conf.d/irda

------- Comment #23 From Cyberjun 2008-03-23 05:24:35 0000 -------
Created an attachment (id=146982) [details]
/etc/modprobe.d/irda

------- Comment #24 From Cyberjun 2008-03-23 05:25:09 0000 -------
Created an attachment (id=146983) [details]
/etc/modules.d/smsc_ircc2

------- Comment #25 From Cyberjun 2008-03-23 05:28:07 0000 -------
When I run /etc/init.d/irda start, it doesn't load smsc-ircc2 kernel module. I
have attached my /etc/conf.d/irda, /etc/modprobe.d/irda and
/etc/modules.d/smsc_ircc2 files.

Please advise

(In reply to comment #21)
> I can see settings for smsc-ircc2 module both in /etc/modules.d/smsc-ircc2 and
> /etc/modprobe.d/irda. Which of the settings will be really used?
> 
> (In reply to comment #20)
> > ok, *-r2 in CVS. Please check!
> > 
> > Hint: smcinit & friends are configured in /etc/modprobe.d/irda.
> > 
> 

------- Comment #26 From Stefan Briesenick 2008-03-23 14:16:26 0000 -------
you have to edit /etc/modprobe.d/irda:

# SMC driver
alias irda0 smsc-ircc2
#options smsc-ircc2 ircc_dma=1 ircc_irq=10 ircc_fir=0x0130 ircc_sir=0x02f8

# Some laptops (Toshiba Satellites and others with SMCS LPC47N227) require
# running smcinit to initialize the irda device prior to use. If your device
# is one of them, uncomment the required SMC-IRCC initializer.
#install smsc-ircc2 /usr/sbin/smcinit && /sbin/modprobe -i smsc-ircc2
#install smsc-ircc2 /usr/sbin/tosh1800-smcinit && /sbin/modprobe -i smsc-ircc2
#install smsc-ircc2 /usr/sbin/tosh2450-smcinit && /sbin/modprobe -i smsc-ircc2

you have to uncomment the "alias irda0 smsc-ircc2" part. irattach modprobe
"irda0" (if DEVICE="irda0").

------- Comment #27 From Stefan Briesenick 2008-03-23 14:19:11 0000 -------
and btw: copy over your values from /etc/modules.d/smsc_ircc2 to
/etc/modprobe.d/irda and remove /etc/modules.d/smsc_ircc2 afterwards.

finally: run update-modules

------- Comment #28 From Stefan Briesenick 2008-03-23 14:23:13 0000 -------
oh, well, there's also the LOAD_MODULES= entry in /etc/conf.d/irda, where you
can add further modules (i.e. "smsc_ircc2", but the "alias irda0 smsc_ircc2"
method is preferred!).

------- Comment #29 From Cyberjun 2008-03-23 14:34:46 0000 -------
Superb! It works. However, when I stop the irda service, the modules don't get
unloaded. Under normal circumstances it is not a problem. However, for using
lirc, I need to rmmod smsc_ircc2|ircomm-tty|ircomm|irda.

Since lirc needs lirc-sir module to work on the same irda chip and smsc-ircc2
is already controlling the chip, modprobe lirc-sir fails.

I think we should add/remove modules when the irda script starts. I have
modified /etc/init.d/lircd script to add/remove modules (lirc-sir and
lirc-dev). 

Is there any other solution?


(In reply to comment #28)
> oh, well, there's also the LOAD_MODULES= entry in /etc/conf.d/irda, where you
> can add further modules (i.e. "smsc_ircc2", but the "alias irda0 smsc_ircc2"
> method is preferred!).
> 

------- Comment #30 From Stefan Briesenick 2008-03-23 15:12:37 0000 -------
hmmm. The only thing practical in a multi-irda-device environment (i.e. with
additional IrDA-USB devices) is to remove the configured $DEVICE if it is
irda*.

something like this in stop():

case "${DEVICE]" in
    irda[0-9]*) modprobe -sqr ${DEVICE}
    /dev/ttyS*) modprobe -sqr irtty-sir
esac

I think, this is a good idea. I will add this... ;-)

------- Comment #31 From Stefan Briesenick 2008-03-23 16:03:57 0000 -------
ok, added driver removal in stop(). I don't remove the other general
irda-modules though. But this shouldn't be a problem. Only the specific SIR/FIR
driver is locking your device. As soon it is detached from the IrDA stack, your
device is free for other uses. Please check!

btw: no new revision. Just sync and emerge again.

------- Comment #32 From Cyberjun 2008-03-23 16:52:46 0000 -------
Well I sync'd and emerged irda-utils. However I cannot see any changes in the
stop() function.

(In reply to comment #31)
> ok, added driver removal in stop(). I don't remove the other general
> irda-modules though. But this shouldn't be a problem. Only the specific SIR/FIR
> driver is locking your device. As soon it is detached from the IrDA stack, your
> device is free for other uses. Please check!
> 
> btw: no new revision. Just sync and emerge again.
> 

------- Comment #33 From Stefan Briesenick 2008-03-23 17:01:45 0000 -------
wait an hour and try again.

the changes are in /etc/init.d/irda

------- Comment #34 From Cyberjun 2008-03-24 01:58:03 0000 -------
Wow! Finally everything seems to be in place. I checked running lircd and irda
alternately twice. Each works after stopping the other.

Thanks!

Do you think I should log a bug with lircd so that similar logic of removing
the modules is applied there as well? At the moment I have it working by
customizing the /etc/init.d/lircd file.

(In reply to comment #33)
> wait an hour and try again.
> 
> the changes are in /etc/init.d/irda
> 

------- Comment #35 From Stefan Briesenick 2008-03-24 10:31:45 0000 -------
yes, just file another bug for lirc.

Bug List: (This bug is not in your last search results)   Show last search results      Search page      Enter new bug