Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 338114 - x11-terms/rxvt-unicode is mixing CXXFLAGS/CFLAGS
Summary: x11-terms/rxvt-unicode is mixing CXXFLAGS/CFLAGS
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Jeroen Roovers (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-09-20 06:19 UTC by Justin Lecher (RETIRED)
Modified: 2011-12-22 18:34 UTC (History)
2 users (show)

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


Attachments
/var/log/portage/build/x11-terms/rxvt-unicode-9.07-r2:20100920-061350.log (rxvt-unicode-9.07-r2:20100920-061350.log,28.63 KB, text/plain)
2010-09-20 06:20 UTC, Justin Lecher (RETIRED)
Details
build.log (rxvt-unicode-9.07-r2:20100920-174644.log,28.63 KB, text/plain)
2010-09-20 17:47 UTC, Justin Lecher (RETIRED)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Justin Lecher (RETIRED) gentoo-dev 2010-09-20 06:19:43 UTC
I found this during build

x86_64-pc-linux-gnu-g++ -I.. -I. -I. -I./../libev -DHAVE_CONFIG_H  -O2 -pipe -march=core2 -frecord-gcc-switches -mssse3 -mcx16 -mmmx -g -Wmissing-include-dirs -Wenum-compare -O2 -pipe -march=core2 -ggdb -O2 -pipe -march=core2 -ggdb -O2 -pipe -march=core2 -ggdb -O2 -pipe -march=core2 -ggdb -w   -DDEBUGGING -fno-strict-aliasing -pipe -Wdeclaration-after-statement -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm  -I/usr/lib64/perl5/5.8.8/x86_64-linux/CORE  -DLIBDIR="\"/usr/lib64/urxvt\"" -c rxvtperl.C
x86_64-pc-linux-gnu-gcc -Wl,-O1 -Wl,--as-needed -Wl,-O1,--hash-style=gnu,--sort-common -o rxvtc rxvtc.o rxvtdaemon.o fdpass.o ev_cpp.o -lm  -lsupc++
cc1plus: warning: command line option "-Wdeclaration-after-statement" is valid for C/ObjC but not for C++



$ einfo x11-terms/rxvt-unicode
Portage 2.2_rc84 (default/linux/amd64/10.0, gcc-4.4.4-asneeded, glibc-2.12.1-r1, 2.6.35-gentoo-r6 x86_64)
=================================================================
                        System Settings
=================================================================
System uname: Linux-2.6.35-gentoo-r6-x86_64-Intel-R-_Core-TM-2_Quad_CPU_Q6600_@_2.40GHz-with-gentoo-2.0.1
Timestamp of tree: Mon, 20 Sep 2010 04:15:02 +0000
distcc 3.1 x86_64-pc-linux-gnu [disabled]
ccache version 2.4 [enabled]
app-shells/bash:     4.0_p37
dev-java/java-config: 2.1.11
dev-lang/python:     2.6.5-r3, 3.1.2-r4
dev-util/ccache:     2.4-r8
dev-util/cmake:      2.8.1-r2
sys-apps/baselayout: 2.0.1
sys-apps/openrc:     0.6.3
sys-apps/sandbox:    2.3-r1
sys-devel/autoconf:  2.13, 2.67
sys-devel/automake:  1.6.3-r1, 1.9.6-r3, 1.10.3, 1.11.1
sys-devel/binutils:  2.20.1-r1
sys-devel/gcc:       4.4.4-r2
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.10
sys-devel/make:      3.81-r2
virtual/os-headers:  2.6.35 (sys-kernel/linux-headers)
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -march=core2 -frecord-gcc-switches -mssse3 -mcx16 -mmmx -g -Wimplicit-function-declaration -Wmissing-include-dirs"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/X11/xkb /usr/share/nano/ /var/lib/hsqldb /var/spool/torque"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /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="-O2 -pipe -march=core2 -frecord-gcc-switches -mssse3 -mcx16 -mmmx -g -Wmissing-include-dirs -Wenum-compare"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="-t --jobs=12 --load-average=8 --keep-going"
FEATURES="assume-digests buildsyspkg ccache collision-protect distlocks fixlafiles fixpackages news noinfo parallel-fetch preserve-libs protect-owned sandbox sfperms sign split-log splitdebug strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync"
FFLAGS="-O2 -pipe -march=core2 -frecord-gcc-switches -mssse3 -mcx16 -mmmx -g"
GENTOO_MIRRORS=" 	http://gentoo.j-schmitz.net/mirror/ 	ftp://ftp.gentoo.mesh-solutions.com/gentoo/ 	ftp://sunsite.informatik.rwth-aachen.de/pub/Linux/gentoo 	ftp://ftp.tu-clausthal.de/pub/linux/gentoo/"
LANG="en_GB.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,-O1,--hash-style=gnu,--sort-common"
LINGUAS="en"
MAKEOPTS="-j8 -l8"
PKGDIR="/usr/portage/packages"
PORTAGE_COMPRESS="lzma"
PORTAGE_COMPRESS_FLAGS="-z -9 -f -S .lzma -v"
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="/var/lib/layman/science /data/local/sunrise/sunrise /data/local/sunrise/reviewed /data/local/dummy /data/local/last-hope"
SYNC="rsync://rsync.j-schmitz.net/gentoo-portage"
USE="64bit 7zip X acpi additions alsa amd64 arpwarp bash-completion berkdb branding bzip2 c++ cairo cblas ccache cleartype cli command-args corefonts cracklib cups cupsddk custom-optimization cxx dbus dri dts exif fbcondecor fortran gdbm gif glibc-omitfp gmp gnome gnome-keyring gpm graphics gstreamer gtk hddtemp iconv icu java javascript jpeg kqemu lapack lcms ldap libnotify libsexy lm_sensors mailtrain md5sum mmx modules mp3 mudflap multilib multiuser nagios-dns nagios-ntp nagios-ping nagios-ssh nano-syntax ncurses network-cron nis nls nptl nptlonly nsplugin objc objc++ opengl openmp openntpd pam pcre pdf perl png pppd pymol python qt-static qt3support readline reflection rrdcgi rrdtool science sensord session smp sqlite sqlite3 sse sse2 ssl startup-notification svg sysfs system-sqlite tcpd threads tiff truetype type1 unicode x264 xcb xcomposite xinerama xorg xulrunner zlib" ALSA_CARDS="hda-intel" 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" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en" QEMU_SOFTMMU_TARGETS="i386 x86_64" QEMU_USER_TARGETS="i386 x86_64" RUBY_TARGETS="ruby18" 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, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_RSYNC_EXTRA_OPTS

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

x11-terms/rxvt-unicode-9.07-r2 was built with the following:
USE="(multilib) perl vanilla -afterimage -blink -iso14755 -truetype -wcwidth -xterm-color"
CFLAGS="-O2 -pipe -march=core2 -frecord-gcc-switches -mssse3 -mcx16 -mmmx -g -Wimplicit-function-declaration -Wmissing-include-dirs -O2 -pipe -march=core2 -ggdb -O2 -pipe -march=core2 -ggdb -O2 -pipe -march=core2 -ggdb -O2 -pipe -march=core2 -ggdb -O2 -pipe -march=core2 -ggdb -O2 -pipe -march=core2 -ggdb -O2 -pipe -march=core2 -ggdb"
CXXFLAGS="-O2 -pipe -march=core2 -frecord-gcc-switches -mssse3 -mcx16 -mmmx -g -Wmissing-include-dirs -Wenum-compare -O2 -pipe -march=core2 -ggdb -O2 -pipe -march=core2 -ggdb -O2 -pipe -march=core2 -ggdb -O2 -pipe -march=core2 -ggdb -O2 -pipe -march=core2 -ggdb -O2 -pipe -march=core2 -ggdb -O2 -pipe -march=core2 -ggdb"
Comment 1 Justin Lecher (RETIRED) gentoo-dev 2010-09-20 06:20:10 UTC
Created attachment 248086 [details]
/var/log/portage/build/x11-terms/rxvt-unicode-9.07-r2:20100920-061350.log

build.log
Comment 2 Jeroen Roovers (RETIRED) gentoo-dev 2010-09-20 17:45:08 UTC
Could be your version of autoconf... Can you duplicate with 2.65-r1?
Comment 3 Justin Lecher (RETIRED) gentoo-dev 2010-09-20 17:47:57 UTC
Created attachment 248177 [details]
build.log

Yes I can.
Comment 4 Jeroen Roovers (RETIRED) gentoo-dev 2010-09-20 18:02:47 UTC
It's not the only package that does this.

It's not that it mixes CFLAGS and CXXFLAGS, but that it duplicates some of them:

Reformatting your excerpt:
 -O2 -pipe -march=core2 -frecord-gcc-switches -mssse3 -mcx16 -mmmx
 -g -Wmissing-include-dirs -Wenum-compare

[the above are your exact CXXFLAGS]

 -O2 -pipe -march=core2 -ggdb
 -O2 -pipe -march=core2 -ggdb
 -O2 -pipe -march=core2 -ggdb
 -O2 -pipe -march=core2 -ggdb

These are neither your CFLAGS or CXXFLAGS.
Comment 5 Justin Lecher (RETIRED) gentoo-dev 2010-09-20 18:25:34 UTC
(In reply to comment #4)
>  -O2 -pipe -march=core2 -ggdb
>  -O2 -pipe -march=core2 -ggdb
>  -O2 -pipe -march=core2 -ggdb
>  -O2 -pipe -march=core2 -ggdb
> 
> These are neither your CFLAGS or CXXFLAGS.
> 

This is even worse then. Probably I don't want -ggdb?
Comment 6 Justin Lecher (RETIRED) gentoo-dev 2010-09-20 18:28:48 UTC
Problem is this from the Makefile:
rxvtperl.o: rxvtperl.C perlxsi.c
   $(COMPILE) @PERLFLAGS@ -DLIBDIR="\"$(libdir)/urxvt\"" -c $<

where $(COMPILE) is the c++ compiler and PERLFLAGS is substituted by
perl -MExtUtils::Embed -e ccopts 
which returns the -Wdeclaration-after-statement which comes from the CFLAGS.

It might not be worse, but I detected it. So probably it WONTFIX.
Comment 7 Jeroen Roovers (RETIRED) gentoo-dev 2010-09-20 18:37:51 UTC
(In reply to comment #6)
> Problem is this from the Makefile:
> rxvtperl.o: rxvtperl.C perlxsi.c
>    $(COMPILE) @PERLFLAGS@ -DLIBDIR="\"$(libdir)/urxvt\"" -c $<
> 
> where $(COMPILE) is the c++ compiler and PERLFLAGS is substituted by
> perl -MExtUtils::Embed -e ccopts 
> which returns the -Wdeclaration-after-statement which comes from the CFLAGS.

Er, so those were the /different/ CFLAGS you used when you installed perl? We could be looking at a problem with dev-lang/perl then? It's valid to include both CXXFLAGS and CFLAGS when you're compiling C++ sources that will link to C sources, I should think. In that case what you're seeing is correct and this would be an INVALID, not a WONTFIX. Please discuss. :)
Comment 8 Justin Lecher (RETIRED) gentoo-dev 2010-11-26 07:29:52 UTC
seems to be fixed with perl-5.12.2-r2
Comment 9 Jeroen Roovers (RETIRED) gentoo-dev 2011-12-22 18:34:22 UTC
(In reply to comment #8)
> seems to be fixed with perl-5.12.2-r2