Mach packaging error message

Support and discussions for the x86/x64 Linux version of Pale Moon.

Moderator: trava90

Post Reply
User avatar
__tch
Apollo supporter
Apollo supporter
Posts: 30
Joined: 2019-05-05, 09:35

Mach packaging error message

Post by __tch » 2019-12-06, 14:24

What does this error message mean and how can i solve it?
Error while running startup cache precompilation
It's Linux/ARMHF, GCC-7 and Python 2.7.

User avatar
adesh
Keeps coming back
Keeps coming back
Posts: 951
Joined: 2017-06-06, 07:38

Re: Mach packaging error message

Post by adesh » 2019-12-06, 15:52

No idea. It'd be helpful if you tell the exact command you are running and post your mozconfig and some of the relevant build output.

Walter Dnes
Astronaut
Astronaut
Posts: 628
Joined: 2015-07-30, 20:29
Location: Vaughan, ON, Canada

Re: Mach packaging error message

Post by Walter Dnes » 2019-12-06, 15:58

You can solve it by including --disable-precompiled-startupcache in your mozconfig. Note; the first startup after install or upgrade will be slower, because it has to pre-populate the startupcache at first launch.

Why it happens... By default, the final compiled code is run on the build host to pre-populate the startupcache at the end of the build process. If the compiled code can't run on the build host (e.g. different architecture), you get the error. E.g. if you build ARM code on an Intel machine, the ARM code is not going to run on the Intel CPU.
There's a right way
There's a wrong way
And then there's my way

User avatar
New Tobin Paradigm
Off-Topic Sheriff
Off-Topic Sheriff
Posts: 7203
Joined: 2012-10-09, 19:37
Location: Insulting you on the internet.

Re: Mach packaging error message

Post by New Tobin Paradigm » 2019-12-06, 15:59

Some versions of linux and Bullshit System Distributions don't play well with the precompilation of startup cache either.
Image
I'll send him cheesy movies! The worst I can find!
He'll have to sit and watch them all and we'll monitor his mind!

https://binaryoutcast.com/ | Freenode #binaryoutcast | http://thereisonlyxul.org/

User avatar
__tch
Apollo supporter
Apollo supporter
Posts: 30
Joined: 2019-05-05, 09:35

Re: Mach packaging error message

Post by __tch » 2019-12-06, 18:35

@adesh:
The command is just

Code: Select all

./mach build && ./mach package
and the config is

Code: Select all

#mk_add_options AUTOCLOBBER=1
mk_add_options MOZ_MAKE_FLAGS="-j3"
ac_add_options --enable-default-toolkit=cairo-gtk2
ac_add_options --enable-alsa
ac_add_options --disable-pulseaudio
#ac_add_options --enable-optimize=-O2
ac_add_options --enable-strip
ac_add_options --disable-debug
ac_add_options --enable-release
ac_add_options --disable-sync
ac_add_options --disable-verify-mar
ac_add_options --disable-updater
ac_add_options --disable-crashreporter
ac_add_options --disable-maintenance-service
ac_add_options --disable-tests
ac_add_options --disable-ipdl-tests
Edit: The build finished without errors, only the packaging dies, so nothing to include from the build output. Here are the relevant lines from the packaging output:

Code: Select all

 0:07.76 resource://gre/components/PageThumbsProtocol.js
 0:08.77 Traceback (most recent call last):
 0:08.77   File "/mnt/UXP/toolkit/mozapps/installer/packager.py", line 416, in <module>
 0:08.77     main()
 0:08.77   File "/mnt/UXP/toolkit/mozapps/installer/packager.py", line 410, in main
 0:08.78     args.source, gre_path, base)
 0:08.78   File "/mnt/UXP/toolkit/mozapps/installer/packager.py", line 166, in precompile_cache
 0:08.78     errors.fatal('Error while running startup cache precompilation')
 0:08.78   File "/mnt/UXP/python/mozbuild/mozpack/errors.py", line 103, in fatal
 0:08.79     self._handle(self.FATAL, msg)
 0:08.79   File "/mnt/UXP/python/mozbuild/mozpack/errors.py", line 98, in _handle
 0:08.79     raise ErrorMessage(msg)
 0:08.79 mozpack.errors.ErrorMessage: Error: Error while running startup cache precompilation
 0:08.87 /mnt/UXP/toolkit/mozapps/installer/packager.mk:41: recipe for target 'stage-package' failed
@Walter Dnes:
Thank you. The change in config means, that i have to recompile it from the start?
As for the different archs, i compile this on the same machine i want to run it. (Orange Pi PC Plus with Armbian 5.30)

Walter Dnes
Astronaut
Astronaut
Posts: 628
Joined: 2015-07-30, 20:29
Location: Vaughan, ON, Canada

Re: Mach packaging error message

Post by Walter Dnes » 2019-12-06, 19:15

__tch wrote:
2019-12-06, 18:35
@Walter Dnes:
Thank you. The change in config means, that i have to recompile it from the start?
As for the different archs, i compile this on the same machine i want to run it. (Orange Pi PC Plus with Armbian 5.30)
If you're compiling on the same architecture, then my guess to the problem source is wrong. Having said that, adding...

ac_add_options --disable-precompiled-startupcache

...to your mozconfig will skip the startupcache precompile stage where it dies. It's a temporary kludge, not a real fix to the root of the problem. Hopefully someone else can diagnose the problem. I don't know the answer to the rebuild-from-scratch question.
There's a right way
There's a wrong way
And then there's my way

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 26673
Joined: 2011-08-28, 17:27
Location: 58°2'16"N 14°58'31"E
Contact:

Re: Mach packaging error message

Post by Moonchild » 2019-12-06, 19:42

I think you might be able to just start the package stage again without rebuilding, but I'm not 100% sure. If it fails again then you'll have to restart.

As for why it fails, that's an elusive problem we've run into on some systems and configurations. Our support for ARM environments is experimental. Since the environment for precompiling the startup cache and actually compiling JS modules in a fully-initialized browser are significantly different, there's no guarantee that it will always work in the former. If it doesn't, then your only recourse for the moment is to simply not precompile the startup cache, which, as explained before, will only have a drawback on the first start after installation or upgrade of the browser. There's no functional drawback otherwise in the browser.
"There will be times when the position you advocate, no matter how well framed and supported, will not be accepted by the public simply because you are who you are." -- Merrill Rose
Image

User avatar
__tch
Apollo supporter
Apollo supporter
Posts: 30
Joined: 2019-05-05, 09:35

Re: Mach packaging error message

Post by __tch » 2019-12-06, 20:47

@Walter Dnes:
I see, thank you. I can live with this.

@Moonchild:
Well, i think i just recompile it anyway, because this was just a fast test-compile without the -O2 flag, that if it can compile. The answer was positive, so it's time to build it properly anyway. I hope with the new option, packaging also will be done now. Thanks for the explanation.

User avatar
stevepusser
Astronaut
Astronaut
Posts: 598
Joined: 2015-08-01, 18:33
Location: California

Re: Mach packaging error message

Post by stevepusser » 2019-12-09, 01:15

Hmmm--you may be able to cross-compile a compatible armhf/arm64 version on a much faster x86 machine using sbuild in Debian or a derivative distro. I have it set up, but never had had to use it yet.

I know the openSUSE Build Service also supports armhf and arm64 package builds for Debian 9, 10, testing, and unstable. I've built a few packages with it, such as qmplay2: https://build.opensuse.org/package/show ... mplay2-qt5

User avatar
stevepusser
Astronaut
Astronaut
Posts: 598
Joined: 2015-08-01, 18:33
Location: California

Re: Mach packaging error message

Post by stevepusser » 2019-12-10, 04:50

Are you using an Ubuntu or Debian version of Armbian? The docs I can find about the distro seem to indicate that the Debian version is based on Debian 9 Stretch, and is based on the armhf (armv71) architecture.

I tried adding both the armhf and arm64 arch builds to my OBS repo for Stretch, just to see what would happen. If they fail, users will never see them. At the same time, I launched an armhf test build for Debian 10 on my fast gaming laptop on the x86-64 architecture, using the sbuild cross-compiler, also to see what happens. It seems to be most of the way through, since the laptop is several times faster than the OBS. Were your build failures near the beginning of the build?

User avatar
stevepusser
Astronaut
Astronaut
Posts: 598
Joined: 2015-08-01, 18:33
Location: California

Re: Mach packaging error message

Post by stevepusser » 2019-12-10, 21:54

It doesn't appear that the ARM support is ready for prime-time, judging on how the builds failed on the OBS.

I also found out that the QEMU-based cross-compile on my own machine, using sbuild, is about twenty times slower than an x86 cross-compile, so it failed after maybe five hours of running the laptop at full speed on all six cores--good thing I picked one with a really good cooling solution, plus I undervolt the CPU to both keep it cooler and reduce thermal throttling.

User avatar
Admin
Site Admin
Site Admin
Posts: 297
Joined: 2012-05-17, 19:06

Re: Mach packaging error message

Post by Admin » 2019-12-11, 00:40

You're lucky cross-compiling works at all. It's known to be broken with many combinations of host and target.
Did you know that moral outrage triggers the pleasure centers of the brain? It's unlikely you can actually get addicted to outrage, but there is plausible evidence that you can become strongly predisposed to it.
Source: https://www.bbc.co.uk/programmes/p002w557/episodes/downloads - "The cooperative species" and "Behaving better online"

User avatar
stevepusser
Astronaut
Astronaut
Posts: 598
Joined: 2015-08-01, 18:33
Location: California

Re: Mach packaging error message

Post by stevepusser » 2019-12-12, 00:25

Admin wrote:
2019-12-11, 00:40
You're lucky cross-compiling works at all. It's known to be broken with many combinations of host and target.
Well, it works fine on a Debian 10 host using sbuild (QEMU schroots) for Debian 10, 9, and 8 for amd64 and i386 builds, except it still runs out of virtual memory on Debian 8 i386 builds, so I have to use a virtual machine for those.

Based on no version of Debian ever using gcc-7 as default, the OP's Armbian probably is based on an Ubuntu that did ship that as default.

User avatar
stevepusser
Astronaut
Astronaut
Posts: 598
Joined: 2015-08-01, 18:33
Location: California

Re: Mach packaging error message

Post by stevepusser » 2019-12-12, 01:14

Hmmm---well, armhf and arm64 builds of 28.8.0 are now successful on the OBS, at least on the platforms that support those builds. Let me add Rasbian builds now.

The OP should be able to rebuild packages from my OBS source files, using Debian standard packaging tools, on his own device, if none of the ones on the OBS match his version of Armbian.

The Pale Moon source files can be downloaded from here without signing onto the OBS:

https://download.opensuse.org/repositor ... Debian_10/

Post Reply