[SOLVED] PaleMoon 25.5.0 build failure on Gentoo Linux

Users and developers helping users with generic and technical Pale Moon issues on all operating systems.

Moderator: trava90

Forum rules
This board is for technical/general usage questions and troubleshooting for the Pale Moon browser only.
Technical issues and questions not related to the Pale Moon browser should be posted in other boards!
Please keep off-topic and general discussion out of this board, thank you!
Unix Ronin

[SOLVED] PaleMoon 25.5.0 build failure on Gentoo Linux

Unread post by Unix Ronin » 2015-06-22, 18:29

I maintain my own Linux ebuild for Pale Moon. Build of 25.5.0 fails at the following point:

Code: Select all

jemalloc_config.c
x86_64-pc-linux-gnu-gcc -o jemalloc_config.o -c -I../../../dist/system_wrappers -include /var/tmp/portage/www-client/palemoon-25.5.0/work/palemoon-25.5.0/config/gcc_hidden.h -DMOZ_JEMALLOC3 -DMOZ_REPLACE_JEMALLOC -DMOZ_GLUE_IN_PROGRAM -DNO_NSPR_10_SUPPORT -I../../jemalloc/src/include -I/var/tmp/portage/www-client/palemoon-25.5.0/work/palemoon-25.5.0/memory/replace/jemalloc -I. -I../../../dist/include  -I/usr/include/nspr -I/usr/include/nss      -fPIC  -Wall -Wpointer-arith -Wdeclaration-after-statement -Werror=return-type -Wtype-limits -Wempty-body -Wsign-compare -Wno-unused -Wcast-align -march=amdfam10 -pipe -mno-avx -std=gnu99 -fgnu89-inline -fno-strict-aliasing -ffunction-sections -fdata-sections -pthread -pipe  -DNDEBUG -DTRIMMED -freorder-blocks -Os  -fomit-frame-pointer   -include ../../../mozilla-config.h -DMOZILLA_CLIENT -MD -MP -MF .deps/jemalloc_config.o.pp  /var/tmp/portage/www-client/palemoon-25.5.0/work/palemoon-25.5.0/memory/build/jemalloc_config.c
mozjemalloc_compat.c
x86_64-pc-linux-gnu-gcc -o mozjemalloc_compat.o -c -I../../../dist/system_wrappers -include /var/tmp/portage/www-client/palemoon-25.5.0/work/palemoon-25.5.0/config/gcc_hidden.h -DMOZ_JEMALLOC3 -DMOZ_REPLACE_JEMALLOC -DMOZ_GLUE_IN_PROGRAM -DNO_NSPR_10_SUPPORT -I../../jemalloc/src/include -I/var/tmp/portage/www-client/palemoon-25.5.0/work/palemoon-25.5.0/memory/replace/jemalloc -I. -I../../../dist/include  -I/usr/include/nspr -I/usr/include/nss      -fPIC  -Wall -Wpointer-arith -Wdeclaration-after-statement -Werror=return-type -Wtype-limits -Wempty-body -Wsign-compare -Wno-unused -Wcast-align -march=amdfam10 -pipe -mno-avx -std=gnu99 -fgnu89-inline -fno-strict-aliasing -ffunction-sections -fdata-sections -pthread -pipe  -DNDEBUG -DTRIMMED -freorder-blocks -Os  -fomit-frame-pointer   -include ../../../mozilla-config.h -DMOZILLA_CLIENT -MD -MP -MF .deps/mozjemalloc_compat.o.pp  /var/tmp/portage/www-client/palemoon-25.5.0/work/palemoon-25.5.0/memory/build/mozjemalloc_compat.c
/var/tmp/portage/www-client/palemoon-25.5.0/work/palemoon-25.5.0/memory/build/mozjemalloc_compat.c: In function 'replace_malloc_good_size':
/var/tmp/portage/www-client/palemoon-25.5.0/work/palemoon-25.5.0/memory/build/mozjemalloc_compat.c:59:3: warning: implicit declaration of function 'je_nallocm' [-Wimplicit-function-declaration]
   if (!je_(nallocm)(&ret, size, 0))
   ^
/var/tmp/portage/www-client/palemoon-25.5.0/work/palemoon-25.5.0/memory/build/mozjemalloc_compat.c: In function 'replace_jemalloc_stats':
/var/tmp/portage/www-client/palemoon-25.5.0/work/palemoon-25.5.0/memory/build/mozjemalloc_compat.c:81:8: error: 'jemalloc_stats_t' has no member named 'dirty'
   stats->dirty = pdirty * page;
        ^
/var/tmp/portage/www-client/palemoon-25.5.0/work/palemoon-25.5.0/memory/build/mozjemalloc_compat.c:82:8: error: 'jemalloc_stats_t' has no member named 'committed'
   stats->committed = active + stats->dirty;
        ^
/var/tmp/portage/www-client/palemoon-25.5.0/work/palemoon-25.5.0/memory/build/mozjemalloc_compat.c:82:36: error: 'jemalloc_stats_t' has no member named 'dirty'
   stats->committed = active + stats->dirty;
                                    ^
/var/tmp/portage/www-client/palemoon-25.5.0/work/palemoon-25.5.0/config/rules.mk:1069: recipe for target 'mozjemalloc_compat.o' failed
make[6]: *** [mozjemalloc_compat.o] Error 1
make[6]: *** Waiting for unfinished jobs....
make[6]: Leaving directory '/var/tmp/portage/www-client/palemoon-25.5.0/work/palemoon-25.5.0/obj-x86_64-unknown-linux-gnu/memory/replace/jemalloc'
/var/tmp/portage/www-client/palemoon-25.5.0/work/palemoon-25.5.0/config/makefiles/target_libs.mk:59: recipe for target 'libs' failed
make[5]: *** [libs] Error 2
make[5]: Leaving directory '/var/tmp/portage/www-client/palemoon-25.5.0/work/palemoon-25.5.0/obj-x86_64-unknown-linux-gnu/memory/replace'
/var/tmp/portage/www-client/palemoon-25.5.0/work/palemoon-25.5.0/config/makefiles/target_libs.mk:16: recipe for target 'libs_tier_platform' failed
make[4]: *** [libs_tier_platform] Error 2
make[4]: Leaving directory '/var/tmp/portage/www-client/palemoon-25.5.0/work/palemoon-25.5.0/obj-x86_64-unknown-linux-gnu'
/var/tmp/portage/www-client/palemoon-25.5.0/work/palemoon-25.5.0/config/rules.mk:723: recipe for target 'tier_platform' failed
make[3]: *** [tier_platform] Error 2
make[3]: Leaving directory '/var/tmp/portage/www-client/palemoon-25.5.0/work/palemoon-25.5.0/obj-x86_64-unknown-linux-gnu'
/var/tmp/portage/www-client/palemoon-25.5.0/work/palemoon-25.5.0/config/rules.mk:656: recipe for target 'default' failed
make[2]: *** [default] Error 2
make[2]: Leaving directory '/var/tmp/portage/www-client/palemoon-25.5.0/work/palemoon-25.5.0/obj-x86_64-unknown-linux-gnu'
/var/tmp/portage/www-client/palemoon-25.5.0/work/palemoon-25.5.0/client.mk:372: recipe for target 'realbuild' failed
make[1]: *** [realbuild] Error 2
make[1]: Leaving directory '/var/tmp/portage/www-client/palemoon-25.5.0/work/palemoon-25.5.0'
client.mk:172: recipe for target 'build' failed
The problem appears to lie with jemalloc_stats_t, which is defined in memory/mozjemalloc/jemalloc_types.h, and indeed has no 'dirty' field, though it does have a dirty_max.

Can anyone shed insight upon this problem?
Last edited by trava90 on 2015-06-24, 07:22, edited 1 time in total.
Reason: Marking SOLVED

Axiomatic

Re: PaleMoon 25.5.0 build failure on Gentoo Linux

Unread post by Axiomatic » 2015-06-23, 07:30

Pale Moon usaully is compiled without jemalloc1, since issue 39.

Addressing the actual issue seems to be easy enough though. Have you tried to add in the noted jemalloc's stats structs from your built output into 'memory/build/mozjemalloc_compat.c'?

1 Using the GLib implementation of malloc is probably a better idea since the Linux builds that are pushed to release are tested against that memory allocator.

Unix Ronin

Re: PaleMoon 25.5.0 build failure on Gentoo Linux

Unread post by Unix Ronin » 2015-06-23, 13:49

Ah, so. The proper fix would probably be to modify the configure invocation not to use jemalloc then. Let me see if I can make that change.

Unix Ronin

Re: PaleMoon 25.5.0 build failure on Gentoo Linux

Unread post by Unix Ronin » 2015-06-23, 15:29

Changing the ebuild to disable jemalloc fixed the problem. Thanks for the tip. :) Pushing the ebuild out to my overlay now.

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

Re: [SOLVED] PaleMoon 25.5.0 build failure on Gentoo Linux

Unread post by Moonchild » 2015-06-24, 10:55

--enable-jemalloc might indeed be broken on some *nix systems in the release snapshot, if you're actually trying to use the system jemalloc/jemalloc3 instead of the custom mozjemalloc lib. As Travis stated, it's not recommended to build with jemalloc on current-day *nix OSes.

This has already been fixed though, see Commit: 4d9fe80e85a8d45b036de98c665ee6ff9aad7b75
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

Locked