Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 444780 - >=www-client/firefox-17 - disable webrtc for arches that webrtc does not support
Summary: >=www-client/firefox-17 - disable webrtc for arches that webrtc does not support
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: PPC Linux
: Normal normal (vote)
Assignee: Mozilla Gentoo Team
URL: https://bugzilla.mozilla.org/show_bug...
Whiteboard:
Keywords:
: 445252 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-11-26 10:01 UTC by Marcus Comstedt
Modified: 2013-01-16 23:58 UTC (History)
4 users (show)

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


Attachments
build.log.gz (build.log.gz,174.96 KB, application/x-gzip)
2012-11-26 12:38 UTC, Marcus Comstedt
Details
Patch to fix the firefox-17.0-r1 ebuild (firefox-17.0-r1.ebuild.patch,481 bytes, patch)
2012-11-26 15:18 UTC, Marcus Comstedt
Details | Diff
simple patch to add some ppc defines for webrtc (firefox-ppc-typedefs.patch,480 bytes, patch)
2012-12-26 19:09 UTC, Steve Arnold
Details | Diff
updated typedefs patch (firefox-17.0.1-webrtc-typedefs.patch,1.68 KB, patch)
2012-12-29 20:30 UTC, Steve Arnold
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Marcus Comstedt 2012-11-26 10:01:03 UTC
When compiling the firefox-17.0-r1 ebuild, I got the following error:

/var/tmp/portage/www-client/firefox-17.0-r1/work/mozilla-release/media/webrtc/trunk/src/modules/../typedefs.h:52:2: error: #error Please add support for your architecture in typedefs.h

I have Firefox 17 running correctly on PPC on Ubuntu.  I think the trick is using --disable-webrtc on non-x86 arches if read debian/config/mozconfig.in correctly.

Reproducible: Always

Steps to Reproduce:
1. Run Gentoo on PPC
2. Unmask firefox-17.0-r1
3. emerge firefox
Actual Results:  
Fail To Build From Source

Expected Results:  
A new shiny firefox binary.  :-)
Comment 1 Markos Chandras (RETIRED) gentoo-dev 2012-11-26 11:51:37 UTC
Please attach the full build.log and your emerge --info
Comment 2 Marcus Comstedt 2012-11-26 12:38:18 UTC
Created attachment 330610 [details]
build.log.gz
Comment 3 Marcus Comstedt 2012-11-26 12:41:26 UTC
Here you go.  I had to gzip it since you have a 1MB limit on attachment size...

And here is the output from emerge --info '=www-client/firefox-17.0-r1':

Portage 2.1.11.31 (default/linux/powerpc/ppc64/10.0/32bit-userland/desktop/gnome, gcc-4.5.4, glibc-2.15-r3, 3.5.7X1000 ppc64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-3.5.7X1000-ppc64-PA6T,_altivec_supported-with-gentoo-2.1
Timestamp of tree: Sun, 25 Nov 2012 22:30:01 +0000
ld GNU ld (GNU Binutils) 2.22
app-shells/bash:          4.2_p37
dev-lang/python:          2.7.3-r2, 3.2.3
dev-util/cmake:           2.8.9
dev-util/pkgconfig:       0.27.1
sys-apps/baselayout:      2.1-r1
sys-apps/openrc:          0.11.5
sys-apps/sandbox:         2.5
sys-devel/autoconf:       2.13, 2.68
sys-devel/automake:       1.11.6
sys-devel/binutils:       2.22-r1
sys-devel/gcc:            4.5.4
sys-devel/gcc-config:     1.7.3
sys-devel/libtool:        2.4-r1
sys-devel/make:           3.82-r3
sys-kernel/linux-headers: 3.6 (virtual/os-headers)
sys-libs/glibc:           2.15-r3
Repositories: gentoo wagnerflo pike local
ACCEPT_KEYWORDS="ppc"
ACCEPT_LICENSE="* -@EULA"
CBUILD="powerpc-unknown-linux-gnu"
CFLAGS="-mcpu=power4 -mtune=power4 -maltivec -mabi=altivec -fno-strict-aliasing -O2 -pipe"
CHOST="powerpc-unknown-linux-gnu"
CONFIG_PROTECT="/etc /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="-mcpu=power4 -mtune=power4 -maltivec -mabi=altivec -fno-strict-aliasing -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="sv_SE.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
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="/var/lib/layman/wagnerflo /var/lib/layman/pike /usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X a52 aac acl alsa altivec berkdb bluetooth branding bzip2 cairo cdda cdr cjk cli consolekit cracklib crypt css cups curl cxx dbus dri dts dvb dvd dvdr eds emboss encode exif fam ffmpeg firefox flac gcc64 gdbm gif gmp gnome gnome-keyring gnutls gpm gstreamer gtk iconv idn ipv6 jpeg lcms ldap libffi libnotify lua mad mng modules mp3 mp4 mpeg mudflap mule multitarget nautilus ncurses nis nls nptl offensive ogg opengl openmp pam pango pcre pdf png policykit ppc ppds pppd pulseaudio readline sdl seamonkey session smp socialweb spell ssl startup-notification svg tcpd theora threads tiff truetype udev udisks unicode upower usb vorbis wxwidgets xcb xemacs xft xml xmpp xv xvid zlib" ALSA_CARDS="aoa aoa-fabric-layout aoa-onyx aoa-soundbus aoa-soundbus-i2s aoa-tas aoa-toonie powermac usb-audio via82xx" 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" 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 ubx" INPUT_DEVICES="evdev keyboard mouse wacom" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" PHP_TARGETS="php5-3" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_2" RUBY_TARGETS="ruby18 ruby19" USERLAND="GNU" VIDEO_CARDS="radeon modesetting" 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, LINGUAS, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON
Comment 4 Marcus Comstedt 2012-11-26 12:47:23 UTC
Anyway, the problem is that webrtc can't be compiled on anything except x86 or armel because they have an explicit list of arches they know about instead of just testing for the properties they are interrested in (32/64 bit, and endianness), so until they fix that disabling webrtc should be the best solution (and that is what Debian/Ubuntu does).
Comment 5 Marcus Comstedt 2012-11-26 15:18:26 UTC
Created attachment 330630 [details, diff]
Patch to fix the firefox-17.0-r1 ebuild

With the attached patch, firefox 17 builds ok on PPC.

(NB: I can't guarantee that it builds on ARM, but I included it in the whitelist since it is explicitly listed in typedefs.h.)
Comment 6 Michael Volland 2012-11-29 09:07:59 UTC
I can confirm the problem on ppc64

snippet build.log:

In file included from /var/tmp/portage/www-client/firefox-17.0-r1/work/mozilla-release/media/webrtc/trunk/src/modules/../common_types.h:14:0,
                 from /var/tmp/portage/www-client/firefox-17.0-r1/work/mozilla-release/media/webrtc/trunk/src/modules/rtp_rtcp/source/rtp_rtcp_impl.cc:11:
/var/tmp/portage/www-client/firefox-17.0-r1/work/mozilla-release/media/webrtc/trunk/src/modules/../typedefs.h:52:2: error: #error Please add support for your architecture in typedefs.h

emerge --info:

# emerge --info
Portage 2.1.11.31 (default/linux/powerpc/ppc64/10.0/64bit-userland, gcc-4.5.3, glibc-2.16.0, 2.6.39.4 ppc64)
=================================================================
System uname: Linux-2.6.39.4-ppc64-PPC970MP,_altivec_supported-with-gentoo-2.2
Timestamp of tree: Thu, 29 Nov 2012 08:15:01 +0000
ld GNU ld (GNU Binutils) 2.23.1
app-shells/bash:          4.2_p39
dev-java/java-config:     2.1.12
dev-lang/python:          2.7.3-r2, 3.2.3-r1
dev-util/cmake:           2.8.9-r1
dev-util/pkgconfig:       0.27.1
sys-apps/baselayout:      2.2
sys-apps/openrc:          0.11.5
sys-apps/sandbox:         2.6
sys-devel/autoconf:       2.13, 2.69
sys-devel/automake:       1.11.6, 1.12.5
sys-devel/binutils:       2.23.1
sys-devel/gcc:            4.5.3-r2, 4.6.3
sys-devel/gcc-config:     1.8
sys-devel/libtool:        2.4.2
sys-devel/make:           3.82-r4
sys-kernel/linux-headers: 3.6 (virtual/os-headers)
sys-libs/glibc:           2.16.0
Repositories: gentoo x-portage
ACCEPT_KEYWORDS="ppc64 ~ppc64"
ACCEPT_LICENSE="*"
CBUILD="powerpc64-unknown-linux-gnu"
CFLAGS="-O2 -pipe"
CHOST="powerpc64-unknown-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="${EPREFIX}/etc/gconf /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="-O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://mirror.netcologne.de/gentoo/ http://ftp.halifax.rwth-aachen.de/gentoo/ ftp://ftp.uni-erlangen.de/pub/mirrors/gentoo rsync://ftp-stud.hs-esslingen.de/gentoo/"
LANG="en_US.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j4"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
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="/usr/local/portage"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="X acl alsa altivec berkdb bzip2 cdr cli cracklib crypt cups cxx dbus djvu dri encode fbcon fortran gd gdbm gimp giv glib gnome gpm gtk ibm iconv icu imagemagick imlib ipv6 jpeg lame libcaca libnotify modules mp3 mudflap ncurses nls nptl nsplugin odbc ogg opengl openmp openvg pam pcre png ppc64 pppd pulseaudio readline session sox sqlite ssl startup-notification svg syslog tcpd theora threads tiff tk truetype udev unicode usb vorbisi wxwidgets xanim xml zlib" 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" 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 ubx" INPUT_DEVICES="evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" PHP_TARGETS="php5-3 php5-4" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_2" RUBY_TARGETS="ruby18 ruby19" USERLAND="GNU" VIDEO_CARDS="nouveau" 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, LINGUAS, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON
Comment 7 Vicente Olivert Riera (RETIRED) gentoo-dev 2012-11-30 10:48:08 UTC
The patch is OK. Any arch different than x86 and x86-64 will break due to webrtc, so, the solution is to disable webrtc for those arches.

I have tested it on ppc and works fine.
Comment 8 Michael Volland 2012-11-30 12:32:18 UTC
I tested the patch on ppc64 and it works fine as well.
Comment 9 Ian Stakenvicius (RETIRED) gentoo-dev 2012-11-30 14:52:15 UTC
I've committed a change to FF-17-r1 in the tree to disable webrtc for ppc and ppc64.  If needed this can be expanded to include alpha, ia64, and arm as well.


The issue is actually not with mozilla but with webrtc upstream, as mozilla only bundles webrtc.  To get this support on ppc and others, pressure needs to be put on webrtc to finish including it (assuming webrtc is desired on these arches).
Comment 10 Jory A. Pratt gentoo-dev 2012-11-30 22:44:49 UTC
(In reply to comment #9)
> I've committed a change to FF-17-r1 in the tree to disable webrtc for ppc
> and ppc64.  If needed this can be expanded to include alpha, ia64, and arm
> as well.
> 
> 
> The issue is actually not with mozilla but with webrtc upstream, as mozilla
> only bundles webrtc.  To get this support on ppc and others, pressure needs
> to be put on webrtc to finish including it (assuming webrtc is desired on
> these arches).

This does not belong in the ebuild but rather in the mozconfig-3.eclass which is used by all mozilla product source builds.
Comment 11 Jory A. Pratt gentoo-dev 2012-11-30 22:45:00 UTC
*** Bug 445252 has been marked as a duplicate of this bug. ***
Comment 12 Xavier Miller (RETIRED) gentoo-dev 2012-12-01 17:06:40 UTC
Disabling webrtc solved the problem on armv7a and armv6j.
Comment 13 Jory A. Pratt gentoo-dev 2012-12-01 17:17:23 UTC
(In reply to comment #12)
> Disabling webrtc solved the problem on armv7a and armv6j.

I have already committed it in the mozilla overlay, I will be fixing up the tree later tonight. Which will resolve this for all mozilla products.
Comment 14 Jory A. Pratt gentoo-dev 2012-12-09 23:08:39 UTC
All eclass changes have been commit'd to tree thanks for reporting.
Comment 15 Steve Arnold archtester gentoo-dev 2012-12-26 19:08:36 UTC
Seems like it will never get tested this way so i filed a bug upstream:

https://bugzilla.mozilla.org/show_bug.cgi?id=824757

I'm not the moz.mk hacker (and I don't have time to become one right now) so if they can get their makefiles sorted out for big endian builds then maybe webrtc could be tested/used on more arches.

Here's a typedefs.h patch if anyone wants to try it.
Comment 16 Steve Arnold archtester gentoo-dev 2012-12-26 19:09:19 UTC
Created attachment 333396 [details, diff]
simple patch to add some ppc defines for webrtc
Comment 17 Ian Stakenvicius (RETIRED) gentoo-dev 2012-12-26 19:47:57 UTC
Thanks for the patches Steve -- webrtc is actually it's own project though, mozilla just embeds it.  You should file the appropriate patches upstream with them.  As far as I am aware, mozilla is not planning on making changes to webrtc directly but rather just adjusting their build system to not enable support if it's not actually supported (like what we've done here with the eclass)
Comment 18 Jory A. Pratt gentoo-dev 2012-12-27 23:58:28 UTC
There are already patches upstream in mozilla-central that address most archs for webrtc support. Please do not reinvent the wheel we can simply incorportate the patches from upstream.
Comment 19 Jory A. Pratt gentoo-dev 2012-12-28 00:00:44 UTC
refer to upstream bug for patches. I will roll a new patchset shortly for 18.0 and 17.0.1
Comment 20 Steve Arnold archtester gentoo-dev 2012-12-29 20:25:15 UTC
Okay, now that I've found more info and an upstream bug with some useful patches, there's a working-with-webrtc ebuild and patches in my overlay.  It's only tested on ppc so far (iBook G4) but it *should* support other arches (both big and little endian).  The webrtc part is optional (via USE flag) so feel free to test, etc...

https://github.com/sarnold/portage-overlay/commit/9813c9c8b10339b79a15618a41521a23c1a86e2
Comment 21 Steve Arnold archtester gentoo-dev 2012-12-29 20:30:05 UTC
Created attachment 333706 [details, diff]
updated typedefs patch

This upstream patch is much more complete than my initial ppc patch and should allow build/testing (without webrtc) on several supported arches.
Comment 22 Steve Arnold archtester gentoo-dev 2012-12-29 20:35:17 UTC
Note that some of the patches in my overlay came from the above mozilla bug, but I left out the signal processing hack from upstream and instead patched it so builds the way it was intended to build.  I figured it should at least be tested that way...
Comment 23 Jory A. Pratt gentoo-dev 2012-12-30 15:05:00 UTC
(In reply to comment #22)
> Note that some of the patches in my overlay came from the above mozilla bug,
> but I left out the signal processing hack from upstream and instead patched
> it so builds the way it was intended to build.  I figured it should at least
> be tested that way...

I am not sure I follow why you split them out into multiple patches but the concept is fine. I have just prepared the patch for 18.0b6 and running the tests now, soon as it is finished and I return I will get the 17.0 patchset bumped with same patch.
Comment 24 Jory A. Pratt gentoo-dev 2013-01-16 23:58:31 UTC
Patch is included in all builds now so everyone is happy :)