After a recent emerge world, lirc stopped building, it seems to be eating the -m parameter. It's inheriting this from the current profile's make.defaults. I found a workaround by commenting out LDFLAGS in the profile's make.defaults, after that the package will compile and install correctly. Reproducible: Always Steps to Reproduce: 1. Emerge lirc Actual Results: /bin/sh ../libtool --tag=CC --mode=link x86_64-pc-linux-gnu-gcc -march=k8 -O2 -pipe -version-info 2:1:2 -m elf_x86_64 -o liblirc_client.la -rpath /usr/lib64 lirc_client.lo libtool: link: x86_64-pc-linux-gnu-gcc -shared -fPIC -DPIC .libs/lirc_client.o -march=k8 -O2 -m -Wl,-soname -Wl,liblirc_client.so.0 -o .libs/liblirc_client.so.0.2.1 /usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/../../../../x86_64-pc-linux-gnu/bin/ld: unrecognised emulation mode: -Wl,-soname Supported emulations: elf_x86_64 elf32_x86_64 elf_i386 i386linux elf_l1om elf_k1om collect2: ld returned 1 exit status make[2]: *** [liblirc_client.la] Error 1 make[2]: Leaving directory `/var/tmp/portage/app-misc/lirc-0.9.0/work/lirc-0.9.0/tools' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/var/tmp/portage/app-misc/lirc-0.9.0/work/lirc-0.9.0' make: *** [all] Error 2 emake failed * ERROR: app-misc/lirc-0.9.0 failed (compile phase): * Unable to emake HOSTCC=x86_64-pc-linux-gnu-gcc CROSS_COMPILE=x86_64-pc-linux-gnu- LDFLAGS=-m elf_x86_64 all Expected Results: The package builds and installs correctly. # emerge --info Portage 2.1.10.41 (default/linux/amd64/10.0/desktop/kde, gcc-4.5.3, glibc-2.13-r4, 2.6.32-gentoo-r29 x86_64) ================================================================= System uname: Linux-2.6.32-gentoo-r29-x86_64-Intel-R-_Core-TM-2_CPU_T5200_@_1.60GHz-with-gentoo-2.0.3 Timestamp of tree: Sun, 25 Dec 2011 18:00:01 +0000 app-shells/bash: 4.1_p9 dev-lang/python: 2.7.2-r3, 3.1.4-r3 dev-util/cmake: 2.8.6-r4 dev-util/pkgconfig: 0.26 sys-apps/baselayout: 2.0.3 sys-apps/openrc: 0.9.4 sys-apps/sandbox: 2.5 sys-devel/autoconf: 2.13, 2.68 sys-devel/automake: 1.11.1 sys-devel/binutils: 2.21.1-r1 sys-devel/gcc: 4.5.3-r1 sys-devel/gcc-config: 1.4.1-r1 sys-devel/libtool: 2.4-r1 sys-devel/make: 3.82-r1 sys-kernel/linux-headers: 2.6.39 (virtual/os-headers) sys-libs/glibc: 2.13-r4 Repositories: gentoo ACCEPT_KEYWORDS="amd64" ACCEPT_LICENSE="* -@EULA" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-O2 -pipe -march=native" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo" CXXFLAGS="-O2 -pipe -march=native" DISTDIR="/usr/portage/distfiles" FEATURES="assume-digests binpkg-logs distlocks ebuild-locks fixlafiles news parallel-fetch protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch" FFLAGS="" GENTOO_MIRRORS="http://distfiles.gentoo.org" LDFLAGS="-Wl,-O1 -Wl,--as-needed" MAKEOPTS="-j3" PKGDIR="/usr/portage/packages" PORTAGE_CONFIGROOT="/" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="X a52 aac acl acpi alsa amd64 berkdb bluetooth branding bzip2 cairo cdda cdr cli consolekit cracklib crypt cups cxx dbus declarative dri dts dvd dvdr emboss encode exif fam firefox flac fortran gdbm gdu gif gpm gtk iconv jpeg kde kipi lcms libnotify mad mmx mng modules mp3 mp4 mpeg mudflap multilib ncurses nls nptl nptlonly ogg opengl openmp pam pango pcre pdf phonon plasma png policykit ppds pppd qt3support qt4 readline sdl semantic-desktop session spell sse sse2 ssl startup-notification svg sysfs tcpd tiff truetype udev unicode usb vorbis x264 xcb xcomposite xinerama xml xorg xscreensaver xulrunner xv xvid 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="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 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 keyboard mouse synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIRC_DEVICES="mceusb" PHP_TARGETS="php5-3" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="intel" 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, LINGUAS, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS Commenting out LDFLAGS in /usr/portage/profiles/arch/amd64/make.defaults fixes the problem: # 64bit specific settings. CFLAGS_amd64="-m64" #LDFLAGS_amd64="-m elf_x86_64" CHOST_amd64="x86_64-pc-linux-gnu" More info @ http://forums.gentoo.org/viewtopic-t-906654-highlight-.html
Please attach the entire build log to this bug report.
This is not a lirc problem.
(In reply to comment #2) > This is not a lirc problem. After updating all the packages on my system lirc was the only one I came across with the problem. I've been looking around and it looks like this error crept in a few years ago, then something was done to remove it. Apparently it resurfaced again during this month.
Created attachment 297397 [details] Build log Build log.
i don't think this has anything to do with libtool flag sorting. the lirc build is mixing raw and unraw linker flags in LDFLAGS. you can only have it one way. the lirc ebuild most likely needs to invoke linux-mod.eclass' helpers *only* for the kernel modules (i.e. stuff under drivers/), and otherwise run `make` for the userland tools (i.e. stuff under daemons/tools/etc...).
I'm getting a similar error with lirc and gcc. /bin/sh ../libtool --tag=CC --mode=link x86_64-pc-linux-gnu-gcc -O3 -march=bdver1 -pipe -I/usr/include/tirpc -m elf_x86_64 -o irrecord irrecord.o config_file.o dump_config.o input_map.o transmit.o libhw_module.a receive.o libtool: link: x86_64-pc-linux-gnu-gcc -O3 -march=bdver1 -pipe -I/usr/include/tirpc -m elf_x86_64 -o irrecord irrecord.o config_file.o dump_config.o input_map.o transmit.o receive.o libhw_module.a x86_64-pc-linux-gnu-gcc: error: elf_x86_64: No such file or directory make[3]: *** [irrecord] Error 1 make[3]: Leaving directory `/var/tmp/portage/app-misc/lirc-0.9.0/work/lirc-0.9.0/daemons' make[2]: *** [all] Error 2 make[2]: Leaving directory `/var/tmp/portage/app-misc/lirc-0.9.0/work/lirc-0.9.0/daemons' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/var/tmp/portage/app-misc/lirc-0.9.0/work/lirc-0.9.0' make: *** [all] Error 2 gcc --help say that it passes -m automatically to sub-processes however in my testing it does not. # x86_64-pc-linux-gnu-gcc --help Usage: x86_64-pc-linux-gnu-gcc [options] file... Options: .......... .......... Options starting with -g, -f, -m, -O, -W, or --param are automatically passed on to the various sub-processes invoked by x86_64-pc-linux-gnu-gcc. In order to pass other options on to these processes the -W<letter> options must be used.
Created attachment 298269 [details] build.log
Created attachment 298271 [details] emerge --info emerge --info too big for comment
Just made the same expirience ... /bin/sh ../libtool --tag=CC --mode=link x86_64-pc-linux-gnu-gcc -march=k8 -O3 -pipe -version-info 2:1:2 -m elf_x86_64 -o liblirc_client.la -rpath /usr/lib64 lirc_client.lo libtool: link: x86_64-pc-linux-gnu-gcc -shared -fPIC -DPIC .libs/lirc_client.o -march=k8 -O3 -m -Wl,-soname -Wl,liblirc_client.so.0 -o .libs/liblirc_client.so.0.2.1 /usr/lib/gcc/x86_64-pc-linux-gnu/4.4.4/../../../../x86_64-pc-linux-gnu/bin/ld: unrecognised emulation mode: -Wl,-soname Supported emulations: elf_x86_64 elf_i386 i386linux elf_l1om collect2: ld returned 1 exit status make[2]: *** [liblirc_client.la] Error 1 Full build log in attachment.
Created attachment 308455 [details] build log showing compile failure
*** This bug has been marked as a duplicate of bug 160134 ***