TAZ distro with palemoon on musl: almost there

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!
Peregrine

TAZ distro with palemoon on musl: almost there

Unread post by Peregrine » 2018-06-08, 11:10

As mentioned on earlier posts, me and VCTLabs are building the TAZ distro that is also going to include palemoon as the main browser. The entire distro (thus including palemoon) is going to run on musl. There have been a few attemps in the past to make palemoon run on musl, but so far nothing has been successful (to my knowledge). VCTLabs however has gotten us so far that it already runs on musl. However, at the moment there are still a few issues:
* jemalloc doesn't work (see https://github.com/jemalloc/jemalloc/issues/1238 ) -issue currently avoided turning jemalloc off-
* palemoon crashes on the first run (see images) but gets far enough to create its profile directory.
* once the profile is created it does not crash on startup, but font rendering is all messed up (see images)

Note that we intent to work with deu to implement the musl build option (hence allowing to build with either glibc or musl).
Deu mentioned that he is probably going to upload the v28 ebuild to gentoo packages, so when that happens (and he implements the musl build option) we'll have the ability to build with musl, for version 28 and probably all later versions too.
Attachments
palemoon-no-text.jpg
palemoon-first-crash.jpg
palemoon-no-text-home.jpg
Last edited by Peregrine on 2018-06-08, 11:21, edited 3 times in total.

terranigma

Re: TAZ distro with palemoon on musl: almost there

Unread post by terranigma » 2018-06-08, 21:41

I ported the Pale Moon to musl couple months ago. It runs just fine on Alpine Linux with musl-libc (gcc-6.4) except some rare cases. I didn't make it public at first because I was a bit reluctant about it. Since you're also working on it, my work may be helpful to solve your problems.

Check out: https://github.com/tanertas/aports/tree ... g/palemoon

Good luck.
Last edited by terranigma on 2018-06-09, 09:09, edited 2 times in total.

Peregrine

Re: TAZ distro with palemoon on musl: almost there

Unread post by Peregrine » 2018-06-11, 11:29

The patch you used stopped the crash on first startup:
https://github.com/tanertas/aports/blob ... 4732.patch

Fonts still don't work.

terranigma

Re: TAZ distro with palemoon on musl: almost there

Unread post by terranigma » 2018-06-11, 12:27

Peregrine wrote:The patch you used stopped the crash on first startup:
https://github.com/tanertas/aports/blob ... 4732.patch

Fonts still don't work.
That patch fixes hard stack size limitation of musl for Pale Moon. Until providing enough info for your build (build environment, mozconfig, compiler flags etc) it's hard to determine real cause of the problem. Did you check my APKBUILD file for build options?

My abuid.conf (make.conf in Gentoo) as follows:

Code: Select all

export JOBS=5
export MAKEFLAGS=-j$JOBS

export CFLAGS="-Os -fomit-frame-pointer"
export CXXFLAGS="$CFLAGS"
export CPPFLAGS="$CFLAGS
export LDFLAGS="-Wl,--as-needed"
What about other Gtk-2 applications? Are fonts rendering properly?

Note: External malloc implementations don't supported by musl as far as I know. So, just disable jemalloc by now.
Last edited by terranigma on 2018-06-11, 19:44, edited 6 times in total.

Peregrine

Re: TAZ distro with palemoon on musl: almost there

Unread post by Peregrine » 2018-06-12, 10:08

terranigma wrote: What about other Gtk-2 applications? Are fonts rendering properly?
Yes - geany, claws, and some lxde stuff were all compiled against it, and all those others can render fonts.
HOWEVER, those were all compiled with a newer toolchain, whereas we switched to gcc-4.9 when building palemoon per Deu's recommendation. The tanertas build uses the gcc-6.4 toolchain since that is the only available toolchain on Alpine currently.
So perhaps running palemoon on gcc-6.4 might help.
terranigma wrote: Until providing enough info for your build (build environment, mozconfig, compiler flags etc) it's hard to determine real cause of the problem.
We'll pastebin the mozconfig and environment file soon.

Peregrine

Re: TAZ distro with palemoon on musl: almost there

Unread post by Peregrine » 2018-06-13, 07:36

Here they are:

environment file (/var/tmp/portage/www-client/palemoon-27.9.2/temp/environment ):
http://termbin.com/iq41

.mozconfig file:
http://termbin.com/wcc2
Attachments
mozconfig.txt
(2.11 KiB) Downloaded 24 times
environment.txt
(140.46 KiB) Downloaded 16 times

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

Re: TAZ distro with palemoon on musl: almost there

Unread post by Walter Dnes » 2018-06-13, 08:32

terranigma wrote:My abuid.conf (make.conf in Gentoo) as follows:

Code: Select all

export JOBS=5
export MAKEFLAGS=-j$JOBS

export CFLAGS="-Os -fomit-frame-pointer"
export CXXFLAGS="$CFLAGS"
export CPPFLAGS="$CFLAGS
export LDFLAGS="-Wl,--as-needed"
"-Os" reduces binary size, but slows down the executable that you build. I recommend
"-O2 -fno-unwind-tables -fno-asynchronous-unwind-tables -fomit-frame-pointer" instead. "-O2" optimizes for speed. The GCC flags "-fno-asynchronous-unwind-tables -fomit-frame-pointer" get rid of DWARF2 tables, which knocks 15% off the size of the compiled binary. This speeds up loading time (less to load) and uses corespondingly less ram. See 2 posts from the busybox mailing list http://lists.busybox.net/pipermail/busybox/2012-September/078326.html and http://lists.busybox.net/pipermail/busybox/2012-September/078331.html. These guys are busybox developers, not "Gentoo Ricers". I've been using these options on Gentoo linux for approximately 5 years. If they caused problems, I would've found out by now, because almost everything on Gentoo is built from source.
There's a right way
There's a wrong way
And then there's my way

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

Re: TAZ distro with palemoon on musl: almost there

Unread post by Walter Dnes » 2018-06-13, 08:48

Peregrine wrote:Here they are:

environment file

.mozconfig file
One minor change. I am not aware of any cpu that has SSE2, but does not have SSE. See https://gcc.gnu.org/onlinedocs/gcc-6.4.0/gcc/x86-Options.html#x86-Options In your environment file, you can replace

"if use cpu_flags_x86_sse && use cpu_flags_x86_sse2; then"

...with...

"if use cpu_flags_x86_sse2; then"
There's a right way
There's a wrong way
And then there's my way

terranigma

Re: TAZ distro with palemoon on musl: almost there

Unread post by terranigma » 2018-06-13, 12:53

Peregrine wrote:Here they are:

environment file (/var/tmp/portage/www-client/palemoon-27.9.2/temp/environment ):
http://termbin.com/iq41

.mozconfig file:
http://termbin.com/wcc2
Hi,
I managed to fix the issue by help of Alpine developers.

At first, I repeated the problem on x86 Pale Moon build on Alpine too. I noticed that Firefox on x86 repo has similar issue.
I asked @ncopa from Alpine then he confirmed that the issue is known and suggested to check out these:
* https://bugs.alpinelinux.org/issues/4248
* https://bugzilla.mozilla.org/show_bug.c ... id=1284293

By his direction, I modified the jsnum.cpp and voila!

Check out this patch:
https://github.com/tanertas/aports/blob ... -fix.patch

Good luck.
Last edited by terranigma on 2018-06-13, 12:55, edited 1 time in total.

Peregrine

Re: TAZ distro with palemoon on musl: almost there

Unread post by Peregrine » 2018-06-14, 11:11

That worked.
We'll roll out the needed changes into the palemoon overlay next.
Attachments
palemoon-success.jpg

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

Re: TAZ distro with palemoon on musl: almost there

Unread post by Moonchild » 2018-06-14, 15:09

When you do, please make sure you disable official branding. I looked once again over the build config and patches used in aports and they are too far removed from our official config to be accepted with official branding.
"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

terranigma

Re: TAZ distro with palemoon on musl: almost there

Unread post by terranigma » 2018-06-14, 21:12

Moonchild wrote:When you do, please make sure you disable official branding. I looked once again over the build config and patches used in aports and they are too far removed from our official config to be accepted with official branding.
In this case, can we publicly expose build options below?
Is disabling official branding just enough or we must rename package and executable names too?

Code: Select all

#ac_add_options --with-system-nspr
#ac_add_options --with-system-nss
#ac_add_options --with-system-jpeg
#ac_add_options --with-system-libevent
#ac_add_options --with-system-libvpx
#ac_add_options --with-system-icu
#ac_add_options --with-system-webp
#ac_add_options --enable-system-hunspell
#ac_add_options --enable-system-sqlite
Last edited by terranigma on 2018-06-14, 21:12, edited 1 time in total.

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

Re: TAZ distro with palemoon on musl: almost there

Unread post by Moonchild » 2018-06-14, 22:25

If you don't use official branding, you can use whichever build configuration you like most.
You can either continue using the "New Moon" branding which is unofficial and can be used accordingly (see redist point 13 at http://www.palemoon.org/redist.shtml) or you can re-brand it to something you prefer (name+visual marks) like e.g. iceweasel does. The latter has our preference if you intend to maintain your specific fork for a longer time.
"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

Peregrine

Re: TAZ distro with palemoon on musl: almost there

Unread post by Peregrine » 2018-07-11, 07:24

Peregrine wrote:We'll roll out the needed changes into the palemoon overlay next.
The needed changes for palemoon were bundled in VCTLabs' pull request of 16 june 2018
see here: https://github.com/deu/palemoon-overlay/pull/66

We're currently continuing on the distro (TAZ) itself.
Since future versions of the distro would incorporate newer versions of palemoon, it would be useful that these changes are pulled in, in order to reduce our workload in future versions, but also to give all other gentoo distro's the ability to build palemoon with musl.

Peregrine

Re: TAZ distro with palemoon on musl: almost there

Unread post by Peregrine » 2018-09-19, 15:22

VCTLabs' pull request of 16 june 2018 was dismissed by deu at 18 August (https://github.com/deu/palemoon-overlay/pull/66 ).
Deu mentioned then that the pull request could instead be done upstream (we'll look into this option).
In either case, the pull request would already need an update as we need it to run under gcc 6.4 rather than 7.3.
Reason is that this way, we are on the same toolchain as the alpine builds, which Taner Tas has had good results with.
In the distro, SJLC solved this gcc issue in palemoon/newmoon by switching the gcc in the seed stage to the older version.
Last edited by Peregrine on 2018-09-19, 15:24, edited 1 time in total.

Locked