Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 265709 - x11-drivers/linuxwacom-0.8.2 doesn't compile with gcc-4.3.2 and -combine
Summary: x11-drivers/linuxwacom-0.8.2 doesn't compile with gcc-4.3.2 and -combine
Status: RESOLVED LATER
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Unspecified (show other bugs)
Hardware: AMD64 Linux
: High normal (vote)
Assignee: Robert Buchholz (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-04-10 23:34 UTC by Alexander Bezrukov
Modified: 2009-04-19 13:04 UTC (History)
2 users (show)

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


Attachments
A quick patch which removes '-combine` from CFLAGS at dependency generation stage (filter-combine.patch,464 bytes, patch)
2009-04-19 13:04 UTC, Alexander Bezrukov
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Bezrukov 2009-04-10 23:34:01 UTC
Hello,

at dependency generation stage if CFLAGS contain -combine the following error occurs:

x86_64-pc-linux-gnu-gcc -MM -combine -march=opteron -momit-leaf-frame-pointer -Os -pipe -fomit-frame-pointer -finline-functions-called-once -ftree-vectorize -D__amd64__  -I../include -I/usr/include/xorg  ./xf86Wacom.c ./wcmSerial.c ./wcmUSB.c ./wcmISDV4.c ./wcmXCommand.c ./wcmCommon.c ./wcmCompat.c ./wcmConfig.c ./wcmFilter.c > .depend
cc1: error: too many filenames given.  Type cc1 --help for usage
make[2]: *** No rule to make target `.depend', needed by `wacom_drv.so'.  Stop.
make[2]: Leaving directory `/tmp/portage/x11-drivers/linuxwacom-0.8.2/work/linuxwacom-0.8.2/src/xdrv'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/tmp/portage/x11-drivers/linuxwacom-0.8.2/work/linuxwacom-0.8.2/src'
make: *** [all-recursive] Error 1

This happens because -combine is passed (at compilation stage -- a good thing to do) AND several source files are supplied to cc1.

A workaround is to temporary remove "-combine" option from CFLAGS.


Reproducible: Always

Steps to Reproduce:
1. make sure that CFLAGS contain -combine
2. emerge x11-drivers/linuxwacom


Actual Results:  
x86_64-pc-linux-gnu-gcc -MM -combine -march=opteron -momit-leaf-frame-pointer -Os -pipe -fomit-frame-pointer -finline-functions-called-once -ftree-vectorize -D__amd64__  -I../include -I/usr/include/xorg  ./xf86Wacom.c ./wcmSerial.c ./wcmUSB.c ./wcmISDV4.c ./wcmXCommand.c ./wcmCommon.c ./wcmCompat.c ./wcmConfig.c ./wcmFilter.c > .depend
cc1: error: too many filenames given.  Type cc1 --help for usage
make[2]: *** No rule to make target `.depend', needed by `wacom_drv.so'.  Stop.
make[2]: Leaving directory `/tmp/portage/x11-drivers/linuxwacom-0.8.2/work/linuxwacom-0.8.2/src/xdrv'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/tmp/portage/x11-drivers/linuxwacom-0.8.2/work/linuxwacom-0.8.2/src'
make: *** [all-recursive] Error 1


Expected Results:  
The package is successfully built.

emerge --info
Portage 2.1.6.7 (default/linux/amd64/2008.0, gcc-4.3.2, glibc-2.9_p20081201-r2, 2.6.29.1-alb x86_64)
=================================================================
System uname: Linux-2.6.29.1-alb-x86_64-Dual_Core_AMD_Opteron-tm-_Processor_285-with-glibc2.2.5
Timestamp of tree: Fri, 10 Apr 2009 21:45:02 +0000
app-shells/bash:     3.2_p39
dev-java/java-config: 1.3.7-r1, 2.1.7
dev-lang/python:     2.5.2-r7
dev-util/cmake:      2.6.2-r1
sys-apps/baselayout: 1.12.11.1
sys-apps/sandbox:    1.2.18.1-r2
sys-devel/autoconf:  2.13, 2.63
sys-devel/automake:  1.5, 1.7.9-r1, 1.9.6-r2, 1.10.2
sys-devel/binutils:  2.18-r3
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   1.5.26
virtual/os-headers:  2.6.28-r1
ACCEPT_KEYWORDS="amd64"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=opteron -momit-leaf-frame-pointer -Os -pipe -fomit-frame-pointer -finline-functions-called-once -ftree-vectorize"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/eselect/postgresql /etc/fonts/fonts.conf /etc/gconf /etc/revdep-rebuild /etc/splash /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c /etc/udev/rules.d"
CXXFLAGS="-march=opteron -momit-leaf-frame-pointer -Os -pipe -fomit-frame-pointer -finline-functions-called-once -ftree-vectorize"
DISTDIR="/usr/portage/distfiles"
FEATURES="distlocks fixpackages parallel-fetch protect-owned sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://mirror.yandex.ru/gentoo-distfiles/ http://trumpetti.atm.tut.fi/gentoo/ http://mirror.qubenet.net/mirror/gentoo/ ftp://mirror.yandex.ru/gentoo-distfiles/"
LANG="en_US.utf8"
LC_ALL=""
LDFLAGS="-Wl,-O1"
LINGUAS="en ru"
MAKEOPTS="-j8"
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="/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="3dnow 3dnowext X acl acpi alsa amd64 bash-completion berkdb bidi bzip2 caps cdr cjk cli cracklib crypt cscope cups dbus djvu dri dvd dvdr dvdread fortran gdbm gif gmp gnome gpm gtk hal hardened iconv ieee1394 isdnlog jpeg jpeg2k kerberos lcms ldap ldapsam lm_sensors loop-aes midi mmap mmx mudflap multilib ncurses nls nptl nptlonly nsplugin opengl openmp pam pcre perl png pppd python readline reflection samba session spl sse sse2 ssl sysfs tcpd threads tiff truetype unicode usb winbind xorg xulrunner 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 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" ELIBC="glibc" INPUT_DEVICES="evdev wacom" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en ru" USERLAND="GNU" VIDEO_CARDS="nvidia"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Mike Auty (RETIRED) gentoo-dev 2009-04-18 21:11:11 UTC
Alexander, the best advice is to simply not use this flag (see bug 149210 for precedence).  There's unlikely to be a fix for it anytime soon (although upstream will accept patches if you make your case for them)...

Also, please try to provide accurate output in "emerge --info", the info you provided doesn't feature the combine flag anywhere.  We can't help you if you don't give us accurate information of the build environment where you're experiencing the problem.
Comment 2 Alexander Bezrukov 2009-04-19 12:34:47 UTC
Mike, sorry, this was my fault that I supplied the incorrect emerge --info. The one I supplied is a result of temporarily removing '-combine' from CFLAGS in order to see if this option is the cause of the failure, otherwise it is correct.

It would be pity if users are not given this choice with Gentoo (Gentoo is all about choice, right?). I mean that this particular flag does a very right thing allowing inter procedural analysis beyond translation unit boundaries yet doesn't do anything which changes semantics (as opposed to aggressive optimization options which violate the 14882 and 9899 stds). Of course this all holds if this option does what is documented and I haven't done any thorough testing.

This particular issue is because this option shouldn't be given at dependency generation phase. I will try to look into and prepare a quick patch.

Perhaps a more consistent way would be to filter out this option at dependency generation but allow it at the compilation stage. But I know very little about portage and given the variety of packages and ways these are built I don't know how feasible it is.
Comment 3 Alexander Bezrukov 2009-04-19 13:04:29 UTC
Created attachment 188871 [details, diff]
A quick patch which removes '-combine` from CFLAGS at dependency generation stage

This patch is not of much worth but can save someone's frustration with failed build.