Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 439538 - app-misc/lirc-0.9.0-r2 fails to compile on newer kernels: fatal error: asm/system.h: No such file or directory
Summary: app-misc/lirc-0.9.0-r2 fails to compile on newer kernels: fatal error: asm/sy...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: AMD64 Linux
: Normal major (vote)
Assignee: Television related Applications in Gentoo's Portage
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-10-24 18:08 UTC by Andrei Mihăilă
Modified: 2012-10-24 19:54 UTC (History)
0 users

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


Attachments
The build log (build.log,33.49 KB, text/plain)
2012-10-24 18:12 UTC, Andrei Mihăilă
Details
Patch for the source code that removes the include for asm/system.h on newer kernels (lirc-0.9.0-kernel-3.5.0-fixes.patch,993 bytes, patch)
2012-10-24 18:16 UTC, Andrei Mihăilă
Details | Diff
Modified ebuild that applies the patch above (lirc-0.9.0-r2.ebuild,12.59 KB, text/plain)
2012-10-24 18:17 UTC, Andrei Mihăilă
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andrei Mihăilă 2012-10-24 18:08:33 UTC
app-misc/lirc-0.9.0-r2 fails to compile on kernel 3.6.x (had the same problem on some older kernels as well, 3.5.x for example). The error is:

/var/tmp/portage/app-misc/lirc-0.9.0-r2/work/lirc-0.9.0/drivers/lirc_serial/lirc_serial.c:69:24: fatal error: asm/system.h: No such file or directory

Based on the descriptions of the commits in the kernel the asm/system.h file was disintegrated. Here is a merge made by Linus Torvalds http://git.kernel.org/?p=linux/kernel/git/torvalds/linux.git;a=commit;h=0195c00244dc2e9f522475868fa278c473ba7339 that is related to the issue.

Possible solutions:
If I create an asm/system.h file in the directory where the sources are compiled (by editing the ebuild for example) I can get it to compile (but that will not work for every kernel).

A patch for the files that include asm/system.h (attached). It seems that completely removing the line (if the kernel is newer) does the trick - or at least it did it for me, didn't have any issues with the serial driver (the only one that I use).

Reproducible: Always

Steps to Reproduce:
1. emerge -1av =lirc-0.9.0-r2

Actual Results:  
emerge -1av =lirc-0.9.0-r2::gentoo

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

Calculating dependencies... done!
[ebuild   R    ] app-misc/lirc-0.9.0-r2::gentoo [0.9.0-r2::local] USE="X -debug -doc -hardware-carrier -static-libs -transmitter" LIRC_DEVICES="serial -accent -act200l -act220l -adaptec -all -alsa_usb -animax -asusdh -atilibusb -atiusb -audio -audio_alsa -avermedia -avermedia98 -avermedia_vdomate -awlibusb -bestbuy -bestbuy2 -breakoutbox -bte -bw6130 -caraca -chronos -commandir -cph06x -creative -creative_infracd -devinput -digimatrix -dsp -dvico -ea65 -ene0100 -exaudio -flyvideo -ftdi -gvbctv5pci -hauppauge -hauppauge_dvb -hercules_smarttv_stereo -i2cuser -igorplugusb -iguanaIR -imon -imon_24g -imon_knob -imon_lcd -imon_pad -imon_rsc -inputlirc -irdeo -irdeo_remote -irlink -irman -irreal -it87 -ite8709 -knc_one -kworld -leadtek_0007 -leadtek_0010 -leadtek_pvr2000 -livedrive_midi -livedrive_seq -logitech -macmini -mediafocusI -mouseremote -mouseremote_ps2 -mp3anywhere -mplay -nslu2 -packard_bell -parallel -pcmak -pcmak_usb -pctv -pixelview_bt878 -pixelview_pak -pixelview_pro -provideo -realmagic -remote_wonder_plus -remotemaster -sa1100 -samsung -sasem -sb0540 -serial_igor_cesko -silitek -sir -slinke -streamzap -tekram -tekram_bt829 -tira -ttusbir -tuxbox -tvbox -udp -uirt2 -uirt2_raw -usb_uirt_raw -usbirboy -usbx -userspace -wpc8769l -xboxusb" 0 kB

Total: 1 package (1 reinstall), Size of downloads: 0 kB

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

...........................................

  x86_64-pc-linux-gnu-gcc -Wp,-MD,/var/tmp/portage/app-misc/lirc-0.9.0-r2/work/lirc-0.9.0/drivers/lirc_serial/.lirc_serial.o.d  -nostdinc -isystem /usr/lib/gcc/x86_64-pc-linux-gnu/4.5.4/include -I/usr/src/linux-3.6.1-gentoo/arch/x86/include -Iarch/x86/include/generated -Iinclude  -include /usr/src/linux-3.6.1-gentoo/include/linux/kconfig.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 -m64 -march=core2 -mno-red-zone -mcmodel=kernel -funit-at-a-time -maccumulate-outgoing-args -fstack-protector -DCONFIG_X86_X32_ABI -DCONFIG_AS_CFI=1 -DCONFIG_AS_CFI_SIGNAL_FRAME=1 -DCONFIG_AS_CFI_SECTIONS=1 -DCONFIG_AS_FXSAVEQ=1 -DCONFIG_AS_AVX=1 -pipe -Wno-sign-compare -fno-asynchronous-unwind-tables -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -mno-avx -Wframe-larger-than=2048 -fno-omit-frame-pointer -fno-optimize-sibling-calls -Wdeclaration-after-statement -Wno-pointer-sign -fno-strict-overflow -fconserve-stack -DCC_HAVE_ASM_GOTO -DIRCTL_DEV_MAJOR=61 -DEXPORT_SYMTAB -DHAVE_CONFIG_H -I. -I../.. -I/var/tmp/portage/app-misc/lirc-0.9.0-r2/work/lirc-0.9.0/drivers/lirc_serial/. -I/var/tmp/portage/app-misc/lirc-0.9.0-r2/work/lirc-0.9.0/drivers/lirc_serial/. -I/var/tmp/portage/app-misc/lirc-0.9.0-r2/work/lirc-0.9.0/drivers/lirc_serial/../.. -I/var/tmp/portage/app-misc/lirc-0.9.0-r2/work/lirc-0.9.0/drivers/lirc_serial/../.. -I/usr/src/linux//include/ -I/usr/src/linux//drivers/media/video/  -DMODULE  -D"KBUILD_STR(s)=#s" -D"KBUILD_BASENAME=KBUILD_STR(lirc_serial)"  -D"KBUILD_MODNAME=KBUILD_STR(lirc_serial)" -c -o /var/tmp/portage/app-misc/lirc-0.9.0-r2/work/lirc-0.9.0/drivers/lirc_serial/lirc_serial.o /var/tmp/portage/app-misc/lirc-0.9.0-r2/work/lirc-0.9.0/drivers/lirc_serial/lirc_serial.c
/var/tmp/portage/app-misc/lirc-0.9.0-r2/work/lirc-0.9.0/drivers/lirc_serial/lirc_serial.c:69:24: fatal error: asm/system.h: No such file or directory
compilation terminated.
make[3]: *** [/var/tmp/portage/app-misc/lirc-0.9.0-r2/work/lirc-0.9.0/drivers/lirc_serial/lirc_serial.o] Error 1
make[2]: *** [_module_/var/tmp/portage/app-misc/lirc-0.9.0-r2/work/lirc-0.9.0/drivers/lirc_serial] Error 2
make[2]: Leaving directory `/usr/src/linux-3.6.1-gentoo'
make[1]: *** [lirc_serial.o] Error 2
make[1]: Leaving directory `/var/tmp/portage/app-misc/lirc-0.9.0-r2/work/lirc-0.9.0/drivers/lirc_serial'
make: *** [all-recursive] Error 1
 * ERROR: app-misc/lirc-0.9.0-r2 failed (compile phase):
 *   emake failed
 * 
 * If you need support, post the output of `emerge --info '=app-misc/lirc-0.9.0-r2'`,
 * the complete build log and the output of `emerge -pqv '=app-misc/lirc-0.9.0-r2'`.
 * The complete build log is located at '/var/tmp/portage/app-misc/lirc-0.9.0-r2/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/app-misc/lirc-0.9.0-r2/temp/environment'.
 * Working directory: '/var/tmp/portage/app-misc/lirc-0.9.0-r2/work/lirc-0.9.0/drivers'
 * S: '/var/tmp/portage/app-misc/lirc-0.9.0-r2/work/lirc-0.9.0'

>>> Failed to emerge app-misc/lirc-0.9.0-r2

 * Messages for package app-misc/lirc-0.9.0-r2:

 * Compiling support for device serial
 * Setting default lirc-device to /dev/lirc0
 * ERROR: app-misc/lirc-0.9.0-r2 failed (compile phase):
 *   emake failed
 * 
 * If you need support, post the output of `emerge --info '=app-misc/lirc-0.9.0-r2'`,
 * the complete build log and the output of `emerge -pqv '=app-misc/lirc-0.9.0-r2'`.
 * The complete build log is located at '/var/tmp/portage/app-misc/lirc-0.9.0-r2/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/app-misc/lirc-0.9.0-r2/temp/environment'.
 * Working directory: '/var/tmp/portage/app-misc/lirc-0.9.0-r2/work/lirc-0.9.0/drivers'
 * S: '/var/tmp/portage/app-misc/lirc-0.9.0-r2/work/lirc-0.9.0'

Expected Results:  
The package should compile.
Comment 1 Andrei Mihăilă 2012-10-24 18:12:41 UTC
Created attachment 327316 [details]
The build log
Comment 2 Andrei Mihăilă 2012-10-24 18:13:18 UTC
Here is my emerge info:

emerge --info '=app-misc/lirc-0.9.0-r2'
Portage 2.2.0_alpha137 (default/linux/amd64/10.0/desktop/kde, gcc-4.5.4, glibc-2.15-r3, 3.6.2-gentoo x86_64)
=================================================================
                        System Settings
=================================================================
System uname: Linux-3.6.2-gentoo-x86_64-Intel-R-_Core-TM-2_Quad_CPU_Q9550_@_2.83GHz-with-gentoo-2.2
Timestamp of tree: Wed, 24 Oct 2012 17:15:01 +0000
app-shells/bash:          4.2_p37
dev-java/java-config:     2.1.12
dev-lang/python:          2.7.3-r2, 3.2.3-r1
dev-util/cmake:           2.8.9-r1
dev-util/pkgconfig:       0.27.1
sys-apps/baselayout:      2.2
sys-apps/openrc:          0.10.5
sys-apps/sandbox:         2.6
sys-devel/autoconf:       2.13, 2.69
sys-devel/automake:       1.10.3, 1.11.5, 1.12.4
sys-devel/binutils:       2.22.90
sys-devel/gcc:            4.5.4, 4.6.3
sys-devel/gcc-config:     1.7.3
sys-devel/libtool:        2.4.2
sys-devel/make:           3.82-r4
sys-kernel/linux-headers: 3.6 (virtual/os-headers)
sys-libs/glibc:           2.15-r3
Repositories: gentoo kde wish mv local
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -msse -msse2 -msse3 -mmmx -msse4.1 -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt /usr/share/openvpn/easy-rsa"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.3/ext-active/ /etc/php/apache2-php5.4/ext-active/ /etc/php/cgi-php5.3/ext-active/ /etc/php/cgi-php5.4/ext-active/ /etc/php/cli-php5.3/ext-active/ /etc/php/cli-php5.4/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-march=native -msse -msse2 -msse3 -mmmx -msse4.1 -O2 -pipe"
DISTDIR="/usr/portage_distfiles"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fail-clean fixlafiles news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="ftp://mirror.qubenet.net/mirror/gentoo/ ftp://gentoo.imj.fr/pub/gentoo/ http://91.121.125.139/gentoo-distfiles/ ftp://mirror.leaseweb.com/gentoo/"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS=""
MAKEOPTS="-j5"
PKGDIR="/usr/portage_packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage/layman/kde /usr/local/portage/layman/wish /usr/local/portage/layman/mv /usr/local/portage"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="X a52 aac acl acpi alsa amd64 bash-completion branding bzip2 cairo cdda cdio cdr cleartype cli cmake consolekit coverart cracklib crypt cups cxx dbus declarative djvu dri dts dv dvd dvdr emboss enca encode exif fam ffmpeg firefox flac fontconfig fontforge g3dvl gallium gdbm gif git glitz gpm gpssync graphics graphite graphviz gsm hddtemp iconv icu imagemagick infinality iproute2 ipv6 jpeg jpeg2k kde kernel-patch kipi lame lastfmradio lcdfilter lcms ldap libnotify lirc lm_sensors lyx lzma mad methodjit minizip mmx mmxext mng modules mp3 mp4 mpeg mudflap multilib mysql ncurses nls nptl nsplugin ofa ogg opengl openmp pam pango pcre pdf pdfimport phonon plasma png policykit postproc ppds pppd prediction private-headers qalculate qt3support qt4 qthelp quicktime qwt readline redeyes reviewboard rss schroedinger semantic-desktop session sftp smp spell sse sse2 sse4_1 ssl ssse3 startup-notification svg taglib tcpd templates theora tiff truetype udev udisks unicode upower usb utils v4l v4l2 valgrind vdpau vorbis x264 xcb xcomposite xetex xinerama xml xscreensaver xv xvid xvmc zip zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci 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 mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LIRC_DEVICES="serial" PHP_TARGETS="php5-3" PYTHON_TARGETS="python3_2" RUBY_TARGETS="ruby18 ruby19" USERLAND="GNU" VIDEO_CARDS="nvidia" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON

=================================================================
                        Package Settings
=================================================================

app-misc/lirc-0.9.0-r2 was built with the following:
USE="X (consolekit) (multilib) (policykit) -debug -doc -hardware-carrier -static-libs -transmitter" LIRC_DEVICES="serial -accent -act200l -act220l -adaptec -all -alsa_usb -animax -asusdh -atilibusb -atiusb -audio -audio_alsa -avermedia -avermedia98 -avermedia_vdomate -awlibusb -bestbuy -bestbuy2 -breakoutbox -bte -bw6130 -caraca -chronos -commandir -cph06x -creative -creative_infracd -devinput -digimatrix -dsp -dvico -ea65 -ene0100 -exaudio -flyvideo -ftdi -gvbctv5pci -hauppauge -hauppauge_dvb -hercules_smarttv_stereo -i2cuser -igorplugusb -iguanaIR -imon -imon_24g -imon_knob -imon_lcd -imon_pad -imon_rsc -inputlirc -irdeo -irdeo_remote -irlink -irman -irreal -it87 -ite8709 -knc_one -kworld -leadtek_0007 -leadtek_0010 -leadtek_pvr2000 -livedrive_midi -livedrive_seq -logitech -macmini -mediafocusI -mouseremote -mouseremote_ps2 -mp3anywhere -mplay -nslu2 -packard_bell -parallel -pcmak -pcmak_usb -pctv -pixelview_bt878 -pixelview_pak -pixelview_pro -provideo -realmagic -remote_wonder_plus -remotemaster -sa1100 -samsung -sasem -sb0540 -serial_igor_cesko -silitek -sir -slinke -streamzap -tekram -tekram_bt829 -tira -ttusbir -tuxbox -tvbox -udp -uirt2 -uirt2_raw -usb_uirt_raw -usbirboy -usbx -userspace -wpc8769l -xboxusb"
LDFLAGS="-Wl,--as-needed"

emerge -pqv '=app-misc/lirc-0.9.0-r2'
[ebuild   R   ] app-misc/lirc-0.9.0-r2  USE="X -debug -doc -hardware-carrier -static-libs -transmitter" LIRC_DEVICES="serial -accent -act200l -act220l -adaptec -all -alsa_usb -animax -asusdh -atilibusb -atiusb -audio -audio_alsa -avermedia -avermedia98 -avermedia_vdomate -awlibusb -bestbuy -bestbuy2 -breakoutbox -bte -bw6130 -caraca -chronos -commandir -cph06x -creative -creative_infracd -devinput -digimatrix -dsp -dvico -ea65 -ene0100 -exaudio -flyvideo -ftdi -gvbctv5pci -hauppauge -hauppauge_dvb -hercules_smarttv_stereo -i2cuser -igorplugusb -iguanaIR -imon -imon_24g -imon_knob -imon_lcd -imon_pad -imon_rsc -inputlirc -irdeo -irdeo_remote -irlink -irman -irreal -it87 -ite8709 -knc_one -kworld -leadtek_0007 -leadtek_0010 -leadtek_pvr2000 -livedrive_midi -livedrive_seq -logitech -macmini -mediafocusI -mouseremote -mouseremote_ps2 -mp3anywhere -mplay -nslu2 -packard_bell -parallel -pcmak -pcmak_usb -pctv -pixelview_bt878 -pixelview_pak -pixelview_pro -provideo -realmagic -remote_wonder_plus -remotemaster -sa1100 -samsung -sasem -sb0540 -serial_igor_cesko -silitek -sir -slinke -streamzap -tekram -tekram_bt829 -tira -ttusbir -tuxbox -tvbox -udp -uirt2 -uirt2_raw -usb_uirt_raw -usbirboy -usbx -userspace -wpc8769l -xboxusb"
Comment 3 Andrei Mihăilă 2012-10-24 18:16:12 UTC
Created attachment 327318 [details, diff]
Patch for the source code that removes the include for asm/system.h on newer kernels
Comment 4 Andrei Mihăilă 2012-10-24 18:17:02 UTC
Created attachment 327320 [details]
Modified ebuild that applies the patch above
Comment 5 Ian Stakenvicius (RETIRED) gentoo-dev 2012-10-24 18:31:33 UTC
According to http://forums.fedoraforum.org/archive/index.php/t-282144.html , in kernels 3.3 and above <asm/switch_to.h> should be used instead of <asm/system.h>

I think keeping the switch_to #defines set in lirc_serial.c and lirc_sir.c will be more portable than just skipping them.
Comment 6 Ian Stakenvicius (RETIRED) gentoo-dev 2012-10-24 18:40:08 UTC
+  24 Oct 2012; Ian Stakenvicius <axs@gentoo.org> lirc-0.9.0-r2.ebuild,
+  +files/lirc-0.9.0-kernel-3.3.0-fixes.patch:
+  fixed asm/system.h migration issue caused by 3.3+ kernels, bug 439538
+


Works for me; please test and reopen if there are issues
Comment 7 Andrei Mihăilă 2012-10-24 19:54:57 UTC
(In reply to comment #6)
> +  24 Oct 2012; Ian Stakenvicius <axs@gentoo.org> lirc-0.9.0-r2.ebuild,
> +  +files/lirc-0.9.0-kernel-3.3.0-fixes.patch:
> +  fixed asm/system.h migration issue caused by 3.3+ kernels, bug 439538
> +
> 
> 
> Works for me; please test and reopen if there are issues

Yes, having the include to switch_to should make them more portable.

Copied the files over from http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/app-misc/lirc/files/ (to be able to test it now). Works for me too.

Thank you for the quick response!