Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 265443 - app-misc/lirc-0.8.4: Some drivers (eg lirc_imon) will not build against kernel-2.6.29+
Summary: app-misc/lirc-0.8.4: Some drivers (eg lirc_imon) will not build against kerne...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Television related Applications in Gentoo's Portage
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 264722
  Show dependency tree
 
Reported: 2009-04-08 13:10 UTC by Dale Pontius
Modified: 2012-04-29 12:53 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Suggested patch for making lirc 0.8.4(a) compile for kernel 2.6.29+ (lirc-0.8.4-kernel-2.6.29.patch,3.01 KB, patch)
2009-05-13 06:30 UTC, Micha Kalfon
Details | Diff
An updated ebuild for applying the kernel-2.6.29+ patch (lirc-0.8.4.ebuild,8.89 KB, text/plain)
2009-05-13 06:35 UTC, Micha Kalfon
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Dale Pontius 2009-04-08 13:10:36 UTC
There are macros/procedures "info" and "warn" used by lirc_imon and some other lirc kernel drivers.  Apparently "info" and "warn" no longer exist in kernel-2.6.29+.  I got this to build, load, and work by substituting "printk" in those cases.

Reproducible: Always

Steps to Reproduce:
1.Boot kernel-2.6.29+
2.Try to "emerge -a1v lirc" using some devices such as "lirc_imon"
3.Fail because of "info" and "warn" 

Actual Results:  
emerge fails, drivers not built, obviously won't load on new kernel.

Expected Results:  
emerge to finish successfully, install drivers, etc.

I found a reference to this on the web, and wrote a small sed script to changes instances of "info" and "warn" to "printk", with a few minor flourishes.  I'm sure I could have done a better job, but didn't really know what the heck I was doing.  But it worked.  Short script below:
s@info("@printk("INFO: @g
s@warn("@printk("WARN: @g
s@info(MOD@printk("INFO: " MOD@g

This should probably go upstream.  On quick perusal it affects more than just lirc_imon, but I don't have a handle on what or how many other devices.
Comment 1 Dale Pontius 2009-04-10 15:39:17 UTC
I just double-checked the rest of lirc-0.8.4 and find that "info" is used in lirc_atiusb, lirc_cmdir, lirc_gpio, lirc_imon, lirc_mceusb, lirc_sasem and "warn" is used in lirc_imon and lirc_sasem.  This problem isn't unique to lirc_imon.  I've fielded one question in gentoo forums from someone having trouble with lirc_mceusb.
Comment 2 gregorcy 2009-04-15 01:43:44 UTC
I know this is probably a newby question but what do I run the short script against?  I looked at the ebuild but didn't see any INFO or WARN
Comment 3 Dale Pontius 2009-04-15 13:10:54 UTC
First thing, that's obviously a sed script, not shell or any such.  You apply it against the source code of the lirc driver you wish to fix.  In my case, I went into "/var/tmp/portage/app-misc/lirc-0.8.4/work.../lirc_imon" and did "sed -f (my sed script) lirc_imon.c >tempfile && mv tempfile lirc_imon.c".  If you're doing this with one of the other drivers, you obviously need to be in another place, working with another file.
Comment 4 Micha Kalfon 2009-05-13 06:30:56 UTC
Created attachment 191116 [details, diff]
Suggested patch for making lirc 0.8.4(a) compile for kernel 2.6.29+

This is a temporary patch I checked for the imon driver - should work for the other drivers that used the info/warn/err macros from usb.h. It is temporary because hopefully future lirc versions won't use these macros at all.
Comment 5 Micha Kalfon 2009-05-13 06:35:30 UTC
Created attachment 191117 [details]
An updated ebuild for applying the kernel-2.6.29+ patch

The ebuild I use in a local overlay for building lirc with the kernel-2.6.29+ patch, if anyone finds it useful...
Comment 6 Daniel Drake (RETIRED) gentoo-dev 2009-05-16 15:27:15 UTC
ping... 2.6.29 is planned to go stable on 23rd may, would be nice to see this fixed
Comment 7 Richard H. 2009-06-07 11:18:38 UTC
it IS now stable. And yes, imon_pad does NOT compile.
Will try it with the attached files now...

Thanks!
Comment 8 Richard H. 2009-06-07 12:15:58 UTC
works with imon_pad, thanks once more.
Comment 9 Dale Pontius 2011-01-15 22:08:24 UTC
I am happily running lirc-0.8.7 unmasked, and was running lirc-0.8.6 prior to that.  I think this problem was solved by new releases.  Am I the one to fix/close this problem, or is that the developer's job?  Should I call it "FIXED" since the newer releases fix the problem and have been promoted to stable?