TAZ distro with palemoon on musl: almost there

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

Moderators: trava90, satrow

Peregrine
Apollo supporter
Apollo supporter
Posts: 32
Joined: Mon, 26 Oct 2015, 08:39
Location: planet earth, orion arm, milky way, the universe

TAZ distro with palemoon on musl: almost there

Unread postby Peregrine » Fri, 08 Jun 2018, 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 Fri, 08 Jun 2018, 11:21, edited 3 times in total.

User avatar
terranigma
Hobby Astronomer
Hobby Astronomer
Posts: 27
Joined: Sat, 10 Mar 2018, 01:46

Re: TAZ distro with palemoon on musl: almost there

Unread postby terranigma » Fri, 08 Jun 2018, 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 Sat, 09 Jun 2018, 09:09, edited 2 times in total.

Peregrine
Apollo supporter
Apollo supporter
Posts: 32
Joined: Mon, 26 Oct 2015, 08:39
Location: planet earth, orion arm, milky way, the universe

Re: TAZ distro with palemoon on musl: almost there

Unread postby Peregrine » Mon, 11 Jun 2018, 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.

User avatar
terranigma
Hobby Astronomer
Hobby Astronomer
Posts: 27
Joined: Sat, 10 Mar 2018, 01:46

Re: TAZ distro with palemoon on musl: almost there

Unread postby terranigma » Mon, 11 Jun 2018, 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 Mon, 11 Jun 2018, 19:44, edited 6 times in total.

Peregrine
Apollo supporter
Apollo supporter
Posts: 32
Joined: Mon, 26 Oct 2015, 08:39
Location: planet earth, orion arm, milky way, the universe

Re: TAZ distro with palemoon on musl: almost there

Unread postby Peregrine » Tue, 12 Jun 2018, 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
Apollo supporter
Apollo supporter
Posts: 32
Joined: Mon, 26 Oct 2015, 08:39
Location: planet earth, orion arm, milky way, the universe

Re: TAZ distro with palemoon on musl: almost there

Unread postby Peregrine » Wed, 13 Jun 2018, 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 5 times
environment.txt
(140.46 KiB) Downloaded 3 times

Walter Dnes
Astronaut
Astronaut
Posts: 563
Joined: Thu, 30 Jul 2015, 20:29
Location: Vaughan, ON, Canada

Re: TAZ distro with palemoon on musl: almost there

Unread postby Walter Dnes » Wed, 13 Jun 2018, 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: 563
Joined: Thu, 30 Jul 2015, 20:29
Location: Vaughan, ON, Canada

Re: TAZ distro with palemoon on musl: almost there

Unread postby Walter Dnes » Wed, 13 Jun 2018, 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

User avatar
terranigma
Hobby Astronomer
Hobby Astronomer
Posts: 27
Joined: Sat, 10 Mar 2018, 01:46

Re: TAZ distro with palemoon on musl: almost there

Unread postby terranigma » Wed, 13 Jun 2018, 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 Wed, 13 Jun 2018, 12:55, edited 1 time in total.

Peregrine
Apollo supporter
Apollo supporter
Posts: 32
Joined: Mon, 26 Oct 2015, 08:39
Location: planet earth, orion arm, milky way, the universe

Re: TAZ distro with palemoon on musl: almost there

Unread postby Peregrine » Thu, 14 Jun 2018, 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: 22124
Joined: Sun, 28 Aug 2011, 17:27
Location: 58.5°N 15.5°E
Contact:

Re: TAZ distro with palemoon on musl: almost there

Unread postby Moonchild » Thu, 14 Jun 2018, 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.
Improving Mozilla code: You know you're on the right track with code changes when you spend the majority of your time deleting code.

"If you want to build a better world for yourself, you have to be willing to build one for everybody." -- Coyote Osborne

Image

User avatar
terranigma
Hobby Astronomer
Hobby Astronomer
Posts: 27
Joined: Sat, 10 Mar 2018, 01:46

Re: TAZ distro with palemoon on musl: almost there

Unread postby terranigma » Thu, 14 Jun 2018, 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 Thu, 14 Jun 2018, 21:12, edited 1 time in total.

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 22124
Joined: Sun, 28 Aug 2011, 17:27
Location: 58.5°N 15.5°E
Contact:

Re: TAZ distro with palemoon on musl: almost there

Unread postby Moonchild » Thu, 14 Jun 2018, 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.
Improving Mozilla code: You know you're on the right track with code changes when you spend the majority of your time deleting code.

"If you want to build a better world for yourself, you have to be willing to build one for everybody." -- Coyote Osborne

Image

Peregrine
Apollo supporter
Apollo supporter
Posts: 32
Joined: Mon, 26 Oct 2015, 08:39
Location: planet earth, orion arm, milky way, the universe

Re: TAZ distro with palemoon on musl: almost there

Unread postby Peregrine » Wed, 11 Jul 2018, 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
Apollo supporter
Apollo supporter
Posts: 32
Joined: Mon, 26 Oct 2015, 08:39
Location: planet earth, orion arm, milky way, the universe

Re: TAZ distro with palemoon on musl: almost there

Unread postby Peregrine » Wed, 19 Sep 2018, 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 Wed, 19 Sep 2018, 15:24, edited 1 time in total.


Return to “Pale Moon for Linux”

Who is online

Users browsing this forum: No registered users and 9 guests