Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 475754 - www-client/firefox with sys-libs/uclibc - ?
Summary: www-client/firefox with sys-libs/uclibc - ?
Status: RESOLVED OBSOLETE
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Anthony Basile
URL:
Whiteboard:
Keywords: PATCH
: 506878 (view as bug list)
Depends on: 591586
Blocks: uclibc-porting
  Show dependency tree
 
Reported: 2013-07-04 17:27 UTC by Amadeusz Sławiński
Modified: 2017-08-26 17:55 UTC (History)
4 users (show)

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


Attachments
firefox uclibc patch (firefox-17.0.7_uclibc.patch,4.39 KB, patch)
2013-07-04 17:28 UTC, Amadeusz Sławiński
Details | Diff
firefox-22 uclibc patch (firefox-22.0_uclibc.patch,4.30 KB, patch)
2013-07-20 11:29 UTC, Amadeusz Sławiński
Details | Diff
fake stab.h (stab.h,3.66 KB, text/x-c)
2013-07-20 11:30 UTC, Amadeusz Sławiński
Details
strace of firefox-22 failing to start (strace.txt.gz,42.37 KB, application/gzip)
2013-07-20 11:31 UTC, Amadeusz Sławiński
Details
gdb backtrace (gdb.txt,7.13 KB, text/plain)
2013-07-20 11:33 UTC, Amadeusz Sławiński
Details
firefox-31.6-uclibc-wip.patch (firefox-31.6-uclibc-wip.patch,31.24 KB, patch)
2015-08-23 18:19 UTC, René Rhéaume
Details | Diff
firefox-38.1.1-uclibc-wip0.patch (firefox-38.1.1-uclibc-wip0.patch,30.13 KB, patch)
2015-08-26 11:33 UTC, René Rhéaume
Details | Diff
firefox-38.8-uclibc.patch (firefox-38.8-uclibc-wip0.patch,30.74 KB, patch)
2016-07-04 10:55 UTC, René Rhéaume
Details | Diff
firefox-38.8.ebuild.patch (firefox-38.8.0.ebuild.patch,481 bytes, patch)
2016-07-04 11:00 UTC, René Rhéaume
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Amadeusz Sławiński 2013-07-04 17:27:35 UTC
[ebuild   R    ] www-client/firefox-17.0.7  USE="alsa dbus gstreamer libnotify minimal system-sqlite -bindist -custom-cflags -custom-optimization -debug -jit (-pgo) (-selinux) -startup-notification -wifi" LINGUAS="en_GB pl -af -ak -ar -as -ast -be -bg -bn_BD -bn_IN -br -bs -ca -cs -csb -cy -da -de -el -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 -ku -lg -lt -lv -mai -mk -ml -mr -nb_NO -nl -nn_NO -nso -or -pa_IN -pt_BR -pt_PT -rm -ro -ru -si -sk -sl -son -sq -sr -sv_SE -ta -ta_LK -te -th -tr -uk -vi -zh_CN -zh_TW -zu" 0 kB


It fails due to fact that some stuff is defined bit differently or missing on uclibc systems.

I've made a patch which allows firefox to build on my system

Similar patches, found on the internet:
http://patchwork.ozlabs.org/patch/181877/
http://repository.timesys.com/buildsources/f/firefox/firefox-14.0.1/firefox-14.0.1-uclibc.patch

Some stuff is also already reported upstream (also search for uclibc to see few others):
https://bugzilla.mozilla.org/show_bug.cgi?id=880206
https://bugzilla.mozilla.org/show_bug.cgi?id=880209
https://bugzilla.mozilla.org/show_bug.cgi?id=880213

there should probably be checks to see if execinfo.h is on the system (afaik there is setting in uclibc for that)

not found in the above patches is:
xpcom/io/nsLocalFileUnix.cpp
uses dqb_curspace in struct, while uclibc uses dqb_curblocks

media/webrtc/trunk/src/system_wrappers/source/sort.cc
needs #define NO_STL otherwise it includes "spreadsort.hpp" which has some weird getchar() with two arguments at which it fails


There is still one problem to be solved:
% firefox
XPCOMGlueLoad error for file /usr/lib/firefox/libxpcom.so:
File not found
Couldn't load XPCOM.

I need to run it as
LD_LIBRARY_PATH="/usr/lib/firefox" firefox
so it starts

Reproducible: Always
Comment 1 Amadeusz Sławiński 2013-07-04 17:28:02 UTC
Created attachment 352614 [details, diff]
firefox uclibc patch
Comment 2 Amadeusz Sławiński 2013-07-20 11:29:22 UTC
Created attachment 353708 [details, diff]
firefox-22 uclibc patch

So after moving my system to ~arch I started looking into firefox-22, the patch looks practically the same, but it seems like there are some more things needed to be done,

It fails at
/var/tmp/portage/www-client/firefox-22.0/work/mozilla-release/toolkit/crashreporter/google-breakpad/src/common/stabs_reader.cc
due to missing stab.h (I created fake one)

Then it builds. Similarly to 17.0.7 I need to start it with LD_LIBRARY_PATH="/usr/lib/firefox" firefox so it finds libraries, but it fails with segmantation fault.
Comment 3 Amadeusz Sławiński 2013-07-20 11:30:14 UTC
Created attachment 353710 [details]
fake stab.h
Comment 4 Amadeusz Sławiński 2013-07-20 11:31:47 UTC
Created attachment 353712 [details]
strace of firefox-22 failing to start
Comment 5 Amadeusz Sławiński 2013-07-20 11:33:24 UTC
Created attachment 353714 [details]
gdb backtrace

Does not that useful but it says that failure is at memset()
Comment 6 Amadeusz Sławiński 2013-07-21 11:13:24 UTC
So after looking at ebuilds I noticed that firefox-22 enables this:
mozconfig_annotate '' --enable-jemalloc
mozconfig_annotate '' --enable-replace-malloc

When I commented it out and rebuild, firefox starts.

There are few usability glitches though,
* when dragging tabs it only does drag the title, not whole tab, and doesn't move them on drop (mouse release)
* Location bar doesn't seem to send events correctly (ie. 'return key', paste and go, clicking 'Go to the address in Location Bar' does not start opening page as expected)
Comment 7 Jeroen Roovers (RETIRED) gentoo-dev 2014-04-06 14:31:50 UTC
*** Bug 506878 has been marked as a duplicate of this bug. ***
Comment 8 Anthony Basile gentoo-dev 2014-04-06 14:34:40 UTC
@mozilla team.  Would you consider adding these patches (or the ones from bug #506878 whichever you feel are more sane) to mozilla's ebuild contingent on `if use uclibc` ??
Comment 9 René Rhéaume 2015-08-23 18:17:47 UTC
I tried again with the Firefox ESR 31.x series (after my success with the ESR 24.x series, see bug 506878). However I am stuck with some obscure error involving C++ destructors.

This is the error output I get from ./mach build:

154:34.58 ../../crashreporter/google-breakpad/src/common/dump_symbols.o: In function `bool (anonymous namespace)::LoadSymbols<google_breakpad::ElfClass32>(std::string const&, bool, google_breakpad::ElfClass32::Ehdr const*, bool, (anonymous namespace)::LoadSymbolsInfo<google_breakpad::ElfClass32>*, SymbolData, google_breakpad::Module*)':
154:34.58 dump_symbols.cc:(.text+0xe56): undefined reference to `vtable for google_breakpad::StabsToModule'
154:34.58 /usr/lib/gcc/x86_64-gentoo-linux-uclibc/4.8.4/../../../../x86_64-gentoo-linux-uclibc/bin/ld: ../../crashreporter/google-breakpad/src/common/dump_symbols.o: relocation R_X86_64_PC32 against undefined hidden symbol `_ZTVN15google_breakpad13StabsToModuleE' can not be used when making a shared object
154:34.58 /usr/lib/gcc/x86_64-gentoo-linux-uclibc/4.8.4/../../../../x86_64-gentoo-linux-uclibc/bin/ld: final link failed: Bad value
154:34.58 collect2: error: ld returned 1 exit status
154:34.59 /var/tmp/portage/www-client/firefox-31.6.0/work/mozilla-esr31-uclibc/config/rules.mk:882: recipe for target 'libxul.so' failed
154:34.59 gmake[5]: *** [libxul.so] Error 1
154:34.59 /var/tmp/portage/www-client/firefox-31.6.0/work/mozilla-esr31-uclibc/config/recurse.mk:95: recipe for target 'toolkit/library/build/libs' failed
154:34.59 gmake[4]: *** [toolkit/library/build/libs] Error 2
154:34.59 /var/tmp/portage/www-client/firefox-31.6.0/work/mozilla-esr31-uclibc/config/recurse.mk:39: recipe for target 'libs' failed
154:34.59 gmake[3]: *** [libs] Error 2
154:34.59 /var/tmp/portage/www-client/firefox-31.6.0/work/mozilla-esr31-uclibc/config/rules.mk:592: recipe for target 'default' failed
154:34.59 gmake[2]: *** [default] Error 2
154:34.59 /var/tmp/portage/www-client/firefox-31.6.0/work/mozilla-esr31-uclibc/client.mk:381: recipe for target 'realbuild' failed
154:34.59 gmake[1]: *** [realbuild] Error 2
154:34.59 client.mk:168: recipe for target 'build' failed
154:34.59 gmake: *** [build] Error 2
154:34.62 374 compiler warnings present.

I will attach the patch of my work in progress.
Comment 10 René Rhéaume 2015-08-23 18:19:22 UTC
Created attachment 409958 [details, diff]
firefox-31.6-uclibc-wip.patch
Comment 11 Jory A. Pratt gentoo-dev 2015-08-23 20:25:41 UTC
(In reply to René Rhéaume from comment #10)
> Created attachment 409958 [details, diff] [details, diff]
> firefox-31.6-uclibc-wip.patch

isnt support in gentoo any longer, please move on to 38.x or ~arch which is where the work needs to be done to start with please.
Comment 12 René Rhéaume 2015-08-26 11:33:42 UTC
Created attachment 410320 [details, diff]
firefox-38.1.1-uclibc-wip0.patch

WIP Patch updated for Firefox 38.1.1 . I got to the same point as with 31.6
Comment 13 Anthony Basile gentoo-dev 2015-08-29 13:29:54 UTC
(In reply to René Rhéaume from comment #12)
> Created attachment 410320 [details, diff] [details, diff]
> firefox-38.1.1-uclibc-wip0.patch
> 
> WIP Patch updated for Firefox 38.1.1 . I got to the same point as with 31.6

Rene, I haven't tested yet, but does this get a full build?
Comment 14 René Rhéaume 2015-08-29 20:44:30 UTC
(In reply to Anthony Basile from comment #13)
> (In reply to René Rhéaume from comment #12)
> > Created attachment 410320 [details, diff] [details, diff] [details, diff]
> > firefox-38.1.1-uclibc-wip0.patch
> > 
> > WIP Patch updated for Firefox 38.1.1 . I got to the same point as with 31.6
> 
> Rene, I haven't tested yet, but does this get a full build?

No, I got the same error as shown on comment #9
Comment 15 René Rhéaume 2016-07-04 10:55:45 UTC
Created attachment 439670 [details, diff]
firefox-38.8-uclibc.patch

I finally managed to get Firefox 38.8 working on uclibc. I had to disable to disable profiling and SVG for it, but would like to enable them back (I disabled nothing in Firefox 24 to get it working)
Comment 16 René Rhéaume 2016-07-04 11:00:33 UTC
Created attachment 439672 [details, diff]
firefox-38.8.ebuild.patch
Comment 17 René Rhéaume 2016-07-04 11:03:52 UTC
(In reply to René Rhéaume from comment #15)
> Created attachment 439670 [details, diff] [details, diff]
> firefox-38.8-uclibc.patch
> 
> I finally managed to get Firefox 38.8 working on uclibc. I had to disable to
> disable profiling and SVG for it, but would like to enable them back (I
> disabled nothing in Firefox 24 to get it working)

Never mind about disabled features, that was for the interim 38.1.1 version. Nothing more is disabled for 38.8 on uclibc. Woohoo!
Comment 18 tt_1 2016-08-22 19:06:12 UTC
which useflags have you used for firefox-38.8.0? system-icu doesn't seem to work for me because of #591586
Comment 19 René Rhéaume 2016-10-02 21:54:50 UTC
(In reply to tt_1 from comment #18)
> which useflags have you used for firefox-38.8.0? system-icu doesn't seem to
> work for me because of #591586

% emerge -1pv '=www-client/firefox-38.8.0'

These are the packages that would be merged, in order:

Calculating dependencies  ...... done!
[ebuild   R    ] www-client/firefox-38.8.0::repzilon  USE="bindist -custom-cflags -custom-optimization dbus -debug -egl gmp-autoupdate -gstreamer -gstreamer-0 hardened jemalloc3 -jit minimal (-neon) (-pgo) -pulseaudio (-selinux) startup-notification (-system-cairo) system-icu system-jpeg system-libvpx system-sqlite {test} -wifi" LINGUAS="-af -ar -as -ast -be -bg -bn_BD -bn_IN -br -bs -ca -cs -cy -da -de -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" 0 KiB

I am not yet on the current version of icu right now and haven't tried to update it.
Comment 20 tt_1 2016-10-03 08:18:17 UTC
And what is your version of icu?
Comment 21 René Rhéaume 2016-10-06 17:10:44 UTC
(In reply to tt_1 from comment #20)
> And what is your version of icu?

I thought I was on an older version of icu, but I am using icu version 57. However, I have not  migrated to uclibc-ng yet. Thus, I do not hit your bug.
Comment 22 Jory A. Pratt gentoo-dev 2017-08-26 17:55:22 UTC
If you feel I have closed your bug and it is still a current issue, please reopen and update it completely. We will not work bugs that have no ebuild in tree any longer or can not be reproduced with a current system.

Thank You for your support and understanding
The Mozilla Team