Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 513048 - www-client/chromium-37.0.2041.4: builds bundled ffmpeg... 4 times
Summary: www-client/chromium-37.0.2041.4: builds bundled ffmpeg... 4 times
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Chromium Project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-06-12 14:52 UTC by Michał Górny
Modified: 2014-07-30 17:48 UTC (History)
1 user (show)

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


Attachments
Truncated build log (build.log,203.23 KB, text/x-log)
2014-06-12 14:52 UTC, Michał Górny
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2014-06-12 14:52:42 UTC
Created attachment 378750 [details]
Truncated build log

[ebuild     U #] www-client/chromium-37.0.2041.4 [37.0.2024.2] USE="cups gnome-keyring (pic%*) tcmalloc -bindist -custom-cflags -gnome -kerberos (-neon) -pulseaudio (-selinux) {-test}" LINGUAS="pl -am -ar -bg -bn -ca -cs -da -de -el -en_GB -es -es_LA -et -fa -fi -fil -fr -gu -he -hi -hr -hu -id -it -ja -kn -ko -lt -lv -ml -mr -ms -nb -nl -pt_BR -pt_PT -ro -ru -sk -sl -sr -sv -sw -ta -te -th -tr -uk -vi -zh_CN -zh_TW" 0 kB

$ grep '/flac\.o' build.log 
CC	libavcodec/flac.o
CC	libavcodec/flac.o
CC	libavcodec/flac.o
CC	libavcodec/flac.o

Portage 2.2.10 (default/linux/amd64/13.0/desktop, gcc-4.8.2, glibc-2.19, 3.15.0-pf1-mgorny-amd64+ x86_64)
=================================================================
System uname: Linux-3.15.0-pf1-mgorny-amd64+-x86_64-AMD_Athlon-tm-_64_X2_Dual_Core_Processor_3800+-with-gentoo-2.2
KiB Mem:     4048588 total,    494476 free
KiB Swap:    1502072 total,   1502072 free
Timestamp of tree: Thu, 12 Jun 2014 13:30:01 +0000
ld GNU ld (GNU Binutils) 2.24
distcc 3.2rc1 x86_64-pc-linux-gnu [enabled]
ccache version 3.1.9 [disabled]
app-shells/bash:          4.2_p47
dev-java/java-config:     2.2.0
dev-lang/python:          2.7.6-r1, 3.2.5-r4, 3.3.5, 3.4.0
dev-util/ccache:          3.1.9-r3
dev-util/cmake:           2.8.12.2-r1
dev-util/pkgconfig:       0.28-r1
sys-apps/baselayout:      2.2
sys-apps/openrc:          0.12.4
sys-apps/sandbox:         2.6-r1
sys-devel/autoconf:       2.13, 2.69
sys-devel/automake:       1.11.6, 1.13.4, 1.14.1
sys-devel/binutils:       2.24-r3
sys-devel/gcc:            4.8.2
sys-devel/gcc-config:     1.8
sys-devel/libtool:        2.4.2-r1::gentoo-cvs
sys-devel/make:           4.0-r1
sys-kernel/linux-headers: 3.14 (virtual/os-headers)
sys-libs/glibc:           2.19
Repositories: gentoo sunrise x11 science gentoo-cvs mgorny
Installed sets: @system
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=athlon64 -O2 -pipe -frecord-gcc-switches"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt /var/lib/hsqldb"
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 /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-march=athlon64 -O2 -pipe -frecord-gcc-switches"
DISTDIR="/srv/nfs/common/distfiles"
EMERGE_DEFAULT_OPTS="--with-bdeps y --ask --keep-going --quiet-build=n"
FCFLAGS="-march=athlon64 -O2 -pipe -frecord-gcc-switches"
FEATURES="assume-digests binpkg-logs buildpkg cgroup collision-protect config-protect-if-modified distcc distcc-pump distlocks ebuild-locks fixlafiles merge-sync multilib-strict news parallel-fetch preserve-libs protect-owned sandbox sfperms sign strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync"
FFLAGS="-march=athlon64 -O2 -pipe -frecord-gcc-switches"
GENTOO_MIRRORS="http://linux.rz.ruhr-uni-bochum.de/download/gentoo-mirror/ http://gentoo.mirror.web4u.cz/ http://mirror.netcologne.de/gentoo/ http://ftp.snt.utwente.nl/pub/os/linux/gentoo http://gd.tuwien.ac.at/opsys/linux/gentoo/ http://gentoo.mirror.pw.edu.pl/ http://ftp.vectranet.pl/gentoo/ http://ftp.fi.muni.cz/pub/linux/gentoo/"
INSTALL_MASK=""
LANG="pl_PL.utf8"
LC_ALL="pl_PL.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,--hash-style=gnu"
MAKEOPTS="-j12"
PKGDIR="/srv/nfs/common/packages/athlon64"
PORTAGE_COMPRESS="xz"
PORTAGE_COMPRESS_FLAGS="-9"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --times --compress --force --whole-file --delete --stats --timeout=45 --exclude=/distfiles --exclude=/packages --exclude=/local --exclude=CVS --exclude=/metadata/cache --omit-dir-times"
PORTAGE_TMPDIR="/tmp"
PORTDIR="/var/db/repos/gentoo"
PORTDIR_OVERLAY="/var/db/repos/sunrise /var/db/repos/x11 /var/db/repos/science /usr/src/gx86 /home/mgorny/git/mgorny-repo"
USE="3dnow 3dnowext X a52 aac acl adns aio alsa amd64 bash-completion bluetooth branding btrfs bzip2 cairo caps cdda cdr cli crypt cups curl cxx dbus djvu dri dts dvb dvd dvdr egl emboss exif fftw firefox flac fontconfig fortran gd gif glamor gles2 gmp gnuplot gnutls gphoto2 gstreamer gtk iconv idn imagemagick ipv6 jpeg jpeg2k kate latex lcms libass libatomic liblockfile libnotify libproxy libsamplerate libsecret libtiger lz4 lzma lzo mad mmap mmx mmxext mng modules mp3 mp4 mpeg multilib ncurses nls nptl ogg openal opencl opengl openmp openvg opus osmesa pam pango pch pcre pcre-jit pdf plotutils png postscript ppds qt3support readline sdl session slang smp sndfile speex spell sse sse2 sse3 ssl startup-notification svg systemd t1lib tcpd threads tiff truetype udev udisks unicode upower usb v4l2 vhosts vim-syntax vorbis wavpack wayland webp wmf wxwidgets x264 xattr xcb xft xml xpm xv xvid xvmc zlib zsh-completion" ABI_X86="32 64" ALSA_CARDS="hda-intel emu10k1 virmidi mpu401 pcsp" APACHE2_MODULES="actions alias deflate filter mime mime_magic negotiation rewrite 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" 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" INPUT_DEVICES="evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="pl" LIRC_DEVICES="serial" NGINX_MODULES_HTTP="gzip limit_conn limit_req rewrite spdy uwsgi" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_4 python3_3 python3_2 python3_1 jython2_7 pypy" QEMU_SOFTMMU_TARGETS="i386 x86_64 ppc ppc64 ppc64abi32 arm aarch64" QEMU_USER_TARGETS="ppc ppc64 arm aarch64" RUBY_TARGETS="ruby19 ruby20" SANE_BACKENDS="artec_eplus48u" USERLAND="GNU" VIDEO_CARDS="nouveau vesa radeon r600 s3" 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.7 3.3 3.2"
Unset:  CPPFLAGS, CTARGET, PORTAGE_BUNZIP2_COMMAND, PORTAGE_RSYNC_EXTRA_OPTS, SYNC
Comment 1 Mike Gilbert gentoo-dev 2014-06-13 08:41:53 UTC
It is also worth noting that gyp_chromium fails with the new ffmpeg build setup here:

gyp: Undefined variable c_sources in /var/tmp/portage/www-client/chromium-37.0.2041.4/work/chromium-37.0.2041.4/third_party/ffmpeg/ffmpeg.gyp
Comment 2 Mike Gilbert gentoo-dev 2014-06-13 09:25:30 UTC
Had a quick conversation in IRC about this.

[04:47:53] <floppym> mgorny: This chromium ffmpeg thing is really dumb. Basically, script builds ffmpeg so that generate_gyp.py can figure out what files actually need to be compiled.
...
[05:02:42] <mgorny> floppym: i see there's no --config-only there anymore
[05:02:53] <floppym> mgorny: Right.
[05:03:32] <floppym> I assume that we need to rebuild the file list due to passing --disable-asm for x86.
[05:03:42] <mgorny> so it is built to remove .asm files from gyp?
[05:03:55] <floppym> That would be my guess.
[05:05:20] <mgorny> my suggestion would be then: put a diff in FILESDIR :P
[05:05:30] <mgorny> it can't be very big, i guess
Comment 3 Paweł Hajdan, Jr. (RETIRED) gentoo-dev 2014-06-13 11:31:57 UTC
(In reply to Mike Gilbert from comment #2)
> Had a quick conversation in IRC about this.
> 
> [04:47:53] <floppym> mgorny: This chromium ffmpeg thing is really dumb.
> Basically, script builds ffmpeg so that generate_gyp.py can figure out what
> files actually need to be compiled.
> ...
> [05:02:42] <mgorny> floppym: i see there's no --config-only there anymore
> [05:02:53] <floppym> mgorny: Right.
> [05:03:32] <floppym> I assume that we need to rebuild the file list due to
> passing --disable-asm for x86.
> [05:03:42] <mgorny> so it is built to remove .asm files from gyp?
> [05:03:55] <floppym> That would be my guess.

Correct. 

> [05:05:20] <mgorny> my suggestion would be then: put a diff in FILESDIR :P
> [05:05:30] <mgorny> it can't be very big, i guess

It can change often/unpredictably though, and would lead to either conditional patch application (bad) or the patch adding conditionals to gyp, making it even more merge conflict prone.

Suggestions welcome.
Comment 4 Mike Gilbert gentoo-dev 2014-06-13 15:38:50 UTC
(In reply to Paweł Hajdan, Jr. from comment #3)
> Suggestions welcome.

At the moment, the ebuild is broken on my ~amd64 system. See comment 1. I would suggest reverting the changes until that can be resolved.

If I understand correctly, we would only need to build ffmpeg in src_configure if we are building for an x86/hardened system. So, one option would be to introduce an alternate code path for that platform in the ebuild; that way we would not make amd64 or x86/non-hardened users build ffmpeg 4 times for no reason.

The obvious downside to this is that the alternate code path would get very little testing. However, I don't really care personally; it's an exotic configuration used by a small segment of our users.
Comment 5 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2014-06-13 20:32:56 UTC
Could you please post a diff between the file lists, so that we'd know how exactly it looks like?
Comment 6 Paweł Hajdan, Jr. (RETIRED) gentoo-dev 2014-06-14 08:38:38 UTC
(In reply to Mike Gilbert from comment #4)
> At the moment, the ebuild is broken on my ~amd64 system. See comment 1. I
> would suggest reverting the changes until that can be resolved.

  14 Jun 2014; Pawel Hajdan jr
  files/chromium-ffmpeg-r1.patch:
  Fix build on amd64, reported as part of bug #513048 by mgorny and floppym.

This fixes it on my amd64 system.

> If I understand correctly, we would only need to build ffmpeg in
> src_configure if we are building for an x86/hardened system. So, one option
> would be to introduce an alternate code path for that platform in the
> ebuild; that way we would not make amd64 or x86/non-hardened users build
> ffmpeg 4 times for no reason.

Yes, that's one option, although I'll try to just make it build ffmpeg exactly one time to generate gyp.

(In reply to Michał Górny from comment #5)
> Could you please post a diff between the file lists, so that we'd know how
> exactly it looks like?

I'll look into this when I have a moment.
Comment 7 Mike Gilbert gentoo-dev 2014-06-15 19:23:04 UTC
(In reply to Paweł Hajdan, Jr. from comment #6)
> This fixes it on my amd64 system.
> 

Yup, that's working now. Thanks!

I wonder how this worked upstream without your patch?
Comment 8 Paweł Hajdan, Jr. (RETIRED) gentoo-dev 2014-07-30 17:48:28 UTC
(In reply to Mike Gilbert from comment #7)
> I wonder how this worked upstream without your patch?

Upstream always builds both 32-bit and 64-bit.

By the way, this should be fixed now. Stable was never affected.

  30 Jul 2014; Pawel Hajdan jr
  chromium-37.0.2062.44.ebuild, -chromium-38.0.2096.0.ebuild,
  +chromium-38.0.2107.2.ebuild, +files/chromium-ffmpeg-r3.patch:
  Dev channel bump. Fix bug #513048 by mgorny. Remove old.