Both the stable and the "testing" versions of unison fail to build in the test phase with the error "/usr/bin/ocamlc: unknown option `-O2'". (I'll attach a build log.) I traced this down to the fact that the ebuilds add 'CFLAGS=""' to the emake command in src_compile() but not in src_test(). I'll attach a patch that corrects this. Reproducible: Always Steps to Reproduce: 1. Have -O2 in CFLAGS and FEATURES="test" 2. emerge -1v net-misc/unison Actual Results: Build fails in src_test with "/usr/bin/ocamlc: unknown option `-O2'" Expected Results: Build succeeds. emerge --info: Portage 2.1.8.3 (hardened/linux/amd64/10.0, gcc-4.3.4, glibc-2.9_p20081201-r4, 2.6.28-hardened-r9 x86_64) ================================================================= System uname: Linux-2.6.28-hardened-r9-x86_64-Intel-R-_Pentium-R-_D_CPU_3.73GHz-with-gentoo-1.12.13 Timestamp of tree: Tue, 06 Jul 2010 17:45:02 +0000 distcc 3.1 x86_64-pc-linux-gnu [disabled] app-shells/bash: 4.0_p37 dev-java/java-config: 2.1.10 dev-lang/python: 2.6.4-r1 dev-util/cmake: 2.6.4-r3 sys-apps/baselayout: 1.12.13 sys-apps/sandbox: 1.6-r2 sys-devel/autoconf: 2.13, 2.63-r1 sys-devel/automake: 1.4_p6-r1, 1.6.3-r1, 1.9.6-r3, 1.10.3, 1.11.1 sys-devel/binutils: 2.19.1-r1 sys-devel/gcc: 4.3.4-r1 sys-devel/gcc-config: 1.4.1 sys-devel/libtool: 2.2.6b virtual/os-headers: 2.6.30-r1 ACCEPT_KEYWORDS="amd64" ACCEPT_LICENSE="* -@EULA" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-O2 -pipe -march=nocona" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/X11/xkb /usr/share/config /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/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=nocona" DISTDIR="/usr/portage/distfiles" EMERGE_DEFAULT_OPTS="--with-bdeps y" FEATURES="assume-digests collision-protect distlocks fixpackages news parallel-fetch protect-owned sandbox sfperms strict test unmerge-logs unmerge-orphans userfetch userpriv usersandbox" GENTOO_MIRRORS="http://distfiles.gentoo.org" LANG="en_US.UTF-8" LC_ALL="en_US.UTF-8" LDFLAGS="-Wl,-O1" LINGUAS="en_US en" 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="/usr/portage/local/layman/sunrise /usr/portage/local/layman/bazaar /usr/portage/local/layman/java-overlay /usr/portage/local/layman/hardened-development /usr/portage/local/layman/kde-sunset /usr/local/portage /usr/local/portage /usr/portage/local/layman/eclipse /usr/portage/local/layman/jfreereport /usr/portage" SYNC="rsync://rsync21.us.gentoo.org/gentoo-portage" USE="acpi alsa amd64 bash-completion berkdb bzip2 cddb cli cracklib crypt cxx dri gdbm gpm hardened iconv ipv6 java java5 java6 jpeg justify lm_sensors madwifi mmx modules mudflap multilib ncurses nptl nptlonly openmp pam pcre perl pic png pppd python readline reflection session spl sse sse2 ssl sysfs tcpd theora truetype unicode urandom xcomposite xft xorg xvmc 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="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en_US en" NETBEANS_MODULES="cnd groovy ide java nb profile harness gsf websvccommon" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="vesa nv fbdev vga nvidia nouveau" 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, FFLAGS, INSTALL_MASK, MAKEOPTS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Created attachment 237815 [details] Build log Build log showing the error
Created attachment 237817 [details, diff] Patch to make src_test ignore CFLAGS A one-line patch to make src_test ignore CFLAGS like src_compile.
Hi, I can't reproduce this bug with FEATURES=test. Is it already fixed?
(In reply to comment #3) > Hi, I can't reproduce this bug with FEATURES=test. Is it already fixed? This bug I cannot reproduce, but I know what causes it. His buildlog exposes that for some reson unison is rebuilt/relinked during src_test (which is something that should not occur) and because of CFLAGS not being masked during src_test this fails. The correct fix would be to find out why unison is rebuilt/relinked and fix that, masking the CFLAGS for src_test just masks the real bug. That is why I am interested in seeing if Patrik in bug #353282 has this failure during src_compile or src_test, because he may also help us determine what his system has in common with the OR here, and what differs from our that does not hit this bug.
I can no longer reproduce this on my current machine. (But from the looks of things ("grep -r unison /etc/portage" returns only a line in package.use adding the gtk USE-flag) *this* computer may not have ever had the problem. Unfortunately, the computer whose emerge --info and build log accompany the original report is no longer available (a bad power supply fried the motherboard a while back), so I can't test on it.)
Thanks Jonathan for your detailed report. And thanks Xake for explaining the cause. It seems that we should give this bug a timeout ;) Feel free to reopen if it bites again.