When trying to compile www-client/firefox-50.0 with pgo flag enabled, I obtain the following error : * ERROR: www-client/firefox-50.0::gentoo failed (compile phase): * Usage: addpredict <colon-delimited list of paths> * * Call stack: * ebuild.sh, line 115: Called src_compile * environment, line 5460: Called addpredict '' * ebuild.sh, line 147: Called __sb_append_var 'PREDICT' '' * ebuild.sh, line 138: Called die * The specific snippet of code: * [[ -z $1 || -n $2 ]] && die "Usage: add$(LC_ALL=C tr "[:upper:]" "[:lower:]" <<< "${_v}") <colon-delimited list of paths>" * * If you need support, post the output of `emerge --info '=www-client/firefox-50.0::gentoo'`, * the complete build log and the output of `emerge -pqv '=www-client/firefox-50.0::gentoo'`. * The complete build log is located at '/var/tmp/portage/www-client/firefox-50.0/temp/build.log'. * The ebuild environment file is located at '/var/tmp/portage/www-client/firefox-50.0/temp/environment'. * Working directory: '/var/tmp/portage/www-client/firefox-50.0/work/firefox-50.0' * S: '/var/tmp/portage/www-client/firefox-50.0/work/firefox-50.0' It seems that the following lines of the ebuild file in the src_compile() function are causing the failure: # Firefox tries to use dri stuff when it's run, see bug 380283 shopt -s nullglob cards=$(echo -n /dev/dri/card* | sed 's/ /:/g') if test -z "${cards}"; then cards=$(echo -n /dev/ati/card* /dev/nvidiactl* | sed 's/ /:/g') if test -n "${cards}"; then # Binary drivers seem to cause access violations anyway, so # let's use indirect rendering so that the device files aren't # touched at all. See bug 394715. export LIBGL_ALWAYS_INDIRECT=1 fi fi shopt -u nullglob addpredict "${cards}" In my case, ${cards} is empty, leading to the issue. If y move the addpredict "${cards}" like below, everything is working (but I'm not sure about "shopt -u nullglob" side effects with add_predict function): # Firefox tries to use dri stuff when it's run, see bug 380283 shopt -s nullglob cards=$(echo -n /dev/dri/card* | sed 's/ /:/g') if test -z "${cards}"; then cards_bin=$(echo -n /dev/ati/card* /dev/nvidiactl* | sed 's/ /:/g') if test -n "${cards_bin}"; then # Binary drivers seem to cause access violations anyway, so # let's use indirect rendering so that the device files aren't # touched at all. See bug 394715. export LIBGL_ALWAYS_INDIRECT=1 addpredict "${cards}" fi fi shopt -u nullglob $ emerge --info Portage 2.3.2 (python 2.7.12-final-0, funtoo/1.0/linux-gnu/arch/x86-64bit, gcc-4.9.3, glibc-2.22, 4.8.7-1 x86_64) ================================================================= System uname: Linux-4.8.7-1-x86_64-Intel-R-_Core-TM-_i7-4600U_CPU_@_2.10GHz-with-gentoo-2.2.1 KiB Mem: 2051272 total, 97528 free KiB Swap: 2097148 total, 1669544 free sh bash 4.3_p42 ld GNU ld (Funtoo 2.25) 2.25.0 app-shells/bash: 4.3_p42::gentoo dev-java/java-config: 2.2.0-r3::gentoo dev-lang/perl: 5.24.0-r2::gentoo dev-lang/python: 2.7.12::gentoo, 3.4.5::gentoo dev-util/cmake: 3.7.0::gentoo sys-apps/baselayout: 2.2.1::gentoo sys-apps/openrc: 0.18.3-r2::gentoo sys-apps/sandbox: 2.10-r2::gentoo sys-devel/autoconf: 2.13::gentoo, 2.69-r2::gentoo sys-devel/automake: 1.13.4-r1::gentoo, 1.14.1-r1::gentoo, 1.15-r2::gentoo sys-devel/binutils: 2.25-r2::gentoo sys-devel/gcc: 4.9.3-r3::gentoo sys-devel/gcc-config: 1.8-r1::gentoo sys-devel/libtool: 2.4.6-r2::gentoo sys-devel/make: 4.1-r1::gentoo sys-kernel/linux-headers: 4.3::gentoo (virtual/os-headers) sys-libs/glibc: 2.22::gentoo Repositories: gentoo location: /usr/portage sync-type: git sync-uri: https://github.com/funtoo/ports-2012.git priority: -1000 raiagent location: /var/lib/layman/raiagent masters: gentoo priority: 50 sabayon location: /var/lib/layman/sabayon masters: gentoo priority: 50 ACCEPT_KEYWORDS="amd64 ~amd64" ACCEPT_LICENSE="* -@EULA Oracle-BCLA-JavaSE" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-march=haswell -O2 -pipe" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt /usr/share/maven-bin-3.0/conf /usr/share/maven-bin-3.1/conf /usr/share/maven-bin-3.2/conf /usr/share/maven-bin-3.3/conf" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo" CXXFLAGS="-march=haswell -O2 -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr" FFLAGS="-march=haswell -O2 -pipe" GENTOO_MIRRORS="http://distfiles.gentoo.org" LANG="en_US.utf8" LDFLAGS="-Wl,-O1 -Wl,--sort-common -Wl,--as-needed" LINGUAS="en fr" MAKEOPTS="-j3" PKGDIR="/usr/portage/packages" PORTAGE_CONFIGROOT="/" PORTAGE_TMPDIR="/var/tmp" USE="X a52 aac acl alsa amd64 apng berkdb bluray branding bzip2 cdda cddb cdio cdr corefonts cracklib crypt cups cxx dbus dri dts dvd dvdr dvdread encode exif faac faad ffmpeg flac gdbm gif gpm graphviz ico iconv icu ieee1394 ios ipod ipv6 jpeg jpeg2k lame libass libguess libmpeg2 mad matroska mjpeg mmx modules mp3 mpeg mtp mudflap multilib ncurses nls nptl nsplugin ogg opengl openmp pam pcre pdf png postproc pppd python quicktime readline resolvconf sndfile sse sse2 ssl svg taglib tcpd theora tiff truetype twolame udev unicode v4l vorbis vpx wav wavpack webp win32codecs wmf x264 x265 xattr xft xml xvid zlib zsh-completion" ABI_X86="64" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel ice1724 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 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 authn_core authz_core socache_shmcb unixd" 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" CPU_FLAGS_X86="aes avx fma3 mmx mmxext popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3" 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 ublox ubx" GRUB_PLATFORMS="efi-64 pc" INPUT_DEVICES="evdev synaptics keyboard mouse" KERNEL="linux" 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="i386 x86_64" QEMU_USER_TARGETS="i386 x86_64" RUBY_TARGETS="ruby20 ruby21 ruby22" USERLAND="GNU" VIDEO_CARDS="virtualbox" 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, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS Hope it helps…
$ emerge --info Portage 2.3.2 (python 2.7.12-final-0, funtoo/1.0/linux-gnu/arch/x86-64bit, gcc-4.9.3, glibc-2.22, 4.8.7-1 x86_64) ================================================================= System uname: Linux-4.8.7-1-x86_64-Intel-R-_Core-TM-_i7-4600U_CPU_@_2.10GHz-with-gentoo-2.2.1 KiB Mem: 2051272 total, 97528 free KiB Swap: 2097148 total, 1669544 free sh bash 4.3_p42 ld GNU ld (Funtoo 2.25) 2.25.0 app-shells/bash: 4.3_p42::gentoo dev-java/java-config: 2.2.0-r3::gentoo dev-lang/perl: 5.24.0-r2::gentoo dev-lang/python: 2.7.12::gentoo, 3.4.5::gentoo dev-util/cmake: 3.7.0::gentoo sys-apps/baselayout: 2.2.1::gentoo sys-apps/openrc: 0.18.3-r2::gentoo sys-apps/sandbox: 2.10-r2::gentoo sys-devel/autoconf: 2.13::gentoo, 2.69-r2::gentoo sys-devel/automake: 1.13.4-r1::gentoo, 1.14.1-r1::gentoo, 1.15-r2::gentoo sys-devel/binutils: 2.25-r2::gentoo sys-devel/gcc: 4.9.3-r3::gentoo sys-devel/gcc-config: 1.8-r1::gentoo sys-devel/libtool: 2.4.6-r2::gentoo sys-devel/make: 4.1-r1::gentoo sys-kernel/linux-headers: 4.3::gentoo (virtual/os-headers) sys-libs/glibc: 2.22::gentoo Repositories: gentoo location: /usr/portage sync-type: git sync-uri: https://github.com/funtoo/ports-2012.git priority: -1000 raiagent location: /var/lib/layman/raiagent masters: gentoo priority: 50 sabayon location: /var/lib/layman/sabayon masters: gentoo priority: 50 ACCEPT_KEYWORDS="amd64 ~amd64" ACCEPT_LICENSE="* -@EULA Oracle-BCLA-JavaSE" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-march=haswell -O2 -pipe" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt /usr/share/maven-bin-3.0/conf /usr/share/maven-bin-3.1/conf /usr/share/maven-bin-3.2/conf /usr/share/maven-bin-3.3/conf" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo" CXXFLAGS="-march=haswell -O2 -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr" FFLAGS="-march=haswell -O2 -pipe" GENTOO_MIRRORS="http://distfiles.gentoo.org" LANG="en_US.utf8" LDFLAGS="-Wl,-O1 -Wl,--sort-common -Wl,--as-needed" LINGUAS="en fr" MAKEOPTS="-j3" PKGDIR="/usr/portage/packages" PORTAGE_CONFIGROOT="/" PORTAGE_TMPDIR="/var/tmp" USE="X a52 aac acl alsa amd64 apng berkdb bluray branding bzip2 cdda cddb cdio cdr corefonts cracklib crypt cups cxx dbus dri dts dvd dvdr dvdread encode exif faac faad ffmpeg flac gdbm gif gpm graphviz ico iconv icu ieee1394 ios ipod ipv6 jpeg jpeg2k lame libass libguess libmpeg2 mad matroska mjpeg mmx modules mp3 mpeg mtp mudflap multilib ncurses nls nptl nsplugin ogg opengl openmp pam pcre pdf png postproc pppd python quicktime readline resolvconf sndfile sse sse2 ssl svg taglib tcpd theora tiff truetype twolame udev unicode v4l vorbis vpx wav wavpack webp win32codecs wmf x264 x265 xattr xft xml xvid zlib zsh-completion" ABI_X86="64" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel ice1724 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 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 authn_core authz_core socache_shmcb unixd" 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" CPU_FLAGS_X86="aes avx fma3 mmx mmxext popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3" 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 ublox ubx" GRUB_PLATFORMS="efi-64 pc" INPUT_DEVICES="evdev synaptics keyboard mouse" KERNEL="linux" 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="i386 x86_64" QEMU_USER_TARGETS="i386 x86_64" RUBY_TARGETS="ruby20 ruby21 ruby22" USERLAND="GNU" VIDEO_CARDS="virtualbox" 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, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS
I'm having the same problem as symptoms. I was able to resolve the problem by removing the pgo flag from firefox.
I think gimp had a similar problem. the media-gfx/gimp-2.9.4 ebuild does this: # Bugs #569738 and #591214 local nv for nv in /dev/nvidia-uvm /dev/nvidiactl /dev/nvidia[0-9] ; do [[ -e "${nv}" ]] && addwrite "${nv}" done addwrite /dev/dri/ # bug #574038 addwrite /dev/ati/ # bug 589198 addwrite /proc/mtrr # bug 589198
or maybe not. Moving "addpredict "${cards}"" up like you did in your example, will simply result in it never being executed since you don't have any of the listed bin_cards (e.g. if using nvidia or amd binary drivers). ${cards} is empty since you seem to have direct rendering disabled for your intel gpu. So one solution would be to enable that. The other option would be to replace addpredict "${cards}" by something like [[ -n "${cards}" ]] && addpredict "${cards}" this should catch the case where direct rendering is disabled and no binary drivers are present.
(In reply to Sven B. from comment #4) > [[ -n "${cards}" ]] && addpredict "${cards}" Yes, this is a proper fix. Thanks, applied in git commit 53b80a8d0b9a3eb6c20a3e9c56add2381a1d91dc.