e -frecord-gcc-switches -g -Wimplicit-function-declaration -c gcdext_lehmer.c -fPIC -DPIC -o .libs/gcdext_lehmer.o /bin/sh ../libtool --tag=CC --mode=compile x86_64-pc-linux-gnu-gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I.. -D__GMP_WITHIN_GMP -I.. -DOPERATION_`echo div_q | sed 's/_$//'` -O2 -pipe -ftracer -march=native -frecord-gcc-switches -g -Wimplicit-function-declaration -c -o div_q.lo div_q.c libtool: compile: x86_64-pc-linux-gnu-gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I.. -D__GMP_WITHIN_GMP -I.. -DOPERATION_div_q -O2 -pipe -ftracer -march=native -frecord-gcc-switches -g -Wimplicit-function-declaration -c div_q.c -fPIC -DPIC -o .libs/div_q.o div_q.c: In function '__gmpn_div_q': div_q.c:141:4: error: not enough arguments to function '__builtin_constant_p' else if (BELOW_THRESHOLD (dn, DC_DIV_Q_THRESHOLD) || ^ In file included from div_q.c:27:0: ../gmp-impl.h:1265:45: error: expected expression before ')' token ((__builtin_constant_p (thresh) && (thresh) == 0) \ ^ ../gmp-impl.h:1269:42: note: in expansion of macro 'ABOVE_THRESHOLD' #define BELOW_THRESHOLD(size,thresh) (! ABOVE_THRESHOLD (size, thresh)) ^ div_q.c:141:13: note: in expansion of macro 'BELOW_THRESHOLD' else if (BELOW_THRESHOLD (dn, DC_DIV_Q_THRESHOLD) || ^ ../gmp-impl.h:1265:45: error: not enough arguments to function '__builtin_constant_p' ((__builtin_constant_p (thresh) && (thresh) == 0) \ ^ ../gmp-impl.h:1269:42: note: in expansion of macro 'ABOVE_THRESHOLD' #define BELOW_THRESHOLD(size,thresh) (! ABOVE_THRESHOLD (size, thresh)) ^ div_q.c:141:13: note: in expansion of macro 'BELOW_THRESHOLD' else if (BELOW_THRESHOLD (dn, DC_DIV_Q_THRESHOLD) || ^ ../gmp-impl.h:1266:50: error: expected expression before ')' token || (!(__builtin_constant_p (thresh) && (thresh) == MP_SIZE_T_MAX) \ ^ ../gmp-impl.h:1269:42: note: in expansion of macro 'ABOVE_THRESHOLD' #define BELOW_THRESHOLD(size,thresh) (! ABOVE_THRESHOLD (size, thresh)) ^ div_q.c:141:13: note: in expansion of macro 'BELOW_THRESHOLD' else if (BELOW_THRESHOLD (dn, DC_DIV_Q_THRESHOLD) || ^ ../gmp-impl.h:1267:28: error: expected expression before ')' token && (size) >= (thresh))) ^ ../gmp-impl.h:1269:42: note: in expansion of macro 'ABOVE_THRESHOLD' #define BELOW_THRESHOLD(size,thresh) (! ABOVE_THRESHOLD (size, thresh)) ^ div_q.c:141:13: note: in expansion of macro 'BELOW_THRESHOLD' else if (BELOW_THRESHOLD (dn, DC_DIV_Q_THRESHOLD) || ^ div_q.c:183:4: error: not enough arguments to function '__builtin_constant_p' else if (BELOW_THRESHOLD (dn, DC_DIV_Q_THRESHOLD) || ^ $ einfo dev-libs/gmp Portage 2.2.0_alpha176 (default/linux/amd64/13.0, gcc-4.8.0-asneeded, glibc-2.17, 3.9.3-lh x86_64) ================================================================= System Settings ================================================================= System uname: Linux-3.9.3-lh-x86_64-Intel-R-_Core-TM-_i7-2600_CPU_@_3.40GHz-with-gentoo-2.2 KiB Mem: 16468592 total, 4262668 free KiB Swap: 4000180 total, 3999552 free Timestamp of tree: Wed, 22 May 2013 00:45:01 +0000 ld GNU gold (GNU Binutils 2.23.1) 1.11 ccache version 3.1.9 [enabled] app-shells/bash: 4.2_p45 dev-java/java-config: 2.2.0 dev-lang/python: 2.6.8-r1, 2.7.4, 3.1.5-r1, 3.2.4, 3.3.2 dev-util/ccache: 3.1.9-r1::science dev-util/cmake: 2.8.10.2-r2 dev-util/pkgconfig: 0.28 sys-apps/baselayout: 2.2 sys-apps/openrc: 0.11.8 sys-apps/sandbox: 2.6-r1 sys-devel/autoconf: 2.13, 2.69 sys-devel/automake: 1.10.3, 1.11.6, 1.12.6, 1.13.2 sys-devel/binutils: 2.23.1 sys-devel/gcc: 4.1.2, 4.6.4, 4.8.0 sys-devel/gcc-config: 1.8 sys-devel/libtool: 2.4.2 sys-devel/make: 3.82-r4 sys-kernel/linux-headers: 3.9 (virtual/os-headers) sys-libs/glibc: 2.17 Repositories: gentoo sunrise bicatali betagarden dummy Neurogeek science last-hope ACCEPT_KEYWORDS="amd64 ~amd64" ACCEPT_LICENSE="*" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-O2 -pipe -ftracer -march=native -frecord-gcc-switches -g -Wimplicit-function-declaration" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/share/eselect/ /usr/share/gnupg/qualified.txt /usr/share/nano/ /var/lib/hsqldb /var/spool/munin-async/.ssh /var/spool/torque" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.4/ext-active/ /etc/php/cgi-php5.4/ext-active/ /etc/php/cli-php5.4/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo" CXXFLAGS="-O2 -pipe -ftracer -march=native -frecord-gcc-switches -g -Wenum-compare" DISTDIR="/usr/portage/distfiles" EMERGE_DEFAULT_OPTS=" -vt --keep-going --autounmask-write --autounmask --quiet-build=n" FCFLAGS="-O2 -pipe -ftracer -march=native -frecord-gcc-switches -g" FEATURES="assume-digests binpkg-logs buildsyspkg candy ccache collision-protect compressdebug distlocks ebuild-locks fixlafiles merge-sync metadata-transfer multilib-strict news noinfo parallel-fetch parallel-install preserve-libs protect-owned sandbox sfperms sign split-log splitdebug strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr" FFLAGS="-O2 -pipe -ftracer -march=native -frecord-gcc-switches -g" GENTOO_MIRRORS=" /mnt/tmpfs/ http://gentoo.j-schmitz.net/mirror/ 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 -Wl,--hash-style=gnu -Wl,--sort-common" MAKEOPTS="-j10 -l9" PKGDIR="/usr/portage/packages" PORTAGE_COMPRESS="xz" PORTAGE_COMPRESS_FLAGS="-z -e -9 -v" PORTAGE_CONFIGROOT="/" PORTAGE_RSYNC_EXTRA_OPTS="--exclude=/metadata" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/local/overlays/sunrise-reviewed /local/overlays/bicatali /local/overlays/betagarden /local/overlays/dummy /local/overlays/neurogeek /local/overlays/sci /local/overlays/lh/ebuilds" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="X acl alsa amd64 avx bash-completion berkdb branding bzip2 cairo caps cli cracklib crypt cups cxx dbus dri fortran gdbm gif gmp gnome gnome-keyring gpm gstreamer gtk iconv icu ipv6 jpeg jpeg2k ldap logrotate mmx mmxext modules mudflap multilib ncurses network-cron nls nptl nsplugin numa opengl openmp pam pcre pgo png pulseaudio qt3support readline session smp sse sse2 sse2_4way sse2check sse3 sse4 sse41 sse4_1 sse4a sse5 ssl ssse3 startup-notification tcpd threads tiff truetype unicode vaapi vdpau xinerama zlib" ABI_X86="64" 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="authn_core authz_core socache_shmcb unixd 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 sheets stage tables krita karbon braindump author" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" DRACUT_MODULES="plymouth" 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" GRUB_PLATFORMS="efi-32 efi-64" INPUT_DEVICES="evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer pdfimport scripting-javascript wiki-publisher nlpsolver" LINGUAS="en" NGINX_MODULES_HTTP="access auth_basic autoindex browser charset empty_gif fastcgi geo gzip limit_conn limit_req map memcached proxy referer rewrite scgi split_clients ssi upstream_ip_hash userid uwsgi stub_status" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-4" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_6 python2_7 python3_1 python3_2 python3_3 pypy1_9 pypy2_0" QEMU_SOFTMMU_TARGETS="i386 x86_64 arm armeb" QEMU_USER_TARGETS="i386 x86_64 arm armeb" RUBY_TARGETS="ruby19" 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" USE_PYTHON="2.6 2.7 3.1 3.2 3.3 2.7-pypy-1.9 2.7-pypy-2.0" Unset: CPPFLAGS, CTARGET, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND ================================================================= Package Settings ================================================================= dev-libs/gmp-5.1.1 was built with the following: USE="cxx (multilib) pgo -doc -static-libs" ABI_X86="64"
Created attachment 348880 [details] gmp-5.1.2:20130522-082750.log build.log
Without USE="pgo" it builds fine. The problem is here with the tuneup call: if use pgo ; then emake -j1 -C tune tuneup || die rm gmp-mparam.h || die ./tune/tuneup | tee gmp-mparam.h emake clean || die emake || die fi This is run after the first regular emake and is supposed to compute some machine-specific constants and and put them in the form of #defines into gmp-mparam.h which originally contained pkg defaults. "tuneup" produces the defines, but it fails halfway through and the ebuild tries to run emake with the incomplete gmp-mparam.h which makes the compilation crash. The tuneup script returns a non-zero on error, though. That should be checked for in the ebuild. The package would be left unoptimized then, though, which goes against the purpose of USE="pgo". So an ewarn perhaps. By the way, the script seems to fail always (Core i5, 2.5GHz), but if it fails early enough, the second emake passes anyway. I can help getting that early fail by either giving significantly more or significantly less CPU to tuneup. In any case, I wonder if the second emake passing in this case is something desirable/intended/meaningful.
By the way, with no $CFLAGS the package builds itself with -march=k8. I don't know of any, but if there is a way for an emerge to have CFLAGS unset, the pkg could use a patch for this.
*** This bug has been marked as a duplicate of bug 456346 ***