Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 672906 - www-client/firefox-64.0 fails to build: gmake: write error: stdout
Summary: www-client/firefox-64.0 fails to build: gmake: write error: stdout
Status: RESOLVED NEEDINFO
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Mozilla Gentoo Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-12-10 23:13 UTC by Patrick McLean
Modified: 2020-10-04 18:12 UTC (History)
14 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log (xzipped) (build.log.xz,37.90 KB, application/octet-stream)
2018-12-10 23:13 UTC, Patrick McLean
Details
output of emerge --info firefox (emergeinfo-firefox,7.99 KB, text/plain)
2018-12-10 23:14 UTC, Patrick McLean
Details
firefox emerge --info (ff.emerge.info,7.47 KB, application/x-info)
2018-12-11 16:33 UTC, peter@prh.myzen.co.uk
Details
firefox emerge -pqv (ff.emerge.pqv,759 bytes, text/plain)
2018-12-11 16:34 UTC, peter@prh.myzen.co.uk
Details
firefox-64.0-add-O-to-MOZ_MAKE_FLAGS.patch (firefox-64.0-add-O-to-MOZ_MAKE_FLAGS.patch,489 bytes, patch)
2018-12-11 22:05 UTC, Patrick McLean
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Patrick McLean gentoo-dev 2018-12-10 23:13:00 UTC
Fails to build.
Comment 1 Patrick McLean gentoo-dev 2018-12-10 23:13:41 UTC
Created attachment 557550 [details]
build.log (xzipped)
Comment 2 Patrick McLean gentoo-dev 2018-12-10 23:14:09 UTC
Created attachment 557552 [details]
output of emerge --info firefox
Comment 3 Patrick McLean gentoo-dev 2018-12-10 23:59:05 UTC
Compiles successfully with MAKEOPTS="-j8", breaks with MAKEOPTS="-j20", also reported in #gentoo-dev that MAKEOPTS="-j13" breaks.

firefox-63.0.3 works fine.
Comment 4 Patrick McLean gentoo-dev 2018-12-11 00:23:18 UTC
MAKEOPTS=-j10 breaks, MAKEOPTS=-j9 works fine.
Comment 5 Mark Jacobson 2018-12-11 01:42:32 UTC
Also found anything over MAKEOPTS=-j9 fails. My normal setting is 16.
Comment 6 Bernardo Meurer 2018-12-11 02:01:14 UTC
I have found that MAKEOPTS="-j12" will break, but only if I enable the geckodriver, hwaccel, or lto USE flags. By which I mean enabling any of those, or any combination of them (the power set of them) causes it to break. Will attempt to emerge with different makeopts.
Comment 7 Adios Kid 2018-12-11 03:38:53 UTC
The log says 

"configure:9799:23: error: #error "Insufficient libpng version (10635 required).""

I'll try with that dep version

media-libs/libpng-1.6.35-r1
Comment 8 Georgy Yakovlev archtester gentoo-dev 2018-12-11 03:54:11 UTC
builds fine with-j64 for me

 emerge --info firefox
Portage 2.3.52 (python 3.6.6-final-0, default/linux/amd64/17.1/no-multilib/hardened, gcc-8.2.0, glibc-2.28-r2, 4.19.8-gentoo x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-4.19.8-gentoo-x86_64-AMD_Ryzen_Threadripper_2990WX_32-Core_Processor-with-gentoo-2.6
KiB Mem:   130817032 total, 112285528 free
KiB Swap:          0 total,         0 free
Timestamp of repository gentoo: Tue, 11 Dec 2018 03:24:19 +0000
Head commit of repository gentoo: 59d1ae20e09b8d989c49471a3b86df9c093acec6

Timestamp of repository rust: Fri, 07 Dec 2018 13:26:29 +0000
Head commit of repository rust: 7c5c4e5ee1b0bfb1f13b174dbe8e29975367a477

sh bash 4.4_p23
ld GNU ld (Gentoo 2.31.1 p4) 2.31.1
distcc[56093] (dcc_mkdir) ERROR: mkdir '/tmp/portage/.distcc/state' failed: No such file or directory [disabled]
app-shells/bash:          4.4_p23::gentoo
dev-java/java-config:     2.2.0-r4::gentoo
dev-lang/perl:            5.26.2::gentoo
dev-lang/python:          2.7.15::gentoo, 3.6.6::gentoo
dev-util/cmake:           3.13.1::gentoo
dev-util/pkgconfig:       0.29.2::gentoo
sys-apps/baselayout:      2.6-r1::gentoo
sys-apps/openrc:          0.40.2::gentoo
sys-apps/sandbox:         2.14::gentoo
sys-devel/autoconf:       2.13::gentoo, 2.69-r4::gentoo
sys-devel/automake:       1.16.1-r1::gentoo
sys-devel/binutils:       2.31.1-r2::gentoo
sys-devel/gcc:            8.2.0-r5::gentoo
sys-devel/gcc-config:     2.0::gentoo
sys-devel/libtool:        2.4.6-r5::gentoo
sys-devel/make:           4.2.1-r4::gentoo
sys-kernel/linux-headers: 4.19::gentoo (virtual/os-headers)
sys-libs/glibc:           2.28-r2::gentoo
Repositories:

gentoo
    location: /var/db/repos/gentoo
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/gentoo.git
    priority: -1000
    sync-git-verify-commit-signature: true
    sync-git-clone-extra-opts: -b master

gyakovlev
    location: /var/db/repos/gyakovlev
    masters: gentoo

rust
    location: /var/db/repos/rust
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/rust.git
    masters: gentoo

Installed sets: @myfonts
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O2 -pipe -frecord-gcc-switches"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /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/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-march=native -O2 -pipe -frecord-gcc-switches"
DISTDIR="/var/cache/distfiles"
EMERGE_DEFAULT_OPTS="--ask-enter-invalid --jobs=32 --load-average 63 --quiet-build"
ENV_UNSET="DBUS_SESSION_BUS_ADDRESS DISPLAY GOBIN PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR"
FCFLAGS="-march=native -O2 -pipe -frecord-gcc-switches"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs buildpkg cgroup collision-protect compressdebug config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch parallel-install preserve-libs protect-owned sandbox sfperms sign splitdebug strict strict-keepdir unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-march=native -O2 -pipe -frecord-gcc-switches"
GENTOO_MIRRORS="https://gentoo.osuosl.org/"
LANG="en_US.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,--defsym=__gentoo_check_ldflags__=0"
LINGUAS="en"
MAKEOPTS="--jobs=64 --load-average=63 --output-sync=recurse --print-directory"
PKGDIR="/var/cache/binpkgs"
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="/tmp"
USE="X a52 aac acl acpi activities alsa amd64 ayatana bash-completion bluetooth bluray branding bzip2 cairo crypt css cups cxx dbus dri dvd elogind exif flac fontconfig gif gpm gtk hardened iconv icu introspection ios ipv6 jpeg kde kipi kwallet libass libnotify libtirpc lm_sensors lz4 lzma lzo mp3 mp4 ncurses nptl numa ogg opengl openmp pam pcre pdf phonon pie plasma png policykit qml qt5 readline seccomp semantic-desktop ssl ssp startup-notification svg tiff truetype udev udisks unicode usb vaapi vdpau vim-syntax vorbis vulkan wayland webp widgets x264 x265 xattr xcb xcomposite xinerama xml xscreensaver xtpax zlib zsh-completion" ABI_X86="64" 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" 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="karbon plan sheets stage words" CAMERAS="ptp2 fuji" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx avx2 f16c fma3 mmx mmxext pclmul popcnt sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3" 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="efi-64" INPUT_DEVICES="libinput" KERNEL="linux" L10N="en" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-6 php7-1" POSTGRES_TARGETS="postgres9_5 postgres10" PYTHON_SINGLE_TARGET="python3_6" PYTHON_TARGETS="python2_7 python3_6" RUBY_TARGETS="ruby25" USERLAND="GNU" VIDEO_CARDS="amdgpu radeon radeonsi" 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_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

=================================================================
                        Package Settings
=================================================================

www-client/firefox-64.0::gentoo was built with the following:
USE="custom-cflags custom-optimization dbus hardened hwaccel lto screenshot startup-notification system-harfbuzz system-icu system-jpeg system-libevent system-libvpx -bindist -clang -debug -eme-free -geckodriver (-gmp-autoupdate) -jack (-neon) -pulseaudio (-selinux) -system-sqlite -test -wifi" L10N="-ach -af -an -ar -as -ast -az -bg -bn-BD -bn-IN -br -bs -ca -cak -cs -cy -da -de -dsb -el -en-GB -en-ZA -eo -es-AR -es-CL -es-ES -es-MX -et -eu -fa -ff -fi -fr -fy -ga -gd -gl -gn -gu -he -hi -hr -hsb -hu -hy -id -is -it -ja -ka -kab -kk -km -kn -ko -lij -lt -lv -mai -mk -ml -mr -ms -nb -nl -nn -or -pa -pl -pt-BR -pt-PT -rm -ro -ru -si -sk -sl -son -sq -sr -sv -ta -te -th -tr -uk -uz -vi -xh -zh-CN -zh-TW"
CFLAGS="-march=native -pipe -frecord-gcc-switches"
CXXFLAGS="-march=native -pipe -frecord-gcc-switches -fno-delete-null-pointer-checks -fno-lifetime-dse -fno-schedule-insns -fno-schedule-insns2"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,--defsym=__gentoo_check_ldflags__=0 -Wl,-rpath=/usr/lib64/firefox,--enable-new-dtags -Wl,-z,relro,-z,now"
Comment 9 Thomas Deutschmann (RETIRED) gentoo-dev 2018-12-11 09:03:59 UTC
(In reply to Adios Kid from comment #7)
> The log says 
> 
> "configure:9799:23: error: #error "Insufficient libpng version (10635
> required).""
> 
> I'll try with that dep version
> 
> media-libs/libpng-1.6.35-r1

Thanks, fixed via https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cfff9994f715e8815df8d105d9c4a92d3f17db9b but you experienced at least a different problem. In the logs from comment #0 there's no reason listed. Looks like a parallel build issue at moment.
Comment 10 peter@prh.myzen.co.uk 2018-12-11 09:56:09 UTC
(In reply to Thomas Deutschmann from comment #9)
> (In reply to Adios Kid from comment #7)
> Looks like a parallel build issue at moment.
Here I get " 0:30.81 gmake[5]: write error: stdout" with -j24. Compiling now with -j8 and it's passed that point in the process.
Comment 11 Dennis Schridde 2018-12-11 10:23:55 UTC
Could someone please spice up the summary line with some more details?  There is also bug #672918 about a different Firefox 64 build failure and this could become confusing.
Comment 12 Thomas Deutschmann (RETIRED) gentoo-dev 2018-12-11 11:04:59 UTC
When you are posting in this bug, please show the 4th line from build.log, e.g. the line showing your USE flags.
Comment 13 peter@prh.myzen.co.uk 2018-12-11 16:31:54 UTC
(In reply to peter@prh.myzen.co.uk from comment #10)
> Here I get " 0:30.81 gmake[5]: write error: stdout" with -j24. Compiling now
> with -j8 and it's passed that point in the process.

I spoke too soon. Now I get the same error, but later. In fact,

$ grep "Error " /var/log/portage/www-client:firefox-64.0:20181211-093410.log
 0:03.67 Error processing command. Ignoring because optional. (optional:packages.txt:comm/build/virtualenv_packages.txt)
 0:22.49 gmake[3]: *** [/var/tmp/portage/www-client/firefox-64.0/work/firefox-64.0/config/recurse.mk:101: xpcom/build/export] Error 1
 0:30.81 gmake[4]: *** [Makefile:15: export] Error 1
 0:30.81 gmake[3]: *** [/var/tmp/portage/www-client/firefox-64.0/work/firefox-64.0/config/recurse.mk:101: xpcom/xpidl/export] Error 2
 0:45.98 gmake[2]: *** [/var/tmp/portage/www-client/firefox-64.0/work/firefox-64.0/config/recurse.mk:34: export] Error 2
 0:45.98 gmake[1]: *** [/var/tmp/portage/www-client/firefox-64.0/work/firefox-64.0/config/rules.mk:431: default] Error 2
 0:45.98 gmake: *** [client.mk:125: build] Error 2


This is the fourth line, as requested:
USE:        abi_x86_64 amd64 dbus elibc_glibc gmp-autoupdate kernel_linux l10n_en-GB screenshot startup-notification userland_GNU
Comment 14 peter@prh.myzen.co.uk 2018-12-11 16:33:41 UTC
Created attachment 557588 [details]
firefox emerge --info
Comment 15 peter@prh.myzen.co.uk 2018-12-11 16:34:25 UTC
Created attachment 557590 [details]
firefox emerge -pqv
Comment 16 Michael Cook 2018-12-11 18:44:11 UTC
Also had same failure at -j12, can confirm -j9 builds fine.
Comment 17 cyrillic 2018-12-11 19:37:57 UTC
I was getting the same gmake: write error: stdout with 64.0_beta versions.
My solution was to remove "--verbose" from src_compile phase.
Comment 18 Georgy Yakovlev archtester gentoo-dev 2018-12-11 21:21:42 UTC
found another

adding -O to MAKEOPTS fixes build.

I can reliably reproduce the build with
USE="-*" MAKEOPTS="-j16", but as soon as I add -O, it'll build
-O is -output-sync=target
Comment 19 Patrick McLean gentoo-dev 2018-12-11 22:05:55 UTC
Created attachment 557602 [details, diff]
firefox-64.0-add-O-to-MOZ_MAKE_FLAGS.patch

This ebuild patch fixes the issue for me, though the race condition still exists somewhere in the upstream build system.
Comment 20 Larry the Git Cow gentoo-dev 2018-12-11 22:46:37 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e3df3f47eba9c4236d3c364eaed4b8a7e87ed1a9

commit e3df3f47eba9c4236d3c364eaed4b8a7e87ed1a9
Author:     Thomas Deutschmann <whissi@gentoo.org>
AuthorDate: 2018-12-11 22:46:09 +0000
Commit:     Thomas Deutschmann <whissi@gentoo.org>
CommitDate: 2018-12-11 22:46:28 +0000

    www-client/firefox: add workaround for parallel make issue
    
    Bug: https://bugs.gentoo.org/672906
    Package-Manager: Portage-2.3.52, Repoman-2.3.12
    Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>

 www-client/firefox/firefox-64.0.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Comment 21 Georgy Yakovlev archtester gentoo-dev 2018-12-11 23:08:18 UTC
there is a minor problem with that patch.
it adds -O *after* user's MAKEOPTS and it'll override any --output-sync user may have set.

for example I set --output-sync=recurse globally and that -O will override it.

but yeah, it's just a temporary hack to get it building, underlying output-dependent race is still there.

looks something relies on getting make output ordered.
-O does not change compilation order, it just changes output order.
Comment 22 Lars 2019-03-10 14:57:18 UTC
(In reply to cyrillic from comment #17)
> I was getting the same gmake: write error: stdout with 64.0_beta versions.
> My solution was to remove "--verbose" from src_compile phase.

Same error and same solution here with www-client/firefox-65.0.2.
I got the error although I compiled with `MAKEOPTS="-j1"`.
Comment 23 Thomas Deutschmann (RETIRED) gentoo-dev 2020-10-04 18:12:00 UTC
Still able to reproduce with 78.3.1+?