Building Pale Moon on Devuan fails

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.
miroR
Fanatic
Fanatic
Posts: 116
Joined: 2016-05-31, 19:22

Re: Building Pale Moon on Devuan fails

Unread post by miroR » 2017-07-07, 19:03

Ah, let me keep my word here.
The tips that I gave further above, and said it can only be confirmed once I retest it, I have done that today.
Those are good.
And I have successfully recompiled Palemoon, and it works like explained in todays posts, limitedly.

I thought for people looking for leaner and meaner compiling of their Pale Moon, to give my mozconfig, that is based on Walter Dnes (linked further above), for reasons of clarity, and completeness.

Un fortunately, I don't know which tags I could use in Lynx, without failure, so I have to give it text without any tags.

# cat palemoon-27.3.0~repack/debian/mozconfig
export MOZILLA_OFFICIAL=1
mk_add_options MOZ_CO_PROJECT=browser
ac_add_options --enable-official-branding
ac_add_options --enable-application=browser
ac_add_options --enable-release
ac_add_options --disable-installer
ac_add_options --disable-updater
ac_add_options --enable-optimize="-O2 -msse2 -mfpmath=sse"
ac_add_options --disable-debug
ac_add_options --with-pthreads
ac_add_options --enable-shared-js
ac_add_options --enable-jemalloc
ac_add_options --enable-strip
ac_add_options --x-libraries=/usr/lib
ac_add_options --prefix=/usr
ac_add_options --enable-devtools
ac_add_options --disable-necko-wifi
ac_add_options --disable-gstreamer

ac_add_options --with-pthreads

ac_add_options --disable-precompiled-startupcache

ac_add_options --disable-accessibility
ac_add_options --disable-b2g
ac_add_options --disable-dbus
ac_add_options --disable-debug
ac_add_options --disable-gamepad
ac_add_options --disable-omx-plugin
ac_add_options --disable-parental-controls
ac_add_options --disable-profiling
ac_add_options --disable-pulseaudio
ac_add_options --disable-safe-browsing
ac_add_options --disable-telemetry
ac_add_options --disable-updater
ac_add_options --disable-webrtc
ac_add_options --disable-webspeech
ac_add_options --enable-alsa
ac_add_options --enable-ffmpeg
ac_add_options --enable-fmp4
ac_add_options --enable-freetype
ac_add_options --enable-gnu-ld
ac_add_options --enable-gold
ac_add_options --enable-install-strip
ac_add_options --enable-jemalloc
ac_add_options --enable-jemalloc-lib
ac_add_options --enable-libjpeg-turbo
ac_add_options --enable-multithread
ac_add_options --enable-ogg
ac_add_options --enable-optimize
ac_add_options --enable-opus
ac_add_options --enable-png
ac_add_options --enable-pthreads
ac_add_options --enable-raw
ac_add_options --enable-shared-js
ac_add_options --enable-strip
ac_add_options --enable-svg
ac_add_options --enable-threads
ac_add_options --enable-threadsafe
ac_add_options --enable-wave
ac_add_options --enable-webgl
ac_add_options --enable-webm

miroR
Fanatic
Fanatic
Posts: 116
Joined: 2016-05-31, 19:22

Re: Building Pale Moon on Devuan fails

Unread post by miroR » 2017-07-12, 10:42

Apparently, all that was missing, for Pale Moon to stop crashing with my grsecurity-hardened kernel was issuing:

Code: Select all

# paxrat -s pm -b /usr/lib/palemoon/plugin-container
just as I previously had issued (when I started using this compiled Pale Moon one and a half month ago or so):

Code: Select all

# paxrat -s pm -b /usr/lib/palemoon/palmoon
Amazingly, for the first more than one month (1mn and 1-2 weeks or so) of using Pale Moon, and all that time, IIRC I ran it under grsec-kernel, Pale Moon wouldn't crash... So, for that long period of time is sufficed that only the palemoon binary were fixed with paxrat ...
Then all of a sudden it did start crashing... So go figure! Aaaarrgghhh.... :oops:
...So, as soon as I fixed also the plugin-container last night, so far, and I did browse a lot, no issues any more.
IOW, that was (likely) at the root of all the issues since the onset of this topic... Aaaarrgghhh....
Filip, thanks again for the help with compiling. :)

miroR
Fanatic
Fanatic
Posts: 116
Joined: 2016-05-31, 19:22

Re: Building Pale Moon on Devuan fails

Unread post by miroR » 2017-07-26, 23:07

Just built, by the method that filip was kind to teach me, plus the $SSLKEYLOGFILE patch of mine, and that can all be read above (in somewhat confused --or should we call it: exploratory-- manner :) ), and installed, and am posting with:

Code: Select all

Version: 27.4.0 (64-bit)
As far as the SSL-key logging that filip expressed some wonderment about and whether it really worked, having stubbornly tried to verify steve pusser's Palemoon sources, and without success (not necessarily the blame on me, nor not on me)...

As far as that SSL-key logging in question, I've decided to try and prepare (now that I got Apache for testing offline working in my Devuan) samples to demostrate things.

Not just because of filip's wonderment, no! But you'll see.

I'll have to open a new topic about it, because it would be off topic here. But since I gotta go now (been compiling the whole day :( ... well also grsec kernel...), I thought I'd only make the data that I'll post and link from the other topic more credible --I'm already running late by half a day --see the timestamps of the traffic dumps below--, but I couldn't post about my intention without a brand-newly compiled Palemoon, could I...--

Code: Select all

1b483d6eff34199c8d866068807c2653296963659a2dab738dc38c6e997568cf  dump_170726_1122_gdO.pcap
82377b55ccc56c9e3faf242bbd260867a51ac34a8cb261e656fea6a806f740f2  dump_170726_1129_gdO.pcap
8853a8940633842df7a209dfd82492b3ba3c01d0a6b460e715f095c38a1fda3c  dump_170726_1133_gdO.pcap
d4db8d74a6cd0a71ef9450d84d7a5b619f74e083966a722a44d763f9efb3cfff  dump_170726_1159_gdO.pcap
And pls. allow time, it's kind of a lot of work... Will link to the (if all goes fine...) new topic from here.

Regards!

miroR
Fanatic
Fanatic
Posts: 116
Joined: 2016-05-31, 19:22

Re: Building Pale Moon on Devuan fails

Unread post by miroR » 2018-02-18, 23:01

miroR wrote:[...]

Code: Select all

[...] dump_170726_1122_gdO.pcap
[...] dump_170726_1129_gdO.pcap
[...]
And pls. allow time, it's kind of a lot of work...
I haven't forgot about this, but I've been overwhelmed w/ other work/issues[1], and still am gasping for time. Sorry!
---
But I've recompiled Pale Moon from sources that Steve Pusser offers on Suse repos:

Code: Select all

Version: 27.7.2 (64-bit)
and I've opened:

Code: Select all

about:config
and set

Code: Select all

javascript.enabled 
to false in the wake of the rampaging exploits based on Spectre and Meltdown...

These instructions work (and thanks to filip who was kind enough to provide the tips. And also because I've persevered in my (often seemingly endless) attemps.
E.g., today it took several hours, and I've had a similar error to this one repeatedly:
Build on Debian
viewtopic.php?t=14051
(
I've had (but I build on another machine in Air-Gapped, can't fetch those lines, will manually copy a little:

Code: Select all

make[2]: *** [client.mk:171: build] Error 2
[...]
make[1]: *** [debian/rules:42: override_dh_auto_build] Error 2
)
and the solution was, setting, e.g. right after the first line:

Code: Select all

export MOZILLA_OFFICIAL=1
of my debian/mozconfig (pls find my last mozconfig in the previous, now a few months old post; I used it this time too), these:

Code: Select all

export CC=gcc-6
export CXX=g++-6
and I was able to compile an SSL-logging Pale Moon.
Apparently some version of gcc-4 and g++-4 wouldn't work fine for my Devuan Ascii/Ceres (corresponds to Debian testing/unstable, I'm half way btwn testing and unstable).
The allow-sslkeylogfile.patch is unchanged as I posted it before. It should have this SHA256 hash:

Code: Select all

e3134595821753904433cff4d6817d706e76c0c91a37024b7150cafc29dd852a  /Cmn/mr/allow-sslkeylogfile.patch
else, sure, check that you copied it right, and the debian/mozconfig has only those two lines that are new I just told you about, and that's it...
Regards!
---
[1] E.g.: I haven't been able to find time to recompile Pale Moon in all these months since I last posted here...
Last edited by miroR on 2018-02-18, 23:10, edited 5 times in total.

User avatar
stevenpusser
Project Contributor
Project Contributor
Posts: 903
Joined: 2015-08-01, 18:33

Re: Building Pale Moon on Devuan fails

Unread post by stevenpusser » 2018-02-20, 19:59

There isn't any gcc-4.X available in the Debian repositories after Jessie. The version in my OBS repository was added because of this. I have been able to compile against gcc-6 in Stretch, Buster, and Ubuntu Artful, but have been told by testers that they are unstable as a result.

miroR
Fanatic
Fanatic
Posts: 116
Joined: 2016-05-31, 19:22

Re: Building Pale Moon on Devuan fails

Unread post by miroR » 2018-02-20, 20:47

stevepusser wrote:There isn't any gcc-4.X available in the Debian repositories after Jessie.
Hmmmhh... But I do have 4.X in my Devuan, and we are based on Debian.
I have been able to compile against gcc-6 in Stretch, Buster, and Ubuntu Artful,
Ah!
but have been told by testers that they are unstable as a result.
Well... But, thanks for the good work with Pale Moon for Linux :thumbup:
Last edited by miroR on 2018-02-20, 20:50, edited 1 time in total.

miroR
Fanatic
Fanatic
Posts: 116
Joined: 2016-05-31, 19:22

Re: Building Pale Moon on Devuan fails

Unread post by miroR » 2018-02-23, 04:36

I thought more, and, after having found out from Steven Pusser that he afterwards had successfully installed Pale Moon with gcc-4.9, and I thought now, maybe the issues that I have, and that I posted lots of details about in:
Installing uBlock Origin breaks Pale Moon on grsec-hardened kernel
viewtopic.php?f=46&t=18389
maybe those issues are due to the gcc-compiler?

Here's the default compiler in my:

Code: Select all

$ lsb_release -a
No LSB modules are available.
Distributor ID: Devuan
Description:    Devuan GNU/Linux unstable (ceres)
Release:        unstable
Codename:       ceres
$
( but it elsewhere reports ascci/ceres or testing/unstable ),
here's the default compiler:

Code: Select all

$ gcc --version
gcc (Debian 7.2.0-19) 7.2.0
Copyright (C) 2017 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
$
and there was no way it would compile Pale Moon. I always ended up with the error summarily explained previously (but I now need to get the logs from my Air-Gapped where I compile and show it in details...)

More details coming.

miroR
Fanatic
Fanatic
Posts: 116
Joined: 2016-05-31, 19:22

Re: Building Pale Moon on Devuan fails

Unread post by miroR » 2018-02-23, 05:07

Have a look. These:

Code: Select all

$ ls -ltr Tmp.d/LOG_/dpkg-buildpackage-d-j4_1802
dpkg-buildpackage-d-j4_180218_131418  dpkg-buildpackage-d-j4_180218_145032  dpkg-buildpackage-d-j4_180218_160452  dpkg-buildpackage-d-j4_180218_180151
dpkg-buildpackage-d-j4_180218_131719  dpkg-buildpackage-d-j4_180218_150102  dpkg-buildpackage-d-j4_180218_161143  dpkg-buildpackage-d-j4_180218_185943
dpkg-buildpackage-d-j4_180218_132654  dpkg-buildpackage-d-j4_180218_150241  dpkg-buildpackage-d-j4_180218_161733  dpkg-buildpackage-d-j4_180218_190247
dpkg-buildpackage-d-j4_180218_133231  dpkg-buildpackage-d-j4_180218_151213  dpkg-buildpackage-d-j4_180218_162309  dpkg-buildpackage-d-j4_180218_193427
dpkg-buildpackage-d-j4_180218_134329  dpkg-buildpackage-d-j4_180218_152151  dpkg-buildpackage-d-j4_180218_165131  dpkg-buildpackage-d-j4_180218_195817
dpkg-buildpackage-d-j4_180218_134958  dpkg-buildpackage-d-j4_180218_152720  dpkg-buildpackage-d-j4_180218_165956  dpkg-buildpackage-d-j4_180218_200631
dpkg-buildpackage-d-j4_180218_142004  dpkg-buildpackage-d-j4_180218_153128  dpkg-buildpackage-d-j4_180218_171039  dpkg-buildpackage-d-j4_180218_201419
dpkg-buildpackage-d-j4_180218_143035  dpkg-buildpackage-d-j4_180218_154144  dpkg-buildpackage-d-j4_180218_172107  dpkg-buildpackage-d-j4_180218_201546
dpkg-buildpackage-d-j4_180218_143329  dpkg-buildpackage-d-j4_180218_154939  dpkg-buildpackage-d-j4_180218_173437  dpkg-buildpackage-d-j4_180218_204734
dpkg-buildpackage-d-j4_180218_144738  dpkg-buildpackage-d-j4_180218_155325  dpkg-buildpackage-d-j4_180218_174015  dpkg-buildpackage-d-j4_180223_040253
mr@gdOv:~$ ls -ltr Tmp.d/LOG_/dpkg-buildpackage-d-j4_1802
and that's on hitting Tab, for bash-completion, after entering that string "ls -ltr Tmp.d/LOG_/dpkg-buildpackage-d-j4_1802" at the Bash prompt...

It's that I log what the standard output while compiling. This is how I compile. (It may not be the exactly the right way, but I don't know better at this time):

Code: Select all

# rm -rf palemoon-27.7.2~repack && \
dpkg-source -x palemoon_27.7.2~repack-1.dsc |& tee /some/where/dpkg-source-x_palemoon_27.7.2_$(date +%y%m%d_%H%M%S) && \
cd palemoon-27.7.2~repack && \
dpkg-buildpackage -d -j4 |& tee /some/where/dpkg-buildpackage-d-j4_$(date +%y%m%d_%H%M%S)
And it's those "$(date +%y%m%d_%H%M%S)" that got me all those logs that Bash-completion shows.

And here's the error when it wouldn't compile, in one of those:

Code: Select all

# tail -30 Tmp.d/LOG_/dpkg-buildpackage-d-j4_180218_193427
 #define MOZALLOC_THROW_BAD_ALLOC MOZALLOC_THROW_BAD_ALLOC_IF_HAS_EXCEPTIONS
                                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../../dist/include/mozilla/mozalloc.h:219:35: note: in expansion of macro ‘MOZALLOC_THROW_BAD_ALLOC’
 void* operator new[](size_t size) MOZALLOC_THROW_BAD_ALLOC
                                   ^~~~~~~~~~~~~~~~~~~~~~~~
libwidget.a.desc
rm -f libwidget.a
/Cmn/src/palemoon-27.7.2~repack/obj-x86_64-pc-linux-gnu/_virtualenv/bin/python /Cmn/src/palemoon-27.7.2~repack/config/expandlibs_gen.py -o libwidget.a.desc nsBaseWidget.o Unified_cpp_widget0.o Unified_cpp_widget1.o Unified_cpp_widget2.o  
make[7]: Leaving directory '/Cmn/src/palemoon-27.7.2~repack/obj-x86_64-pc-linux-gnu/widget'
libdom_xslt_xpath.a.desc
rm -f libdom_xslt_xpath.a
/Cmn/src/palemoon-27.7.2~repack/obj-x86_64-pc-linux-gnu/_virtualenv/bin/python /Cmn/src/palemoon-27.7.2~repack/config/expandlibs_gen.py -o libdom_xslt_xpath.a.desc Unified_cpp_dom_xslt_xpath0.o Unified_cpp_dom_xslt_xpath1.o Unified_cpp_dom_xslt_xpath2.o  
make[7]: Leaving directory '/Cmn/src/palemoon-27.7.2~repack/obj-x86_64-pc-linux-gnu/dom/xslt/xpath'
libeditor_libeditor.a.desc
rm -f libeditor_libeditor.a
/Cmn/src/palemoon-27.7.2~repack/obj-x86_64-pc-linux-gnu/_virtualenv/bin/python /Cmn/src/palemoon-27.7.2~repack/config/expandlibs_gen.py -o libeditor_libeditor.a.desc Unified_cpp_editor_libeditor0.o Unified_cpp_editor_libeditor1.o Unified_cpp_editor_libeditor2.o  
make[7]: Leaving directory '/Cmn/src/palemoon-27.7.2~repack/obj-x86_64-pc-linux-gnu/editor/libeditor'
make[6]: Leaving directory '/Cmn/src/palemoon-27.7.2~repack/obj-x86_64-pc-linux-gnu'
make[5]: *** [/Cmn/src/palemoon-27.7.2~repack/config/recurse.mk:37: compile] Error 2
make[5]: Leaving directory '/Cmn/src/palemoon-27.7.2~repack/obj-x86_64-pc-linux-gnu'
make[4]: *** [/Cmn/src/palemoon-27.7.2~repack/config/rules.mk:541: default] Error 2
make[4]: Leaving directory '/Cmn/src/palemoon-27.7.2~repack/obj-x86_64-pc-linux-gnu'
make[3]: *** [/Cmn/src/palemoon-27.7.2~repack/client.mk:399: realbuild] Error 2
make[3]: Leaving directory '/Cmn/src/palemoon-27.7.2~repack'
make[2]: *** [client.mk:171: build] Error 2
make[2]: Leaving directory '/Cmn/src/palemoon-27.7.2~repack'
make[1]: *** [debian/rules:42: override_dh_auto_build] Error 2
make[1]: Leaving directory '/Cmn/src/palemoon-27.7.2~repack'
make: *** [debian/rules:24: binary] Error 2
dpkg-buildpackage: error: fakeroot debian/rules binary subprocess returned exit status 2
#
There, error explained, finally.


So, those I my tries... Lord, isn't that a lot of time and effort... And only the last ones finally were conducive to successful compilation. With the gcc-6 and g++-6 compilers...
Most of those were with the default compiler in Ascii/Ceres, and which is:

Code: Select all

$ gcc --version
gcc (Debian 7.2.0-19) 7.2.0
Copyright (C) 2017 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Only after sticking the gcc-6 and g++-6 in the debian/mozconfig have I successfully installed it.
And there is not gcc-4 available for me in Devuan Ascii/Ceres.
Again, hitting tab for Bash to tell me what I got:

Code: Select all

$ gcc
gcc           gcc-7         gcc-ar-6      gcc-nm        gcc-nm-7      gcc-ranlib-6  
gcc-6         gcc-ar        gcc-ar-7      gcc-nm-6      gcc-ranlib    gcc-ranlib-7  
$ gcc
And there is no gcc-4 to install here:

Code: Select all

# apt-get install gcc-4
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package gcc-4
# apt-get install gcc-4.9
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package gcc-4.9 is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'gcc-4.9' has no installation candidate
r# apt-get install gcc-4.8
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package gcc-4.8 is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'gcc-4.8' has no installation candidate
#
How do I get it?

Hmmhh... I think it's a question I need to ask on Devuan Forums. And will report back if I, hopefully, get useful advice, and if that may be the reason for the issues that I have in:
Installing uBlock Origin breaks Pale Moon on grsec-hardened kernel
viewtopic.php?f=46&t=18389

Regards!

miroR
Fanatic
Fanatic
Posts: 116
Joined: 2016-05-31, 19:22

Re: Building Pale Moon on Devuan fails

Unread post by miroR » 2018-02-24, 17:36

Pls. refer to:
Palemoon installation from source
https://dev1galaxy.org/viewtopic.php?id=616#p7706
on the issue of compatibility of gcc/g++ versions in different releases in Devuan/Debian.
---
The conclusion about my compilations of these days, I hope it'll be useful for others trying to compile Pale Moon.

Code: Select all

$ ls -ldABRgo palemoon-27.7.2*
-rw-r--r-- 1     10373 2018-02-23 17:39 palemoon_27.7.2~repack-1_amd64.buildinfo
-rw-r--r-- 1      3080 2018-02-23 17:39 palemoon_27.7.2~repack-1_amd64.changes
-rw-r--r-- 1     27392 2018-02-23 17:08 palemoon_27.7.2~repack-1.debian.tar.xz
-rw-r--r-- 1      1258 2018-02-23 17:08 palemoon_27.7.2~repack-1.dsc
drwxr-xr-x 2      4096 2018-02-18 11:51 palemoon_27.7.2~repack.d
-rw-r--r-- 1 127153528 2018-02-01 22:10 palemoon_27.7.2~repack.orig.tar.xz
$ ls -ldABRgo palemoon_27.7.2~repack*
drwxr-xr-x 53 4096 2018-02-23 17:39 palemoon-27.7.2~repack
-rw-r--r--  1  908 2018-02-18 12:19 palemoon-27.7.2~repack_allow-sslkelogfile.patch
$ ls -lABRgo allow-sslkelogfile.patch
-rw-r--r-- 1 908 2018-02-18 12:19 allow-sslkelogfile.patch
$
I'm not even sure what made it keep my patch at every new try, but I only once, more than 3-4 days ago now, patched the source with quilt with my allow-sslkeylog-file.patch, as explained earlier in this topic. Also the entire method is explained earlier in this topic. Just for the reader to get the gist, I'll recount the routine that I used for the past few days.

So that above is what I got in a dir where I have all the necessary perms, which actually
dget http://download.opensuse.org/repositori ... estion.dsc
command got me, and with grsecurity RBAC rules set to allow the compiling and all (that's a broader issue, but for those who use grsec, and for those who will be using grsecunoff in the future, as we hope that the project will continue, there's plenty on setting RBAC rules on https://forums.grsecurity.net/).

And in particular I don't know at this time, whether the:

Code: Select all

palemoon-27.7.2~repack_allow-sslkelogfile.patch
was necessary at all. But it's just a copy of allow-sslkeylog-file.patch.

Anyway this was my routine for days:

Code: Select all

$ rm -rf palemoon-27.7.2~repack && \
        dpkg-source -x palemoon_27.7.2~repack-1.dsc |& \
        tee ~mr/LOG_/dpkg-source-x_palemoon_27.7.2_$(date +%y%m%d_%H%M%S)_5 && ask; \
        if [ "$?" == 0 ]; then cd palemoon-27.7.2~repack && dpkg-buildpackage -d -j4 |& \
                tee ~mr/LOG_/dpkg-buildpackage-d-j4_$(date +%y%m%d_%H%M%S) ; \
        fi
I prettified it a little for easier perusing, but I actually used it all as just one line.

The if condition is there to allow me to check up on the sources before I start building it. The ask is souced in my .bashrc:

Code: Select all

$ cat .bashrc
...
source ~/.bashrc.ask
...
And the .bashrc.ask looks like this (it's from Mendel Cooper Advanced Bash Scripting Guide, just apt-get install abs-guide):

Code: Select all

function ask()
{
    echo -n "$@" '[y/n] ' ; read ans
    case "$ans" in
        y*|Y*) return 0 ;;
        *) return 1 ;;
    esac
}
So, before confirming with Y/y/Yes or similar to start compiling, I check up on the changes I made to the debian/mozconfig or anything other. E.g. it needed to have:

Code: Select all

$ cat palemoon-27.7.2~repack/debian/mozconfig | grep 'gcc\|g++'
export CC=gcc-4.9
export CXX=g++-4.9
for Pale Moon to compile correctly.

If the next time (which may not be soon) I use that method I notice there are any typoes, I'll be back to correct it (here in some future post, or even in another topic by me that should contain strings "compile" or "compiling", or build/building [Pale Moon, of course], or such, on this forum).

The thing is, even though I kept unpacking the sources all anew, the quilt somehow would always reapply my patch, as you can see from the logs that that command one-liner above tee's into for me in a dedicated dir in my homedir.

Here are some:
$ cat LOG_/dpkg-source-x_palemoon_27.7.2_180223_135158_5

Code: Select all

dpkg-source: warning: extracting unsigned source package (palemoon_27.7.2~repack-1.dsc)
dpkg-source: info: extracting palemoon in palemoon-27.7.2~repack
dpkg-source: info: unpacking palemoon_27.7.2~repack.orig.tar.xz
dpkg-source: info: unpacking palemoon_27.7.2~repack-1.debian.tar.xz
dpkg-source: info: applying allow-sslkelogfile.patch
And here I check it up if all is ready and then:
$ cat LOG_/dpkg-buildpackage-d-j4_180223_135223

Code: Select all

dpkg-buildpackage: info: source package palemoon
dpkg-buildpackage: info: source version 27.7.2~repack-1
dpkg-buildpackage: info: source distribution obs
dpkg-buildpackage: info: source changed by Steven Pusser <stevep@mxlinux.org>
 dpkg-source --before-build palemoon-27.7.2~repack
dpkg-buildpackage: info: host architecture amd64
 fakeroot debian/rules clean
dh clean --parallel
   debian/rules override_dh_auto_clean
make[1]: Entering directory '/some/where/palemoon-27.7.2~repack'
rm -f mozconfig
dh_auto_clean
make[1]: Leaving directory '/some/where/palemoon-27.7.2~repack'
   dh_clean -O--parallel
 dpkg-source -b palemoon-27.7.2~repack
dpkg-source: info: using source format '3.0 (quilt)'
dpkg-source: info: building palemoon using existing ./palemoon_27.7.2~repack.orig.tar.xz
dpkg-source: info: building palemoon in palemoon_27.7.2~repack-1.debian.tar.xz
dpkg-source: info: building palemoon in palemoon_27.7.2~repack-1.dsc
 debian/rules build
make: 'build' is up to date.
 fakeroot debian/rules binary
dh binary --parallel
   dh_update_autotools_config -O--parallel
   debian/rules override_dh_auto_configure
make[1]: Entering directory '/some/where/palemoon-27.7.2~repack'
cp debian/mozconfig mozconfig
make[1]: Leaving directory '/some/where/palemoon-27.7.2~repack'
   debian/rules override_dh_auto_build
make[1]: Entering directory '/some/where/palemoon-27.7.2~repack'
make -f client.mk build
make[2]: Entering directory '/some/where/palemoon-27.7.2~repack'
[...]
copying build/lib.linux-x86_64-2.7/_psutil_linux.so -> 
copying build/lib.linux-x86_64-2.7/_psutil_posix.so -> 

checking Python environment is Mozilla virtualenv... yes
checking for perl5... no
checking for perl... /usr/bin/perl
checking for objcopy... /usr/bin/objcopy
checking for gcc... gcc-4.9
checking whether the C compiler (gcc-4.9 -g -O2 ) works... yes
checking whether the C compiler (gcc-4.9 -g -O2 ) is a cross-compiler... no
checking whether we are using GNU C... yes
checking whether gcc-4.9 accepts -g... yes
checking for c++... g++-4.9
checking whether the C++ compiler (g++-4.9 -g -O2 ) works... yes
checking whether the C++ compiler (g++-4.9 -g -O2 ) is a cross-compiler... no
checking whether we are using GNU C++... yes
checking whether g++-4.9 accepts -g... yes
See above? And if you have:

Code: Select all

checking whether g++-6 accepts -g... yes
you get a Pale Moon with segmentation faults that I had for months now (I'm still testing, but that's what appears to me to be the reason, for even old segfaults that I metioned earlier in this topic)

Code: Select all

[...]
Here I skip about one thousand lines. To show where SSLKEYLOGFILE support begins to compile:

Code: Select all

[...]
make[7]: Entering directory '/some/where/palemoon-27.7.2~repack/obj-x86_64-pc-linux-gnu/config/external/nss'
LDFLAGS=-Wl,--build-id make -C /some/where/palemoon-27.7.2~repack/security/nss/lib private_export  CC=' gcc-4.9' SOURCE_MD_DIR=/some/where/palemoon-27.7.2~repack/obj-x86_64-pc-linux-gnu/dist SOURCE_MDHEADERS_DIR=/some/where/palemoon-27.7.2~repack/obj-x86_64-pc-linux-gnu/dist/include/nspr DIST=/some/where/palemoon-27.7.2~repack/obj-x86_64-pc-linux-gnu/dist NSPR_INCLUDE_DIR=/some/where/palemoon-27.7.2~repack/obj-x86_64-pc-linux-gnu/dist/include/nspr NSPR_LIB_DIR=/some/where/palemoon-27.7.2~repack/obj-x86_64-pc-linux-gnu/dist/lib MOZILLA_CLIENT=1 NO_MDUPDATE=1 NSS_ENABLE_ECC=1 NSS_ENABLE_TLS_1_3=1 SQLITE_LIB_NAME=mozsqlite3 SQLITE_INCLUDE_DIR=/some/where/palemoon-27.7.2~repack/obj-x86_64-pc-linux-gnu/dist/include topsrcdir='/some/where/palemoon-27.7.2~repack' BUILD='/some/where/palemoon-27.7.2~repack/obj-x86_64-pc-linux-gnu/security/$(subst $(topsrcdir)/security/,,$(CURDIR))' BUILD_TREE='$(BUILD)' OBJDIR='$(BUILD)' DEPENDENCIES='$(BUILD)/.deps' SINGLE_SHLIB_DIR='$(BUILD)' SOURCE_XP_DIR=/some/where/palemoon-27.7.2~repack/obj-x86_64-pc-linux-gnu/dist BUILD_OPT=1 OPT_CODE_SIZE=1 NS_USE_GCC=1 USE_64=1 NSS_SSL_ENABLE_ZLIB= PROGRAMS= CHECKLOC= FREEBL_NO_DEPEND=0 FREEBL_LOWHASH=1 NSS_ALLOW_SSLKEYLOGFILE=1 NSS_NO_PKCS11_BYPASS=1 PUBLIC_EXPORT_DIR='/some/where/palemoon-27.7.2~repack/obj-x86_64-pc-linux-gnu/dist/include/$(MODULE)' SOURCE_XPHEADERS_DIR='$(SOURCE_XP_DIR)/include/$(MODULE)' MODULE_INCLUDES='$(addprefix -I$(SOURCE_XP_DIR)/include/,$(REQUIRES))' MAKE_OBJDIR='$(INSTALL) -D $(OBJDIR)' TARGETS='$(LIBRARY) $(SHARED_LIBRARY) $(PROGRAM)' NSS_ENABLE_WERROR=0 NSINSTALL='/some/where/palemoon-27.7.2~repack/obj-x86_64-pc-linux-gnu/config/nsinstall' 
[...]
Maybe some 16000 lines I skip here.

Code: Select all

[...]
WARNING: Found 39 duplicated files taking 816463 bytes (uncompressed)
../../config/nsinstall -D /some/where/palemoon-27.7.2~repack/debian/palemoon/usr/lib/palemoon
(cd ../../dist/palemoon && tar --exclude=precomplete --exclude=.mkdir.done -chf - .) | \
  (cd /some/where/palemoon-27.7.2~repack/debian/palemoon/usr/lib/palemoon && tar -xf -)
../../config/nsinstall -D /some/where/palemoon-27.7.2~repack/debian/palemoon/usr/bin
rm -f -f /some/where/palemoon-27.7.2~repack/debian/palemoon/usr/bin/palemoon
ln -s /usr/lib/palemoon/palemoon /some/where/palemoon-27.7.2~repack/debian/palemoon/usr/bin
../../config/nsinstall -D /some/where/palemoon-27.7.2~repack/debian/palemoon/usr/include/palemoon-27.7.2
(cd ../../dist/include && tar --exclude=.mkdir.done -chf - .) | \
  (cd /some/where/palemoon-27.7.2~repack/debian/palemoon/usr/include/palemoon-27.7.2 && tar -xf -)
../../config/nsinstall -D /some/where/palemoon-27.7.2~repack/debian/palemoon/usr/share/idl/palemoon-27.7.2
(cd ../../dist/idl && tar --exclude=.mkdir.done -chf - .) | \
  (cd /some/where/palemoon-27.7.2~repack/debian/palemoon/usr/share/idl/palemoon-27.7.2 && tar -xf -)
../../config/nsinstall -D /some/where/palemoon-27.7.2~repack/debian/palemoon/usr/lib/palemoon-devel/sdk/lib
../../config/nsinstall -D /some/where/palemoon-27.7.2~repack/debian/palemoon/usr/lib/palemoon-devel/sdk/bin
if test -f ../../dist/include/xpcom-config.h; then \
  ../../config/nsinstall -t -m 644 ../../dist/include/xpcom-config.h /some/where/palemoon-27.7.2~repack/debian/palemoon/usr/lib/palemoon-devel; \
fi
[...]
I don't know if this is anything to worry about, but I got lots of these lines:

Code: Select all

[...]
make[1]: Entering directory '/some/where/palemoon-27.7.2~repack'
dh_shlibdeps -l /usr/lib/palemoon
dpkg-shlibdeps: warning: can't extract name and version from library name 'libnspr4.so'
dpkg-shlibdeps: warning: can't extract name and version from library name 'libnspr4.so'
[...]
dpkg-shlibdeps: warning: can't extract name and version from library name 'libmozalloc.so'
dpkg-shlibdeps: warning: can't extract name and version from library name 'libmozalloc.so'
[...]
dpkg-shlibdeps: warning: can't extract name and version from library name 'libplds4.so'
[...]
dpkg-shlibdeps: warning: can't extract name and version from library name 'libplc4.so'
[...]
dpkg-shlibdeps: warning: can't extract name and version from library name 'libxul.so'
dpkg-shlibdeps: warning: can't extract name and version from library name 'libnssutil3.so'
[...]
dpkg-shlibdeps: warning: can't extract name and version from library name 'libnspr4.so'
dpkg-shlibdeps: warning: can't extract name and version from library name 'libnssutil3.so'
[...]
dpkg-shlibdeps: warning: can't extract name and version from library name 'libxul.so'
dpkg-shlibdeps: warning: package could avoid a useless dependency if debian/palemoon/usr/lib/palemoon/browser/components/libbrowsercomps.so debian/palemoon/usr/lib/palemoon/libxul.so were not linked against libatk-1.0.so.0 (they use none of the library's symbols)
dpkg-shlibdeps: warning: package could avoid a useless dependency if debian/palemoon/usr/lib/palemoon/browser/components/libbrowsercomps.so debian/palemoon/usr/lib/palemoon/libxul.so were not linked against libpangoft2-1.0.so.0 (they use none of the library's symbols)
dpkg-shlibdeps: warning: package could avoid a useless dependency if debian/palemoon/usr/lib/palemoon/browser/components/libbrowsercomps.so debian/palemoon/usr/lib/palemoon/libxul.so were not linked against libpangocairo-1.0.so.0 (they use none of the library's symbols)
make[1]: Leaving directory '/some/where/palemoon-27.7.2~repack'
   dh_installdeb -O--parallel
   dh_gencontrol -O--parallel
   dh_md5sums -O--parallel
   debian/rules override_dh_builddeb
make[1]: Entering directory '/some/where/palemoon-27.7.2~repack'
dh_builddeb -- -Z xz
dpkg-deb: building package 'palemoon' in '../palemoon_27.7.2~repack-1_amd64.deb'.
make[1]: Leaving directory '/some/where/palemoon-27.7.2~repack'
 dpkg-genbuildinfo
 dpkg-genchanges  >../palemoon_27.7.2~repack-1_amd64.changes
dpkg-genchanges: info: including full source code in upload
 dpkg-source --after-build palemoon-27.7.2~repack
 signfile palemoon_27.7.2~repack-1.dsc
dpkg-buildpackage: info: full upload (original source is included)
gpg: skipped "Steven Pusser <stevep@mxlinux.org>": No secret key
gpg: dpkg-sign.eD2uUcdg/palemoon_27.7.2~repack-1.dsc: clear-sign failed: No secret key
dpkg-buildpackage: error: failed to sign .dsc file
And it got me the package that I was able to install:

Code: Select all

# cd ../
# dpkg -i palemoon_27.7.2~repack-1_amd64.deb
As can be seen in the video, and the video is verified via the network trace taken, the SSL-logging made possible with my patch, at:
Pale Moon and uBlock0 on a grsec-hardened kernel 3
https://www.croatiafidelis.hr/foss/cap/ ... ock0-3.php
all the addons can now be installed without issues. Well, so far it appears to be the case.

Regards!
Last edited by miroR on 2018-02-24, 18:08, edited 1 time in total.

miroR
Fanatic
Fanatic
Posts: 116
Joined: 2016-05-31, 19:22

Re: Building Pale Moon on Devuan fails

Unread post by miroR » 2018-02-24, 17:43

As far as demo of SSL-key logging in practice, pls. see how to extract what you download (but you do need to get your hands dirty, and your mind to work :) ):
got to this related other topic of mine (whre at the onset I really didn't know what caused the bad segmentation fault there):
Installing uBlock Origin breaks Pale Moon on grsec-hardened kernel
viewtopic.php?f=46&t=18389
All explained there, and in the very first post, with the network trace and the video being here:
Pale Moon and uBlock0 on a grsec-hardened kernel
https://www.croatiafidelis.hr/foss/cap/ ... n-uBlock0/

Regards!

miroR
Fanatic
Fanatic
Posts: 116
Joined: 2016-05-31, 19:22

Re: Building Pale Moon on Devuan fails

Unread post by miroR » 2018-04-03, 18:40

This topic is not a tutorial on how to compile Pale Moon in Linux, because I learned as I was going, so it's not clear cut and easy to read, but in this topic there's all that is needed to compile Pale Moon in this (or similar) particular way. And I hope it is/will be useful to other (future) users of Pale Moon.

But there's more, however only for advanced users at this time.

Over at my new repo:
https://www.croatiafidelis.hr/foss/dev1miro/
there's Pale Moon that could make a difference (I'd hope) for some users.

That is a new topic to make, I'd say, it has nothing to do with Pale Moon failing to build...

And the new topic is:
A Pale Moon repo for Devuan/Debian
viewtopic.php?f=37&t=18805

Regards!

User avatar
Moonraker
Board Warrior
Board Warrior
Posts: 1878
Joined: 2015-09-30, 23:02
Location: uk.

Re: Building Pale Moon on Devuan fails

Unread post by Moonraker » 2018-04-03, 18:44

Incredible work.
This should be a sticky for sure.
user of multiple puppy linuxes..upup,fossapup.scpup,xenialpup..... :thumbup:

Pale moon 29.4.1

miroR
Fanatic
Fanatic
Posts: 116
Joined: 2016-05-31, 19:22

Re: Building Pale Moon on Devuan fails

Unread post by miroR » 2018-04-03, 19:59

Moonraker wrote:Incredible work.
This should be a sticky for sure.
:roll: Well it is somewhat useful... but it's too much wondering... And the thanks surely go to filip as well as my fellow Gentoo-er Walter Dnes (I'm a former, and I hope future too) long time Gentoo user, who I heavily borrowed from, esp. the mozconfig (but in the repo I made it leaner yet: no dbus whatsoever, and everything works, including pure alsa audio!)
---
This topic is solved completely by now. The months long issue was because of compiling not with gcc-4.x and g++-4x, and for a non-so-advanced user that I am it wasn't obvious for that long... :silent:
To be able to abandon this topic (unless somebody going this way need an advice upon studying the methods deployed here, but patience then, I am not around all the time)... I only want to point to where I promised I would make a digression, earlier on this page:
viewtopic.php?f=57&t=15751&p=138385#p118263
miroR wrote:[...]

Code: Select all

Version: 27.4.0 (64-bit)
[...]
As far as that SSL-key logging in question, I've decided to try and prepare (now that I got Apache for testing offline working in my Devuan) samples to demostrate things.

Not just because of filip's wonderment, no! But you'll see.

I'll have to open a new topic about it, because it would be off topic here. But since I gotta go now (been compiling the whole day :( ... well also grsec kernel...), I thought I'd only make the data that I'll post and link from the other topic more credible --I'm already running late by half a day --see the timestamps of the traffic dumps below--, but I couldn't post about my intention without a brand-newly compiled Palemoon, could I...--

Code: Select all

1b483d6eff34199c8d866068807c2653296963659a2dab738dc38c6e997568cf  dump_170726_1122_gdO.pcap
82377b55ccc56c9e3faf242bbd260867a51ac34a8cb261e656fea6a806f740f2  dump_170726_1129_gdO.pcap
8853a8940633842df7a209dfd82492b3ba3c01d0a6b460e715f095c38a1fda3c  dump_170726_1133_gdO.pcap
d4db8d74a6cd0a71ef9450d84d7a5b619f74e083966a722a44d763f9efb3cfff  dump_170726_1159_gdO.pcap
And pls. allow time, it's kind of a lot of work... Will link to the (if all goes fine...) new topic from here.

Regards!
Here's some incomplete, still unfinished analysis, with PCAPs and screencasts of that time:
How is This gzip'd Stuff gunzip'd?
https://www.croatiafidelis.hr/foss/cap/ ... -ssl-gzip/
and if I do make a new topic on Pale Moon forum, you'll find the link there.
(I'm only doing what I can, setting up the repo, the news of this day, was a lot of non-trivial work...)
Regards!
Last edited by miroR on 2018-04-03, 20:08, edited 3 times in total.

miroR
Fanatic
Fanatic
Posts: 116
Joined: 2016-05-31, 19:22

Re: Building Pale Moon on Devuan fails

Unread post by miroR » 2018-07-26, 19:16

If nobody objects, I'd like to leave this topic to be closed or close itself, through my inaction or otherwise.
I still have issues building Pale Moon, and I have opened a new topic:
Building Pale Moon on Devuan fails 2
viewtopic.php?f=37&t=19763

Sincere regards! Keep bathing in the Moon light! :D

Locked