Tiny Core Extensions > TCE Q&A Forum

[Solved] Firefox-ESR won't start after packing - Couldn't load XPCOM.

(1/2) > >>

polikuo:
Hi all
I managed to compile Firefox 91.7.0 ESR on aarch64
However, I'm encountering a weird phenomenon that need fixing before mailing it.  :-\
I'm testing out distcc and have successfully compiled a working result. (I'm posting from this build right now)

After the installation, everything works. (sudo MACH_USE_SYSTEM_PYTHON=1 time ./mach install)
Then I pack it up in a tcz (with/without .desktop and icons)
Remove the files in the system (sudo rm -fr /usr/local/lib/firefox)
tce-load the package and this is what I get


--- Code: ---tc@pi3:/mnt/sda1/firefox-91.7.0$ firefox
Couldn't load XPCOM.

--- End code ---

I've tried copy mode, rebooting, replacing with tar command and more.
No matter what do, it won't start.

The only solution is to rerun the installation command above.
Firefox will start again like it normally would.

The combo of touch files as time mark and finding newer files report nothing interesting
They are the same file list you see in the repo build.

I'm suspecting notify-send might be responsible, but I have no clue what it is / how to use it.


--- Code: ---tc@pi3:/mnt/sda1/firefox-91.7.0$ sudo MACH_USE_SYSTEM_PYTHON=1 time ./mach install
 0:07.84 /usr/local/bin/make -C . -j4 -s -w install
 0:08.62 make: Entering directory '/mnt/sda1/firefox-91.7.0/firefox-build-dir'
 0:08.66 make[1]: Entering directory '/mnt/sda1/firefox-91.7.0/firefox-build-dir/browser/installer'
 1:20.20 make[1]: Leaving directory '/mnt/sda1/firefox-91.7.0/firefox-build-dir/browser/installer'
 1:20.22 make: Leaving directory '/mnt/sda1/firefox-91.7.0/firefox-build-dir'
 1:20.22 /usr/local/bin/notify-send --app-name=Mozilla Build System Mozilla Build System Install complete
real    1m 27.16s
user    0m 37.03s
sys     0m 17.05s

--- End code ---

polikuo:
Okay, I see the problem...
It appears that the time stamp of some files are preserved when installing
Therefore, the "find -newer" method won't work.
Some files are left behind with this strategy.
The solution is rather simple.
The mach build system supports "DESTDIR" variable.

--- Code: ---DESTDIR=/tmp/packing-firefox MACH_USE_SYSTEM_PYTHON=1./mach install
--- End code ---

P.S. I just wanna say, using pi4+pi3 with distcc is not really helping.
pi3 is too slow for pi4 from my observation
Most of the time, pi4 gives up waiting for pi3 and build locally.
It took me 7hr+ to build  :P
I'm considering rebuild the whole thing with LTO to see if it shrink the size.
BTW, I've found a better configuration (some flags here and there) that slightly shrink the overall size.
I'll send my "mozconfig" when things got sorted.

--- Code: ---tc@pi4:~$ du -bh /mnt/mmcblk0p2/tce/optional/firefox.tcz
72.9M   /mnt/mmcblk0p2/tce/optional/firefox.tcz

--- End code ---

This post can be marked solved

Rich:
Hi polikuo
You beat me to it. I was getting ready to suggest searching for  xpcom  under /usr after installation.

Marked as solved.  :)

polikuo:
Hi
Just some follow up
It took me a while to figure out how to do cross language LTO on firefox
For some unknown reason, the libpng provided by the repo is not compatible in this mode.
I had to use the libpng provided by the firefox source code. (disable --with-system-png)
This increase the size of libxul.so by ~20MB

Personally, I believe the performance has been improved.
I don't feel any lag on pi4.
I think I'll mail this build as well, as a different extension.
How should I name this build ?
My ideas are firefox-cross-lang.tcz or firefox-llvm.tcz or firefox-lto.tcz ...
Any suggestions ?

Size comparison between the builds

--- Code: ---4.0K    cross-lang-lto/usr/local/lib/firefox/application.ini                    4.0K    distcc/usr/local/lib/firefox/application.ini
744K    cross-lang-lto/usr/local/lib/firefox/browser/features                   744K    distcc/usr/local/lib/firefox/browser/features
44K     cross-lang-lto/usr/local/lib/firefox/browser/chrome/icons/default       44K     distcc/usr/local/lib/firefox/browser/chrome/icons/default
44K     cross-lang-lto/usr/local/lib/firefox/browser/chrome/icons               44K     distcc/usr/local/lib/firefox/browser/chrome/icons
44K     cross-lang-lto/usr/local/lib/firefox/browser/chrome                     44K     distcc/usr/local/lib/firefox/browser/chrome
41M     cross-lang-lto/usr/local/lib/firefox/browser                            41M     distcc/usr/local/lib/firefox/browser
4.0K    cross-lang-lto/usr/local/lib/firefox/defaults/pref                      4.0K    distcc/usr/local/lib/firefox/defaults/pref
4.0K    cross-lang-lto/usr/local/lib/firefox/defaults                           4.0K    distcc/usr/local/lib/firefox/defaults
4.0K    cross-lang-lto/usr/local/lib/firefox/dependentlibs.list                 4.0K    distcc/usr/local/lib/firefox/dependentlibs.list
392K    cross-lang-lto/usr/local/lib/firefox/firefox                            540K    distcc/usr/local/lib/firefox/firefox
392K    cross-lang-lto/usr/local/lib/firefox/firefox-bin                        540K    distcc/usr/local/lib/firefox/firefox-bin
1.4M    cross-lang-lto/usr/local/lib/firefox/fonts                              1.4M    distcc/usr/local/lib/firefox/fonts
56K     cross-lang-lto/usr/local/lib/firefox/gmp-clearkey/0.1                   72K     distcc/usr/local/lib/firefox/gmp-clearkey/0.1
56K     cross-lang-lto/usr/local/lib/firefox/gmp-clearkey                       72K     distcc/usr/local/lib/firefox/gmp-clearkey
32K     cross-lang-lto/usr/local/lib/firefox/liblgpllibs.so                     36K     distcc/usr/local/lib/firefox/liblgpllibs.so
248K    cross-lang-lto/usr/local/lib/firefox/libmozavcodec.so                   248K    distcc/usr/local/lib/firefox/libmozavcodec.so
196K    cross-lang-lto/usr/local/lib/firefox/libmozavutil.so                    204K    distcc/usr/local/lib/firefox/libmozavutil.so
8.0K    cross-lang-lto/usr/local/lib/firefox/libmozgtk.so                       8.0K    distcc/usr/local/lib/firefox/libmozgtk.so
84K     cross-lang-lto/usr/local/lib/firefox/libmozsandbox.so                   120K    distcc/usr/local/lib/firefox/libmozsandbox.so
832K    cross-lang-lto/usr/local/lib/firefox/libmozsqlite3.so                   844K    distcc/usr/local/lib/firefox/libmozsqlite3.so
12K     cross-lang-lto/usr/local/lib/firefox/libmozwayland.so                   16K     distcc/usr/local/lib/firefox/libmozwayland.so
114M    cross-lang-lto/usr/local/lib/firefox/libxul.so                          92M     distcc/usr/local/lib/firefox/libxul.so
28M     cross-lang-lto/usr/local/lib/firefox/omni.ja                            28M     distcc/usr/local/lib/firefox/omni.ja
392K    cross-lang-lto/usr/local/lib/firefox/pingsender                         540K    distcc/usr/local/lib/firefox/pingsender
4.0K    cross-lang-lto/usr/local/lib/firefox/platform.ini                       4.0K    distcc/usr/local/lib/firefox/platform.ini
388K    cross-lang-lto/usr/local/lib/firefox/plugin-container                   532K    distcc/usr/local/lib/firefox/plugin-container
0       cross-lang-lto/usr/local/lib/firefox/removed-files                      0       distcc/usr/local/lib/firefox/removed-files

--- End code ---

P.S. Hey paul
Do you mind if I take over libpng ?
That is, if I actually find a solution...

Juanito:
You need  to patch libpng for it to work with firefox and some other browsers - see blfs for the patch.

Navigation

[0] Message Index

[#] Next page

Go to full version