Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 570474

Summary: www-client/firefox-43.0 fails to build on musl-amd64 due to missing stab.h
Product: Gentoo Linux Reporter: tt_1 <herrtimson>
Component: [OLD] UnspecifiedAssignee: Mozilla Gentoo Team <mozilla>
Status: RESOLVED FIXED    
Severity: normal CC: blueness, musl
Priority: Normal Keywords: InOverlay
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on: 570480    
Bug Blocks: 430702    
Attachments: output of emerge --info
compressed build.log
compressed build.log

Description tt_1 2016-01-01 11:17:42 UTC
Created attachment 421436 [details]
output of emerge --info

output of emerge -pqv '=www-client/firefox-43.0::gentoo' 

[ebuild     U] www-client/firefox-43.0 [42.0-r99] USE="dbus gstreamer hwaccel%* jemalloc3 jit minimal system-cairo system-icu system-jpeg system-libvpx system-sqlite -bindist -custom-cflags -custom-optimization -debug -egl -gmp-autoupdate -gstreamer-0 -gtk3 (-hardened) (-neon) (-pgo) -pulseaudio (-selinux) -startup-notification {-test} -wifi" LINGUAS="de -af -ar -as -ast -be -bg -bn_BD -bn_IN -br -bs -ca -cs -cy -da -el -en_GB -en_ZA -eo -es_AR -es_CL -es_ES -es_MX -et -eu -fa -fi -fr -fy_NL -ga_IE -gd -gl -gu_IN -he -hi_IN -hr -hu -hy_AM -id -is -it -ja -kk -km -kn -ko -lt -lv -mai -mk -ml -mr -nb_NO -nl -nn_NO -or -pa_IN -pl -pt_BR -pt_PT -rm -ro -ru -si -sk -sl -son -sq -sr -sv_SE -ta -te -th -tr -uk -vi -xh -zh_CN -zh_TW"

emerge --info is attached
Comment 1 tt_1 2016-01-01 11:19:19 UTC
Created attachment 421438 [details]
compressed build.log

the compilation ends at this point where there is a missing of stab.h 

In file included from /var/tmp/portage/www-client/firefox-43.0/work/firefox-43.0/ff/toolkit/crashreporter/google-breakpad/src/common/Unified_cpp_src_common0.cpp:137:0:
/var/tmp/portage/www-client/firefox-43.0/work/firefox-43.0/toolkit/crashreporter/google-breakpad/src/common/stabs_reader.cc:37:18: fatal error: stab.h: No such file or directory
 #include <stab.h>
                  ^
compilation terminated.
Comment 2 Felix Janda 2016-01-01 12:15:22 UTC
Alpine linux includes the file stab.h:

http://git.alpinelinux.org/cgit/aports/plain/testing/firefox/stab.h

It is also possible to patch in the few necessary defines:

https://github.com/lluixhi/musl-extras/blob/master/www-client/firefox/files/remove-stabs.patch
Comment 3 tt_1 2016-01-01 13:58:12 UTC
Created attachment 421486 [details]
compressed build.log

I tested the remove-stab-h.patch with epatch_user, but it still fails. full log is attached, most important part is obviously 

In file included from /var/tmp/portage/www-client/firefox-43.0/work/firefox-43.0/ff/xpcom/base/Unified_cpp_xpcom_base1.cpp:20:0:
/var/tmp/portage/www-client/firefox-43.0/work/firefox-43.0/xpcom/base/nsMemoryReporterManager.cpp: In function 'nsresult SystemHeapSize(int64_t*)':
/var/tmp/portage/www-client/firefox-43.0/work/firefox-43.0/xpcom/base/nsMemoryReporterManager.cpp:183:21: error: variable 'SystemHeapSize(int64_t*)::mallinfo info' has initializer but incomplete type
     struct mallinfo info = mallinfo();
                     ^
/var/tmp/portage/www-client/firefox-43.0/work/firefox-43.0/xpcom/base/nsMemoryReporterManager.cpp:183:37: error: invalid use of incomplete type 'struct SystemHeapSize(int64_t*)::mallinfo'
     struct mallinfo info = mallinfo();
                                     ^
/var/tmp/portage/www-client/firefox-43.0/work/firefox-43.0/xpcom/base/nsMemoryReporterManager.cpp:183:12: error: forward declaration of 'struct SystemHeapSize(int64_t*)::mallinfo'
     struct mallinfo info = mallinfo();
            ^
/var/tmp/portage/www-client/firefox-43.0/work/firefox-43.0/config/rules.mk:958: recipe for target 'Unified_cpp_xpcom_base1.o' failed
Comment 4 tt_1 2016-01-01 14:31:22 UTC
is this eventually related to gentoo bug #570480 and therefore solved by the provided patch over there?
Comment 5 Jory A. Pratt gentoo-dev 2016-01-01 15:54:37 UTC
var/tmp/portage/www-client/firefox-43.0/work/firefox-43.0/xpcom/base/nsMemoryReporterManager.cpp: In function 'nsresult SystemHeapSize(int64_t*)':
/var/tmp/portage/www-client/firefox-43.0/work/firefox-43.0/xpcom/base/nsMemoryReporterManager.cpp:183:21: error: variable 'SystemHeapSize(int64_t*)::mallinfo info' has initializer but incomplete type
     struct mallinfo info = mallinfo();
                     ^
/var/tmp/portage/www-client/firefox-43.0/work/firefox-43.0/xpcom/base/nsMemoryReporterManager.cpp:183:37: error: invalid use of incomplete type 'struct SystemHeapSize(int64_t*)::mallinfo'
     struct mallinfo info = mallinfo();
                                     ^
/var/tmp/portage/www-client/firefox-43.0/work/firefox-43.0/xpcom/base/nsMemoryReporterManager.cpp:183:12: error: forward declaration of 'struct SystemHeapSize(int64_t*)::mallinfo'
     struct mallinfo info = mallinfo();

Straight from your log, you getting hit by same bug felix has done fixed and reported upstream.
Comment 6 tt_1 2016-01-01 16:28:19 UTC
If the linked remove-stabs.patch is to your liking please do include it in the tarball, as well as the patch sent upstream by Felix. They are fixing compilation for musl. 

There is actually a third issue with compilation, me or Felix will open a new bug for that.
Comment 7 Jory A. Pratt gentoo-dev 2016-01-01 17:22:50 UTC
I have added both patches to the firefox-44.0_beta4 in mozilla overlay. We are concentrating on the upcoming esr release so these will not be backported for 43.x please use mozilla overlay.