Overview description: Attempting to emerge sci-misc/boinc-5.2.14 results in a failed build first error is as follows: make all-recursive make[1]: Entering directory `/var/tmp/portage/boinc-5.2.14/work/boinc-5.2.14' Making all in m4 make[2]: Entering directory `/var/tmp/portage/boinc-5.2.14/work/boinc-5.2.14/m4' make[2]: Nothing to be done for `all'. make[2]: Leaving directory `/var/tmp/portage/boinc-5.2.14/work/boinc-5.2.14/m4' Making all in api make[2]: Entering directory `/var/tmp/portage/boinc-5.2.14/work/boinc-5.2.14/api' if g++ -DHAVE_CONFIG_H -I. -I. -I.. -fPIC -DPIC -I../lib -I../api -I../db -I../client -I../tools -I../sched -I/usr/include/mysql -march=athlon64 -pipe -fomit-frame-pointer -funroll-loops -DHAVE_ERRNO_AS_DEFINE=1 -include ../config.h -fPIC -DPIC -I../lib -I../api -I../db -I../client -I../tools -I../sched -I/usr/include/mysql -march=athlon64 -pipe -fomit-frame-pointer -funroll-loops -DHAVE_ERRNO_AS_DEFINE=1 -include ../config.h -g -O2 -DDEBUG -D_DEBUG -I/usr/include -I/usr/include/openssl -MT boinc_api.o -MD -MP -MF ".deps/boinc_api.Tpo" -c -o boinc_api.o boinc_api.C; \ then mv -f ".deps/boinc_api.Tpo" ".deps/boinc_api.Po"; else rm -f ".deps/boinc_api.Tpo"; exit 1; fi In file included from /usr/lib/gcc/x86_64-pc-linux-gnu/3.4.5/include/g++-v3/algorithm:66, from ../lib/std_fixes.h:56, from ./../config.h:417, from <command line>:9: /usr/lib/gcc/x86_64-pc-linux-gnu/3.4.5/include/g++-v3/bits/stl_algobase.h: In function `bool std::lexicographical_compare(const unsigned char*, const unsigned char*, const unsigned char*, const unsigned char*)': /usr/lib/gcc/x86_64-pc-linux-gnu/3.4.5/include/g++-v3/bits/stl_algobase.h:816: error: call of overloaded `min(const size_t&, const size_t&)' is ambiguous After reading some email archives from boinc, I checked the config.log to see if the configure output was valid. Came across the following error configure:31223: gcc -o conftest -g -O2 -DDEBUG -D_DEBUG -I/usr/include -I/usr/include/openssl -L/usr/lib64 -L/usr/lib64 -Wl,-rpath -Wl,/usr/lib64 -march=athlon64 -O2 -pipe -fomit-frame-pointer -funroll -L/usr/lib conftest.c >&5 cc1: error: unrecognized command line option "-funroll" Removing -funroll-loops from my CFLAGS options allowed compile. Appeared that something in the boinc configure script was messing up the flags when processing them. Steps to reproduce 1. Add -funroll-loops to your CFLAGS 2. emerge boinc Actual Results Build will fail with numeros errors Expected Results Should compile and install package with -funroll-loops emerge --info Portage 2.1-r1 (default-linux/amd64/2006.0, gcc-vanilla, glibc-2.3.6-r4, 2.6.16-gentoo-r11 x86_64) ================================================================= System uname: 2.6.16-gentoo-r11 x86_64 AMD Athlon(tm) 64 X2 Dual Core Processor 4200+ Gentoo Base System version 1.6.15 ccache version 2.3 [enabled] dev-lang/python: 2.4.2 dev-python/pycrypto: 2.0.1-r5 dev-util/ccache: 2.3 dev-util/confcache: [Not Present] sys-apps/sandbox: 1.2.17 sys-devel/autoconf: 2.13, 2.59-r7 sys-devel/automake: 1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2 sys-devel/binutils: 2.16.1-r3 sys-devel/gcc-config: 1.3.13-r3 sys-devel/libtool: 1.5.22 virtual/os-headers: 2.6.11-r2 ACCEPT_KEYWORDS="amd64" AUTOCLEAN="yes" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-march=athlon64 -O2 -pipe -fomit-frame-pointer -funroll-loops" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/3.4/env /usr/kde/3.4/share/config /usr/kde/3.4/shutdown /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/X11/xkb /usr/share/config /usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/" CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/gconf /etc/java-config/vms/ /etc/revdep-rebuild /etc/splash /etc/terminfo" CXXFLAGS="-march=athlon64 -O2 -pipe -fomit-frame-pointer -funroll-loops" DISTDIR="/usr/portage/distfiles" FEATURES="autoconfig buildpkg candy ccache distcc distlocks metadata-transfer sandbox sfperms strict userpriv usersandbox" GENTOO_MIRRORS="ftp://ftp.heanet.ie/pub/gentoo/ http://ftp.heanet.ie/pub/gentoo/ http://www.mirrorservice.org/sites/www.ibiblio.org/gentoo/ ftp://ftp.mirrorservice.org/sites/www.ibiblio.org/gentoo/ ftp://pandemonium.tiscali.de/pub/gentoo/" LINGUAS="en" MAKEOPTS="-j1" PKGDIR="/usr/portage/packages" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude='/distfiles' --exclude='/local' --exclude='/packages'" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage" USE="amd64 X a52 aac aalib acl aim alsa apache2 audiofile avi bcmath berkdb bitmap-fonts bonobo bzip2 bzlib cdr cli crypt ctype cups curl curlwrappers dbus dedicated dga dio directfb divx4linux dlloader doc dri dv dvb dvd dvdr eds emboss encode esd ethereal evo fastcgi fbcon ffmpeg fftw flac flash foomaticdb fortran ftp gb gd gif gimpprint ginac glut gnome gnutls gphoto2 gpm gstreamer gtk gtk2 gtkhtml hal hardened hardenedphp icq imagemagick imap imlib inifile innodb iodbc ipv6 isdnlog jabber java jikes joystick jpeg kerberos lcms ldap leim libcaca libgda lirc lzw lzw-tiff mad matroska mbox mcal memlimit mhash mime ming mng mozilla mp3 mpeg mpi msn mysql nas ncurses nls nocd nptl nsplugin nvidia objc offensive ogg openal opengl oscar oss pam pcre pdflib perl php pie plotutils png pnp posix ppds pppd prelude python qt qt3 qt4 quicktime readline recode reflection ruby samba sasl scanner sdl session shared sharedmem simplexml sndfile snmp soap sockets socks5 speex spell spl sqlite ssl szip tcltk tcpd theora tidy tiff tokenizer transcode truetype-fonts type1-fonts unicode usb v4l vcd vcdimager vhosts videos vorbis wmf wxwindows xine xinerama xmlrpc xorg xosd xpm xsl xv xvid yahoo zlib elibc_glibc input_devices_keyboard input_devices_mouse input_devices_joystick input_devices_evdev kernel_linux linguas_en userland_GNU video_cards_nv video_cards_nvidia video_cards_vesa video_cards_fbdev" Unset: CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, PORTAGE_RSYNC_EXTRA_OPTS
ok, I dug into this and have isolated the problem. In the config.log output from the test line configure:22065: checking for shmget in dynamic library cygipc and onwards the flag -funroll-loops has been messed up to be just -funroll which is an invalid option to gcc and results in a large number of subseqent tests in failing. Previous test to that is: configure:21307: checking for curl_free This changes LDFLAGS for all subsequent tests CURL_LIB_PATHS=`echo $LIBCURL | sed 's/-l[^ ]*//g'` LDFLAGS="$CURL_LIB_PATHS $LDFLAGS" Working back through the configure script the CURL_LIB_PATHS appears to resolve to CURL_LIB_PATHS=`/usr/bin/curl-config --libs | sed 's/-l[^ ]*//g'` running the curl-config command on my machine returns the following # /usr/bin/curl-config --libs -L/usr/lib64 -lcurl -L/usr/lib64 -Wl,-rpath -Wl,/usr/lib64 -march=athlon64 -O2 -pipe -fomit-frame-pointer -funroll-loops -lgssapi_krb5 -lkrb5 -lk5crypto -lkrb5support -lcom_err -lresolv -lssl -lcrypto -ldl -lssl -lcrypto -ldl -lz passing it through the sed command returns the following. -L/usr/lib64 -L/usr/lib64 -Wl,-rpath -Wl,/usr/lib64 -march=athlon64 -O2 -pipe -fomit-frame-pointer -funroll which is clearly wrong. it basically is trying to remove all the items of -l*, the problem is that it doesn't do this in a manner to make sure that its only applying to full flags. i.e it should not remove the -loops part of the cflag --funroll-loops. This means that it will break where any cflag is used that follows the form .*-l.* which is clearly wrong. Changing the sed command to read sed 's/[^[a-zA-Z]]*-l[^ ]*//g' appear to work fine, and I believe should work for any case where -l occurs in the middle of a flag, or a -l.* pattern occurs at the start of the list (unlikely anyway). Will attach a patch to fix the problem later.
Created attachment 91179 [details, diff] patch to boinc configure script to allow cflags with -l in the middle to work. changed the sed option to be just the following instead. sed 's/ \+-l[^ ]*//g' If it needs to strip -l options from the start the whole command can be changed to sed -e 's/ \+-l[^ ]*//g' -e 's/^-l[^ ]* //' I don't see an easy way to combine those properly I'll submit a patch to the boinc project for the configure.ac script so that this gets fixed upstream as well.
Please, post the following info to Bug 139662. - portage, gcc-config and eselect-compiler versions - the output of `eselect compiler show` and `gcc-config -c` Thanks.
I thought the original summary was far better, and so have changed it back. I am going to be bumping boinc and will test this. I personally do not use -funroll-loops but this bug should certainly be fixed so I will keep an eye out for it. Thanks for your work on this - I will see what I can get done on it today.
The fix for this was finally committed to the boinc development tree http://boinc.berkeley.edu/trac/changeset/13919
# ChangeLog for sci-misc/boinc # Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2 # $Header: /var/cvsroot/gentoo-x86/sci-misc/boinc/ChangeLog,v 1.45 2009/01/02 20:40:21 cryos Exp $ 02 Jan 2009; Marcus D. Hanwell <cryos@gentoo.org> metadata.xml: Removed myself as maintainer.
Fixed by upstream in meantime, so only version in the tree has the fix.