Unfortunately I didn't keep the build.log on this machine but I was stuck on this for a week before figuring out this might be something like bug #604802. Looks like another gperf breakage. $ emerge --info app-emulation/libguestfs Portage 2.3.5 (python 3.4.6-final-0, hardened/linux/amd64, gcc-5.4.0, glibc-2.23-r3, 4.10.13-gentoo x86_64) ================================================================= System Settings ================================================================= System uname: Linux-4.10.13-gentoo-x86_64-Intel-R-_Core-TM-_i7-3687U_CPU_@_2.10GHz-with-gentoo-2.3 KiB Mem: 12182632 total, 215984 free KiB Swap: 18874360 total, 16020688 free Timestamp of repository gentoo: Tue, 09 May 2017 11:30:01 +0000 sh bash 4.3_p48-r1 ld GNU ld (Gentoo 2.27 p1.0) 2.27 distcc 3.2rc1 x86_64-pc-linux-gnu [disabled] ccache version 3.3.4 [disabled] app-shells/bash: 4.3_p48-r1::gentoo dev-java/java-config: 2.2.0-r3::gentoo dev-lang/perl: 5.24.1-r1::gentoo dev-lang/python: 2.7.13::gentoo, 3.4.6::gentoo, 3.5.3::gentoo, 3.6.1-r1::gentoo dev-util/ccache: 3.3.4::gentoo dev-util/cmake: 3.8.1::gentoo dev-util/pkgconfig: 0.29.2::gentoo sys-apps/baselayout: 2.3::gentoo sys-apps/openrc: 0.25::gentoo sys-apps/sandbox: 2.10-r4::gentoo sys-devel/autoconf: 2.13::gentoo, 2.69-r3::gentoo sys-devel/automake: 1.11.6-r2::gentoo, 1.12.6-r1::gentoo, 1.13.4-r1::gentoo, 1.14.1-r1::gentoo, 1.15-r2::gentoo sys-devel/binutils: 2.27::gentoo sys-devel/gcc: 5.4.0-r3::gentoo, 6.3.0::gentoo sys-devel/gcc-config: 1.8-r1::gentoo sys-devel/libtool: 2.4.6-r4::gentoo sys-devel/make: 4.2.1-r1::gentoo sys-kernel/linux-headers: 4.10::gentoo (virtual/os-headers) sys-libs/glibc: 2.23-r3::gentoo Repositories: gentoo location: /usr/portage sync-type: rsync sync-uri: rsync://rsync.gentoo.org/gentoo-portage priority: -1000 eva location: /var/lib/layman/eva masters: gentoo priority: 50 steam-overlay location: /var/lib/layman/steam-overlay masters: gentoo priority: 50 sublime-text location: /var/lib/layman/sublime-text masters: gentoo priority: 50 Installed sets: @gnome-desktop, @local, @network, @portage-extras, @system-extras, @system-extras-phys ACCEPT_KEYWORDS="amd64 ~amd64" ACCEPT_LICENSE="* -@EULA" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-O2 -march=ivybridge -g -pipe" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /usr/share/gnupg/qualified.txt" 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.6/ext-active/ /etc/php/apache2-php7.1/ext-active/ /etc/php/cgi-php5.6/ext-active/ /etc/php/cgi-php7.1/ext-active/ /etc/php/cli-php5.6/ext-active/ /etc/php/cli-php7.1/ext-active/ /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 -march=ivybridge -g -pipe" DISTDIR="/usr/portage/distfiles" EMERGE_DEFAULT_OPTS="--load=6.0 --jobs=4 --keep-going --buildpkg-exclude 'virtual/* sys-kernel/*-sources'" FCFLAGS="-O2 -pipe" FEATURES="assume-digests binpkg-logs buildsyspkg config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms splitdebug strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr" FFLAGS="-O2 -pipe" GENTOO_MIRRORS="http://distfiles.gentoo.org" LANG="fr_FR.utf8" LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,-O1 -Wl,--as-needed -Wl,--hash-style=gnu" MAKEOPTS="-j5 -l5.0" PKGDIR="/usr/portage/packages" PORTAGE_CONFIGROOT="/" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git" PORTAGE_TMPDIR="/var/tmp" USE="X a52 aac acl acpi alsa amd64 attr audit avahi avi bash-completion bluetooth bzip2 cairo caps cdr cgmanager cjk cli colord consolekit cracklib crypt cryptsetup cups cxx dbus dconf dri dvd eds evo exif ffmpeg filecaps flac fortran glamor gmp gnome-keyring gnome-online-accounts gnome-shell grilo gstreamer gudev hardened hwdb iconv icu introspection iptc ipv6 jit jpeg justify keymap laptop lcms ldap libnotify libsamplerate libsecret lirc lz4 lzma lzo mad matroska modules mp3 mpeg mtp multilib nautilus ncurses netlink networkmanager nfs nls nntp nptl nsplugin ntp ogg opengl openmp orc pam pax_kernel pcre pcsc-lite pdf pie pkcs11 playlist png policykit pulseaudio readline realtime seccomp sendto session smartcard spell ssl ssp startup-notification svg systemd taglib tcpd telepathy theora threads tracker udev unicode upnp upnp-av urandom usb v4l v4l2 vim vim-syntax vorbis webkit x264 xattr xattrs xcb xinerama xml xmp xtpax xv xvid xvmc zeitgeist zeroconf zlib" ABI_X86="64" ALSA_CARDS="hda-intel" APACHE2_MODULES="auth_digest authn_file authz_groupfile dav dav_fs" APACHE2_MPMS="prefork" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" CAMERAS="ptp2" COLLECTD_PLUGINS="apache cpu cgroups df disk interface load logfile memory network swap syslog tail write_graphite" CPU_FLAGS_X86="aes avx mmx mmxext popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3 f16c" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" GRUB_PLATFORMS="pc efi-64" INPUT_DEVICES="evdev libinput synaptics" KERNEL="linux" L10N="en fr" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="en fr" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-6" PYTHON_SINGLE_TARGET="python3_4" PYTHON_TARGETS="python2_7 python3_4" QEMU_SOFTMMU_TARGETS="x86_64" QEMU_USER_TARGETS="x86_64" RUBY_TARGETS="ruby21 ruby22" USERLAND="GNU" VIDEO_CARDS="intel" 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: CC, CPPFLAGS, CTARGET, CXX, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON ================================================================= Package Settings ================================================================= app-emulation/libguestfs-1.28.5-r2::gentoo was built with the following: USE="bash-completion fuse introspection ocaml -debug -doc -erlang -inspect-icons -lua -perl -python -ruby (-selinux) -static-libs -systemtap -test" ABI_X86="64" PYTHON_SINGLE_TARGET="python3_4 -python2_7 -python3_5" PYTHON_TARGETS="python2_7 python3_4 -python3_5"
I can't find the duplicate bug right now, but this is long fixed upstream. Please see these upstream commits: 004de6cf45cfe66ca166cbdcb1c3125a2a81eb31 48d4117789e92489b9a3c6f3456b0770b3fdb290
I've added an ebuild for libguestfs-1.36.5 to bug#601162 that I think would fix this problem, please give it a try.
Just bump to 1.36. Build fine with this version of gperf.