Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 585560 - www-client/firefox-47.0 fails to build on musl
Summary: www-client/firefox-47.0 fails to build on musl
Status: RESOLVED OBSOLETE
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: ARM Linux
: Normal normal (vote)
Assignee: Mozilla Gentoo Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: musl-porting
  Show dependency tree
 
Reported: 2016-06-10 22:15 UTC by Laine Gholson
Modified: 2017-07-17 01:14 UTC (History)
5 users (show)

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


Attachments
full build log bzipped (build.log.bz2,113.81 KB, application/x-bzip2)
2016-06-10 22:15 UTC, Laine Gholson
Details
Proposed fix: Define HUNSPELL_STATIC conditionally (file_585560.txt,402 bytes, patch)
2016-06-20 19:58 UTC, Johannes Rosenberger
Details | Diff
gzipped build.log (firefox-48.0-x86.log.gz,34.11 KB, application/gzip)
2016-08-13 08:51 UTC, tt_1
Details
patch from alpine (disable-moz-stackwalk.patch,668 bytes, patch)
2016-08-13 09:10 UTC, tt_1
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Laine Gholson 2016-06-10 22:15:30 UTC
Created attachment 437098 [details]
full build log bzipped

This is a regression because www-client/firefox-46.0 built fine for me. The errors are related to hunspell and makes me think that --enable-system-hunspell isn't working.

build failure:
In file included from firefox-47.0/ff/mozilla-config.h:225:0,
                 from <command-line>:0:
firefox-47.0/extensions/spellcheck/hunspell/glue/hunspell_alloc_hooks.h:54:74: error: no 'void* HunspellAllocator::CountingCalloc(size_t, size_t)' member function declared in class 'HunspellAllocator'
 #define calloc(count, size) HunspellAllocator::CountingCalloc(count, size)
                                                                          ^
firefox-47.0/extensions/spellcheck/hunspell/glue/hunspell_alloc_hooks.h:55:54: error: no 'void HunspellAllocator::CountingFree(void*)' member function declared in class 'HunspellAllocator'
 #define free(ptr) HunspellAllocator::CountingFree(ptr)
                                                      ^
Comment 1 Laine Gholson 2016-06-10 22:16:36 UTC
Portage 2.2.28 (python 3.4.3-final-0, hardened/linux/musl/arm/armv7a, gcc-4.9.3, musl-1.1.14, 4.5.5-hardened-r2 armv7l)
=================================================================
System uname: Linux-4.5.5-hardened-r2-armv7l-ARMv7_Processor_rev_3_-v7l-with-gentoo-2.2
KiB Mem:     2032764 total,    726252 free
KiB Swap:     677584 total,    638004 free
Timestamp of repository gentoo: Fri, 10 Jun 2016 00:45:01 +0000
sh dash 0.5.8.2
ld GNU ld (Gentoo 2.25.1 p1.1) 2.25.1
app-shells/bash:          4.3_p42-r1::gentoo
dev-lang/perl:            5.22.2::gentoo
dev-lang/python:          2.7.10-r1::gentoo, 3.4.3-r1::gentoo
dev-util/cmake:           3.3.1-r1::gentoo
sys-apps/baselayout:      2.2::gentoo
sys-apps/openrc:          0.21::gentoo
sys-apps/sandbox:         2.10-r99::musl
sys-devel/autoconf:       2.13::gentoo, 2.69::gentoo
sys-devel/automake:       1.14.1-r1::gentoo, 1.15-r2::gentoo
sys-devel/binutils:       2.25.1-r1::gentoo
sys-devel/gcc:            4.9.3-r99::musl
sys-devel/gcc-config:     1.7.3::gentoo
sys-devel/libtool:        2.4.6::gentoo
sys-devel/make:           4.1-r1::gentoo
sys-kernel/linux-headers: 4.5-r99::musl (virtual/os-headers)
sys-libs/musl:            1.1.14::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: webrsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: -1000

musl
    location: /var/lib/layman/musl
    sync-type: laymansync
    sync-uri: https://anongit.gentoo.org/git/proj/musl.git
    masters: gentoo
    priority: 50

custom
    location: /usr/local/portage
    masters: gentoo
    priority: 100

ACCEPT_KEYWORDS="arm"
ACCEPT_LICENSE="* -@EULA"
CBUILD="armv7a-hardfloat-linux-musleabi"
CFLAGS="-Os -pipe -mthumb -mcpu=cortex-a15 -mfpu=neon-vfpv4"
CHOST="armv7a-hardfloat-linux-musleabi"
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="-Os -pipe -mthumb -mcpu=cortex-a15 -mfpu=neon-vfpv4"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--ask --ask-enter-invalid"
FCFLAGS="-Os -pipe -mthumb -mcpu=cortex-a15 -mfpu=neon-vfpv4"
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 webrsync-gpg xattr"
FFLAGS="-Os -pipe -mthumb -mcpu=cortex-a15 -mfpu=neon-vfpv4"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
INSTALL_MASK="charset.alias"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
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 aac acl alsa apng arm armvfp bluetooth branding bzip2 cairo caps cli cracklib crypt cups curl custom-cflags cxx dbus dhcpcd directfb dri exif fbcon ffmpeg flac fontconfig fortran gif git glut gstreamer gtk gtk3 gzip hardened http2 iconv ipv6 jit jpeg libcaca lz4 lzma lzo mime modules mp3 mp4 mpeg ncurses neon nls nptl offensive ogg openal opengl openmp opus pax_kernel pcre pic png policykit raw readline sdl seccomp session snappy socks5 ssh ssl startup-notification svg tcpd theora threads tiff tinfo tpm udev udisks unicode upower v4l vdpau vorbis vpx webp wifi xattr xinerama xvmc zlib zsh-completion" 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 author" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="musl" 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="keyboard mouse synaptics evdev libinput" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="en en_US" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python3_4" PYTHON_TARGETS="python3_4 python2_7" QEMU_SOFTMMU_TARGETS="arm i386" RUBY_TARGETS="ruby20 ruby21" USERLAND="GNU" VIDEO_CARDS="tegra nouveau fbdev" XFCE_PLUGINS="battery brightness clock power trash" 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, LANG, LC_ALL, MAKEOPTS, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON
Comment 2 Felix Janda 2016-06-11 08:42:08 UTC
--enable-system-hunspell seems to be working fine. (firefox always
needs to compile some code in order to interact with (system or
non-system) hunspell.)

I would guess that your hunspell version is too old for firefox-47.
Please try upgrading hunspell to version 1.3.4.
Comment 3 Felix Janda 2016-06-11 11:58:41 UTC
Sorry, please ignore my comment 2.

Indeed, the firefox build system should not define HUNSPELL_STATIC when
the system hunspell is used. Yet, it is unconditionally defined in
extensions/spellcheck/hunspell/glue/moz.build.

Is this bug really musl specific?
Comment 4 tt_1 2016-06-15 10:46:42 UTC
Do you think you could provide your firefox useflags? I get a different build failure on amd64, so I would like to see if my error may be due to useflags. Thanks.
Comment 5 Felix Janda 2016-06-15 17:29:05 UTC
I can reproduce this bug and have the use flags:

USE="(arm) gmp-autoupdate gtk2 hardened hwaccel jemalloc3 jit system-icu system-jpeg (system-libevent) system-libvpx system-sqlite -bindist -custom-cflags -custom-optimization -dbus -debug (-neon) (-pgo) -pulseaudio (-selinux) -startup-notification (-system-cairo) -system-harfbuzz -test -wifi"

(In order to get firefox-47 built despite this bug, I manually modified
mozilla-config.h not to include the hunspell headers. But this is of
course not the way to fix this bug.)
Comment 6 tt_1 2016-06-19 19:05:23 UTC
Could you please post your patch here? I would like to test it, even though I can imagine it being more of a hack.
Comment 7 Johannes Rosenberger 2016-06-20 19:52:36 UTC
(In reply to tt_1 from comment #4)
> Do you think you could provide your firefox useflags? I get a different
> build failure on amd64, so I would like to see if my error may be due to
> useflags. Thanks.

Is this build failure connected to the google-crashpad and __NR_pread? I've got a fix for that but no time for a proper bug report at the moment. I think it should be fixed upstrem. Since it does not directly belong to this ticket, i post a link to the patch: https://gist.github.com/jorsn/89877a996dd54e1b81bcc212098a0eae
Comment 8 Johannes Rosenberger 2016-06-20 19:58:14 UTC
Created attachment 438216 [details, diff]
Proposed fix: Define HUNSPELL_STATIC conditionally

This fixes the error for me and is probably no dirty hack but could even be the correct solution. In combination with the other patch I posted the link to this makes firefox-47.0 build for me against musl on an amd64 system.

(the other patch which i don't attach here because it does not relate to *this* build failure: https://gist.github.com/jorsn/89877a996dd54e1b81bcc212098a0eae)
Comment 9 tt_1 2016-06-22 20:23:03 UTC
I can confirm that with both patches firefox emerges successfully. Can someone forward this bug to the gentoo mozilla team? I doubt that I will open a bug on the upstream bugzilla, 'cause I don't know much about the backgrounds and could not really explain anything to them in case they have questions, whatsoever.
Comment 10 Ian Stakenvicius (RETIRED) gentoo-dev 2016-06-22 20:34:11 UTC
Gentoo mozilla is CC'd already -- I'll add this to my 48.0_beta ebuild I'm publishing tomorrow, but i'll need to confirm the conditionality doesn't affect non-musl at all.
Comment 11 tt_1 2016-07-05 13:13:31 UTC
you forgot to upload the patches to the overlay, despite already having them included in the ebuild! :) when this is fixed this bug may be closed.
Comment 12 Ian Stakenvicius (RETIRED) gentoo-dev 2016-07-05 15:39:04 UTC
(In reply to tt_1 from comment #11)
> you forgot to upload the patches to the overlay, despite already having them
> included in the ebuild! :) when this is fixed this bug may be closed.

Patches added.

My fault, i wasn't trying to push those patches in the ebuild in that commit, since the commit in question was just supposed to be for the LINGUAS->L10N migration.  Leaving bug open until all can be confirmed well and good, and patches have made it into the gentoo repo.
Comment 13 Ian Stakenvicius (RETIRED) gentoo-dev 2016-08-08 18:17:28 UTC
How does firefox-48.0 do?  If we're good, I'd like to close this bug.
Comment 14 tt_1 2016-08-09 05:33:42 UTC
I will do some testing this week. 

There is a thunderbird 47 beta on the mozilla ftp server, do you know if that means there is going to be a release of a thunderbird 47.0 in the future?
Comment 15 Ian Stakenvicius (RETIRED) gentoo-dev 2016-08-09 06:13:47 UTC
(In reply to tt_1 from comment #14)
> I will do some testing this week. 

Thanks!

> 
> There is a thunderbird 47 beta on the mozilla ftp server, do you know if
> that means there is going to be a release of a thunderbird 47.0 in the
> future?

No.  Thunderbird group tries to keep up with the changes in Firefox by rolling beta versions as each new Firefox is released, but they only ever do full releases on the ESR codebases; next one is 52 I think.
Comment 16 tt_1 2016-08-13 08:51:47 UTC
Created attachment 443218 [details]
gzipped build.log

firefox-48.0 passes on amd64 but fails on x86 with the following error


[01m[K/var/tmp/portage/www-client/firefox-48.0/work/firefox-48.0/mozglue/misc/StackWalk.cpp:938:4:[m[K [01;31m[Kerror: [m[K#error Unsupported configuration
 #  error Unsupported configuration

the full build log is attached
Comment 17 tt_1 2016-08-13 09:10:06 UTC
Created attachment 443220 [details, diff]
patch from alpine

alpine has a patch which fixes the compile error

bug #583266 is not yet solved on x86, it prevents debug builds. anyone feels comfortable with backporting the two pull request into gcc-4.9.3::musl or ::gentoo? 

#559784 and #559788 are no compile errors