failed to mach package

Talk about code development, features, specific bugs, enhancements, patches, and similar things.
Forum rules
Please keep everything here strictly on-topic.
This board is meant for Pale Moon source code development related subjects only like code snippets, patches, specific bugs, git, the repositories, etc.

This is not for tech support! Please do not post tech support questions in the "Development" board!
Please make sure not to use this board for support questions. Please post issues with specific websites, extensions, etc. in the relevant boards for those topics.

Please keep things on-topic as this forum will be used for reference for Pale Moon development. Expect topics that aren't relevant as such to be moved or deleted.
User avatar
vaguiners
Newbie
Newbie
Posts: 4
Joined: 2023-11-19, 15:18

failed to mach package

Post by vaguiners » 2025-07-21, 04:25

0:00.24 /usr/local/bin/make -C . -j4 -s -w package
0:00.25 make: Entering directory '/tmp/tmp.K0Lf6d/pale-moon/obj-x86_64-pc-linux-gnu'
0:00.27 make[1]: Entering directory '/tmp/tmp.K0Lf6d/pale-moon/obj-x86_64-pc-linux-gnu/palemoon/installer'
0:00.27 make[2]: Entering directory '/tmp/tmp.K0Lf6d/pale-moon/obj-x86_64-pc-linux-gnu/palemoon/installer'
0:01.22 Executing /tmp/tmp.K0Lf6d/pale-moon/obj-x86_64-pc-linux-gnu/dist/bin/xpcshell -g /tmp/tmp.K0Lf6d/pale-moon/obj-x86_64-pc-linux-gnu/dist/bin/ -a /tmp/tmp.K0Lf6d/pale-moon/obj-x86_64-pc-linux-gnu/dist/bin/ -f /tmp/tmp.K0Lf6d/pale-moon/platform/toolkit/mozapps/installer/precompile_cache.js -e precompile_startupcache("resource://gre/");
0:02.02 Traceback (most recent call last):
0:02.02 File "/tmp/tmp.K0Lf6d/pale-moon/platform/toolkit/mozapps/installer/packager.py", line 379, in <module>
0:02.02 main()
0:02.02 File "/tmp/tmp.K0Lf6d/pale-moon/platform/toolkit/mozapps/installer/packager.py", line 373, in main
0:02.02 args.source, gre_path, base)
0:02.02 File "/tmp/tmp.K0Lf6d/pale-moon/platform/toolkit/mozapps/installer/packager.py", line 135, in precompile_cache
0:02.02 errors.fatal('Error while running startup cache precompilation')
0:02.02 File "/tmp/tmp.K0Lf6d/pale-moon/platform/python/mozbuild/mozpack/errors.py", line 103, in fatal
0:02.02 self._handle(self.FATAL, msg)
0:02.02 File "/tmp/tmp.K0Lf6d/pale-moon/platform/python/mozbuild/mozpack/errors.py", line 98, in _handle
0:02.02 raise ErrorMessage(msg)
0:02.02 mozpack.errors.ErrorMessage: Error: Error while running startup cache precompilation
0:02.03 make[2]: *** [/tmp/tmp.K0Lf6d/pale-moon/platform/toolkit/mozapps/installer/packager.mk:41: stage-package] Error 1
0:02.03 make[2]: Leaving directory '/tmp/tmp.K0Lf6d/pale-moon/obj-x86_64-pc-linux-gnu/palemoon/installer'
0:02.03 make[1]: *** [/tmp/tmp.K0Lf6d/pale-moon/platform/toolkit/mozapps/installer/packager-uxp.mk:16: make-archive] Error 2
0:02.03 make[1]: Leaving directory '/tmp/tmp.K0Lf6d/pale-moon/obj-x86_64-pc-linux-gnu/palemoon/installer'
0:02.03 make: *** [/tmp/tmp.K0Lf6d/pale-moon/platform/../palemoon/build.mk:9: package] Error 2
0:02.03 make: Leaving directory '/tmp/tmp.K0Lf6d/pale-moon/obj-x86_64-pc-linux-gnu'

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 38406
Joined: 2011-08-28, 17:27
Location: Motala, SE

Re: failed to mach package

Post by Moonchild » 2025-07-21, 09:31

Precompilation of the startup cache does not work in a number of environments, and does not really provide tangible benefits anyway.
Please disable it in your .mozconfig
"There is no point in arguing with an idiot, because then you're both idiots." - Anonymous
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

User avatar
vaguiners
Newbie
Newbie
Posts: 4
Joined: 2023-11-19, 15:18

Re: failed to mach package

Post by vaguiners » 2025-07-22, 17:46

Moonchild wrote:
2025-07-21, 09:31
Precompilation of the startup cache does not work in a number of environments, and does not really provide tangible benefits anyway.
Please disable it in your .mozconfig
Thank you. Yes, ac_add_options --disable-precompiled-startupcache fixed the issue.

I now have another issue, using a bunch of optimization flags:
63:24.75 The following command failed to execute properly:
63:24.75 /usr/local/bin/g++ -o Unified_cpp_js_src13.o -c -I/tmp/tmp.4LWHku/pale-moon/obj-x86_64-pc-linux-gnu/dist/system_wrappers -include /tmp/tmp.4LWHku/pale-moon/platform/config/gcc_hidden.h -DNDEBUG=1 -DTRIMMED=1 -DENABLE_SHARED_ARRAY_BUFFER -DEXPORT_JS_API -DENABLE_BINARYDATA -DENABLE_SIMD -DJS_HAS_CTYPES -DDLL_PREFIX="lib" -DDLL_SUFFIX=".so" -DFFI_BUILDING -DMOZ_HAS_MOZGLUE -I/tmp/tmp.4LWHku/pale-moon/platform/js/src -I/tmp/tmp.4LWHku/pale-moon/obj-x86_64-pc-linux-gnu/js/src -I/tmp/tmp.4LWHku/pale-moon/obj-x86_64-pc-linux-gnu/js/src/ctypes/libffi/include -I/tmp/tmp.4LWHku/pale-moon/platform/js/src/ctypes/libffi/src/x86 -I/tmp/tmp.4LWHku/pale-moon/obj-x86_64-pc-linux-gnu/dist/include -I/tmp/tmp.4LWHku/pale-moon/obj-x86_64-pc-linux-gnu/dist/include/nspr -fPIC -DMOZILLA_CLIENT -include /tmp/tmp.4LWHku/pale-moon/obj-x86_64-pc-linux-gnu/js/src/js-confdefs.h -MD -MP -MF .deps/Unified_cpp_js_src13.o.pp -fopt-info-vec-optimized -fmerge-all-constants -fno-semantic-interposition -ftree-vectorize -fipa-pta -funroll-loops -floop-nest-optimize -Ofast -march=x86-64-v3 -DFLOAT_APPROX -Wall -Wempty-body -Wignored-qualifiers -Woverloaded-virtual -Wpointer-arith -Wsign-compare -Wtype-limits -Wunreachable-code -Wwrite-strings -Wno-invalid-offsetof -Wimplicit-fallthrough -Wno-error=maybe-uninitialized -Wno-error=deprecated-declarations -Wno-error=array-bounds -Wno-error=multistatement-macros -Wno-noexcept-type -fno-sized-deallocation -flifetime-dse=1 -fopt-info-vec-optimized -fmerge-all-constants -fno-semantic-interposition -ftree-vectorize -fipa-pta -funroll-loops -floop-nest-optimize -Ofast -march=x86-64-v3 -DFLOAT_APPROX -fno-rtti -fno-exceptions -fno-math-errno -pipe -pthread -g -freorder-blocks -O3 -fomit-frame-pointer -Wno-shadow -Werror=format -fno-strict-aliasing /tmp/tmp.4LWHku/pale-moon/obj-x86_64-pc-linux-gnu/js/src/Unified_cpp_js_src13.cpp
63:24.75 make[5]: *** [/tmp/tmp.4LWHku/pale-moon/platform/config/rules.mk:881: Unified_cpp_js_src13.o] Error 1
63:24.75 make[4]: *** [/tmp/tmp.4LWHku/pale-moon/platform/config/recurse.mk:71: js/src/target] Error 2
63:24.75 make[3]: *** [/tmp/tmp.4LWHku/pale-moon/platform/config/recurse.mk:33: compile] Error 2
63:24.75 make[2]: *** [/tmp/tmp.4LWHku/pale-moon/platform/config/rules.mk:497: default] Error 2
63:24.75 make[1]: *** [/tmp/tmp.4LWHku/pale-moon/client.mk:406: realbuild] Error 2
63:24.75 make: *** [client.mk:164: build] Error 2
63:24.76 942 compiler warnings present.

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 38406
Joined: 2011-08-28, 17:27
Location: Motala, SE

Re: failed to mach package

Post by Moonchild » 2025-07-22, 19:38

It would help if you include the actual error as well ;) (it's above the tail you posted)
In general, when it comes to options, "less is more".

Please post your .mozconfig as well, and if you do global fine-tuning of your compiler options, let us know as well.
"There is no point in arguing with an idiot, because then you're both idiots." - Anonymous
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

User avatar
vaguiners
Newbie
Newbie
Posts: 4
Joined: 2023-11-19, 15:18

Re: failed to mach package

Post by vaguiners » 2025-07-22, 20:01

I managed to escape this error by moving some flags export to ac_add_options --enable-optimize
Now I get the error:

Code: Select all

59:48.44 Notification center failed: Install the python dbus module to get a notification when the build finishes.
59:48.44 We know it took a while, but your build finally finished successfully!

Checking for un-preprocessed files... Done!
To view resource usage of the build, run |mach resource-usage|.
To take your build for a test drive, run: |mach run|
 0:00.25 /usr/local/bin/make -C . -j4 -s -w package
 0:00.25 make: Entering directory '/tmp/tmp.mNXwZ0/pale-moon/obj-x86_64-pc-linux-gnu'
 0:00.27 make[1]: Entering directory '/tmp/tmp.mNXwZ0/pale-moon/obj-x86_64-pc-linux-gnu/palemoon/installer'
 0:00.28 make[2]: Entering directory '/tmp/tmp.mNXwZ0/pale-moon/obj-x86_64-pc-linux-gnu/palemoon/installer'
 0:00.65 Error: /tmp/tmp.mNXwZ0/pale-moon/obj-x86_64-pc-linux-gnu/palemoon/installer/package-manifest:52: Missing file(s): bin/libhunspell.so
 0:01.21 Traceback (most recent call last):
 0:01.21   File "/tmp/tmp.mNXwZ0/pale-moon/platform/toolkit/mozapps/installer/packager.py", line 379, in <module>
 0:01.21     main()
 0:01.21   File "/tmp/tmp.mNXwZ0/pale-moon/platform/toolkit/mozapps/installer/packager.py", line 342, in main
 0:01.21     copier.add(mozpath.join(respath, 'removed-files'), removals)
 0:01.21   File "/usr/local/lib/python2.7/contextlib.py", line 24, in __exit__
 0:01.21     self.gen.next()
 0:01.21   File "/tmp/tmp.mNXwZ0/pale-moon/platform/python/mozbuild/mozpack/errors.py", line 131, in accumulate
 0:01.21     raise AccumulatedErrors()
 0:01.21 mozpack.errors.AccumulatedErrors
 0:01.22 make[2]: *** [/tmp/tmp.mNXwZ0/pale-moon/platform/toolkit/mozapps/installer/packager.mk:41: stage-package] Error 1
 0:01.22 make[2]: Leaving directory '/tmp/tmp.mNXwZ0/pale-moon/obj-x86_64-pc-linux-gnu/palemoon/installer'
 0:01.22 make[1]: *** [/tmp/tmp.mNXwZ0/pale-moon/platform/toolkit/mozapps/installer/packager-uxp.mk:16: make-archive] Error 2
 0:01.22 make[1]: Leaving directory '/tmp/tmp.mNXwZ0/pale-moon/obj-x86_64-pc-linux-gnu/palemoon/installer'
 0:01.22 make: *** [/tmp/tmp.mNXwZ0/pale-moon/platform/../palemoon/build.mk:9: package] Error 2
 0:01.22 make: Leaving directory '/tmp/tmp.mNXwZ0/pale-moon/obj-x86_64-pc-linux-gnu'

Code: Select all

# Clear this if not a 64bit build
_BUILD_64=1

# Set GTK Version to 2 or 3
_GTK_VERSION=3

# Standard build options for Pale Moon
ac_add_options --enable-application=palemoon
ac_add_options --enable-default-toolkit=cairo-gtk$_GTK_VERSION
ac_add_options --enable-devtools

# Avoid errors
ac_add_options --disable-precompiled-startupcache
ac_add_options --disable-dbus
ac_add_options --disable-pulseaudio
ac_add_options --disable-npapi
ac_add_options --disable-gconf

# Use system links
ac_add_options --enable-readline
ac_add_options --with-system-bz2
ac_add_options --with-system-zlib
ac_add_options --enable-system-cairo
ac_add_options --enable-system-extension-dirs
ac_add_options --enable-system-pixman
ac_add_options --enable-system-hunspell

# Debloat
ac_add_options --disable-parental-controls
ac_add_options --disable-accessibility
#ac_add_options --disable-webrtc
ac_add_options --disable-gamepad
ac_add_options --disable-tests
ac_add_options --disable-debug
ac_add_options --disable-necko-wifi
ac_add_options --disable-updater

# Optimizations
ac_add_options --enable-optimize="-O3 -w -march=$MARCH"
ac_add_options --enable-libjpeg-turbo
ac_add_options --enable-jemalloc
ac_add_options --enable-strip
ac_add_options --with-pthreads

# Codecs
ac_add_options --enable-av1
ac_add_options --enable-jxl
ac_add_options --enable-alsa
ac_add_options --enable-ffmpeg

ac_add_options --enable-official-branding
export MOZILLA_OFFICIAL=1

# Automatically clobber if CLOBBER was touched
mk_add_options AUTOCLOBBER=1

ac_add_options --x-libraries=/usr/lib

export MOZ_PKG_SPECIAL=gtk$_GTK_VERSION
I think ac_add_options --enable-system-hunspell caused this

I'll remove and try again, give me a hour

Code: Select all

 0:06.80 checking for hunspell... yes
 0:06.80 checking MOZ_HUNSPELL_CFLAGS... -I/usr/local/include/hunspell
 0:06.81 checking MOZ_HUNSPELL_LIBS... -L/usr/local/lib -lhunspell-1.7
Does that sound like a logical problem? The package is trying to embed the .so file when I told it to use the system one.

User avatar
Nuck-TH
Project Contributor
Project Contributor
Posts: 323
Joined: 2020-03-02, 16:04

Re: failed to mach package

Post by Nuck-TH » 2025-07-23, 11:19

You shouldn't enable use of system libs. Whatever system libs it needs, PM will use automatically, others that are built in are there for reason.
Hunspell is afaik is exception from above.