Step-by-step instructions for linux build?
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!
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!
-
- Astronaut
- Posts: 652
- Joined: 2015-07-30, 20:29
- Location: Vaughan, ON, Canada
Step-by-step instructions for linux build?
IANAD (I Am Not A Developer). I'm capable of following basic instructions and doing
./configure --with-this --without-that && make && make install
...and stuff like that. The build instructions at https://www.palemoon.org/sourcecode.shtml are Windows-oriented, and don't include the git pull stuff. Based on other stuff I've built, it should go something like...
(1st time only)
git clone something
The actual build script would contain
=====================
cd my_build_dir
git pull
make clean
PREFIX=${HOME}/.local
CFLAGS="my_flags"
./configure --with-this-feature --without-that-feature etc, etc
make
make install
Can someone please fill in the script for me?
./configure --with-this --without-that && make && make install
...and stuff like that. The build instructions at https://www.palemoon.org/sourcecode.shtml are Windows-oriented, and don't include the git pull stuff. Based on other stuff I've built, it should go something like...
(1st time only)
git clone something
The actual build script would contain
=====================
cd my_build_dir
git pull
make clean
PREFIX=${HOME}/.local
CFLAGS="my_flags"
./configure --with-this-feature --without-that-feature etc, etc
make
make install
Can someone please fill in the script for me?
There's a right way
There's a wrong way
And then there's my way
There's a wrong way
And then there's my way
Re: Step-by-step instructions for linux build?
Yeah.. apparently you didn't bother to read the build instructions for linux on the Pale Moon for Linux website and also assume a mozilla-based codebase is just like any other program. Easy mistake to make for the latter.. not so much for the former.
Consult: http://linux.palemoon.org/help/build/ You can also cross-reference MDN as well. It is actually pretty easy.
Though I must ask why you want to build Pale Moon from source. What distro are you on and what is wrong with the generic package we release?
Consult: http://linux.palemoon.org/help/build/ You can also cross-reference MDN as well. It is actually pretty easy.
Though I must ask why you want to build Pale Moon from source. What distro are you on and what is wrong with the generic package we release?
-
- Astronaut
- Posts: 652
- Joined: 2015-07-30, 20:29
- Location: Vaughan, ON, Canada
Re: Step-by-step instructions for linux build?
Sorry, I was looking at the wrong page.Matt A Tobin wrote:Yeah.. apparently you didn't bother to read the build instructions for linux on the Pale Moon for Linux website and also assume a mozilla-based codebase is just like any other program. Easy mistake to make for the latter.. not so much for the former.
Yikes! That brings back memories of building Mozilla 0.9 (showing my age here). It hasn't changed in all those years. Only one question; what is "scl enable devtoolset-1.1"? Something Centos-specific?Matt A Tobin wrote:Consult: http://linux.palemoon.org/help/build/ You can also cross-reference MDN as well. It is actually pretty easy.
I'm on Gentoo linux. I have a desktop, and an ancient 32-bit-only Atom netbook. I was surprised to find that the Atom version links against dev-libs/dbus-glib (Gentoo name). While Gentoo CPU flag optimization is nice, the real attraction of Gentoo is "USE flags". I.e. I can decide which optional dependancies I do and do not want. E.g. for my Seamonkey build, I've disabled chatzilla, dbus, gstreamer, ipc, pulseaudio, roaming, startup-notification, and wifi. Let's just say I want a semi-minimal package customized to my needs. I don't expect you guys to come up with a build to my specs. That's why I'm asking how I can do-it-myself.Matt A Tobin wrote:Though I must ask why you want to build Pale Moon from source. What distro are you on and what is wrong with the generic package we release?
I have Gentoo's cross-compiler installed on my desktop (64bit) to build for my Atom (32bit). Given that Gentoo builds almost everything from source, a cross-compiler is pretty well necessary on my setup. Let's see if I have this right...
mkdir pmsrc
wget ftp://source:current@ftp.palemoon.org/p ... -source.7z
(extract the contents of the .7z file to directory pmsrc)
(create mozconfig,txt and build.sh as per http://linux.palemoon.org/help/build/ although my mozconfig.txt will be quite different)
./build.sh (will it run properly without "scl enable devtoolset-1.1"?)
There's a right way
There's a wrong way
And then there's my way
There's a wrong way
And then there's my way
-
- Astronaut
- Posts: 652
- Joined: 2015-07-30, 20:29
- Location: Vaughan, ON, Canada
Re: Step-by-step instructions for linux build?
Oh yeah, the version number will change. Consult https://www.palemoon.org/sourcecode.shtml for the current version
There's a right way
There's a wrong way
And then there's my way
There's a wrong way
And then there's my way
Re: Step-by-step instructions for linux build?
I just tried to find these instructions. It took me a few minutes, even when I knew what to look for.Matt A Tobin wrote:Yeah.. apparently you didn't bother to read the build instructions for linux on the Pale Moon for Linux website and also assume a mozilla-based codebase is just like any other program. Easy mistake to make for the latter.. not so much for the former.
This is not easy to find, especially since Windows build instructions are under Download > Source code (Well... actually the proper instructions are on the forum, but whatever...) while the Linux instructions are under Help, on the Linux-specific site, which you get to by going through the Download menu on the main site.
If I were doing it, there would be an entry in the FAQ on the main site, "How do I build Pale Moon?", with links to the Windows and Linux instructions. Or, a direct "Building Pale Moon" under Help on the main site, with links to Win and Linux. Having to go to the Linux-specific site through something called "Download" to then look under Help is not an intuitive journey...
-
- Astronaut
- Posts: 652
- Joined: 2015-07-30, 20:29
- Location: Vaughan, ON, Canada
Re: Step-by-step instructions for linux build?
One suggestion. The line...
mk_add_options MOZ_OBJDIR=/home/$USER/pmbuild/
in mozconfig.txt assumes the directory structure is standard like "/home/johnsmith". On some large multi-user systems, that may not be the case. I believe that...
mk_add_options MOZ_OBJDIR=$HOME/pmbuild/
is more generic, and covers the all bases better.
mk_add_options MOZ_OBJDIR=/home/$USER/pmbuild/
in mozconfig.txt assumes the directory structure is standard like "/home/johnsmith". On some large multi-user systems, that may not be the case. I believe that...
mk_add_options MOZ_OBJDIR=$HOME/pmbuild/
is more generic, and covers the all bases better.
There's a right way
There's a wrong way
And then there's my way
There's a wrong way
And then there's my way
-
- Contributing developer
- Posts: 1742
- Joined: 2013-05-20, 18:19
- Location: Somewhere in Sector 001
Re: Step-by-step instructions for linux build?
That should do it! You will also need to create a "pmbuild" folder, because build.sh will fail if it doesn't find it. "scl enable devtoolset-1.1" refers to the Red Hat Developer Toolset, which we use because it provides a newer version of GCC than what comes with CentOS 6. You can just execute the build.sh normally and it will use your system installed compiler.Walter Dnes wrote:Let's see if I have this right...
mkdir pmsrc
wget ftp://source:current@ftp.palemoon.org/p ... -source.7z
(extract the contents of the .7z file to directory pmsrc)
(create mozconfig,txt and build.sh as per http://linux.palemoon.org/help/build/ although my mozconfig.txt will be quite different)
./build.sh (will it run properly without "scl enable devtoolset-1.1"?)
-
- Astronaut
- Posts: 652
- Joined: 2015-07-30, 20:29
- Location: Vaughan, ON, Canada
Re: Step-by-step instructions for linux build?
Here's what I have so far for my mozconfig.txt...
=========================================
# Please note the restrictions on official branding when using this line.
ac_add_options --enable-official-branding
export MOZILLA_OFFICIAL=1
mk_add_options MOZ_CO_PROJECT=browser
ac_add_options --enable-application=browser
mk_add_options MOZ_OBJDIR=/home/$USER/palemoon/pmbuild/
ac_add_options --disable-installer
ac_add_options --disable-updater
ac_add_options --disable-tests
ac_add_options --disable-mochitests
ac_add_options --disable-debug
ac_add_options --enable-strip
ac_add_options --enable-optimize="-O2 -mfxsr -mmmx -msse -msse2 -mssse3 -mfpmath=sse -fomit-frame-pointer -pipe -fno-unwind-tables -fno-asynchronous-unwind-tables"
ac_add_options --target=i686-pc-linux
ac_add_options --x-libraries=/usr/lib
ac_add_options --disable-application=b2g
ac_add_options --disable-elf-hack
ac_add_options --disable-jemalloc
ac_add_options --disable-valgrind
=========================================
The various flags come from /proc/cpuinfo and my Gentoo CFLAGS. The 2 no-unwind options are explained in an email discussion at http://permalink.gmane.org/gmane.linux.busybox/36700
Gentoo has flags for preventing Seamonkey from linking to and/or enabling chatzilla dbus gstreamer ipc pulseaudio roaming startup-notification wifi. What are the equivalant options here?
=========================================
# Please note the restrictions on official branding when using this line.
ac_add_options --enable-official-branding
export MOZILLA_OFFICIAL=1
mk_add_options MOZ_CO_PROJECT=browser
ac_add_options --enable-application=browser
mk_add_options MOZ_OBJDIR=/home/$USER/palemoon/pmbuild/
ac_add_options --disable-installer
ac_add_options --disable-updater
ac_add_options --disable-tests
ac_add_options --disable-mochitests
ac_add_options --disable-debug
ac_add_options --enable-strip
ac_add_options --enable-optimize="-O2 -mfxsr -mmmx -msse -msse2 -mssse3 -mfpmath=sse -fomit-frame-pointer -pipe -fno-unwind-tables -fno-asynchronous-unwind-tables"
ac_add_options --target=i686-pc-linux
ac_add_options --x-libraries=/usr/lib
ac_add_options --disable-application=b2g
ac_add_options --disable-elf-hack
ac_add_options --disable-jemalloc
ac_add_options --disable-valgrind
=========================================
The various flags come from /proc/cpuinfo and my Gentoo CFLAGS. The 2 no-unwind options are explained in an email discussion at http://permalink.gmane.org/gmane.linux.busybox/36700
Gentoo has flags for preventing Seamonkey from linking to and/or enabling chatzilla dbus gstreamer ipc pulseaudio roaming startup-notification wifi. What are the equivalant options here?
There's a right way
There's a wrong way
And then there's my way
There's a wrong way
And then there's my way
-
- Astronaut
- Posts: 652
- Joined: 2015-07-30, 20:29
- Location: Vaughan, ON, Canada
Re: Step-by-step instructions for linux build?
The build didn't like "ac_add_options --disable-application=b2g" in mozconfig.txt, and failed. So I commented out the line. It got further. This time it died on...
"configure:18800: checking for dbus-glib-1 >= 0.60"
Why is this necessary? Under Gentoo, Firefox can be built without dbus egl gmp-autoupdate gstreamer pulseaudio startup-notification wifi. What are the equivalant options here?
"configure:18800: checking for dbus-glib-1 >= 0.60"
Why is this necessary? Under Gentoo, Firefox can be built without dbus egl gmp-autoupdate gstreamer pulseaudio startup-notification wifi. What are the equivalant options here?
There's a right way
There's a wrong way
And then there's my way
There's a wrong way
And then there's my way
Re: Step-by-step instructions for linux build?
Not everything has an option but Perhaps you should look into configure.in its self and see what you can find.
You never did answer me as to why you want to build it from source when our generic package via the installer should do the trick.
You never did answer me as to why you want to build it from source when our generic package via the installer should do the trick.
-
- Astronaut
- Posts: 652
- Joined: 2015-07-30, 20:29
- Location: Vaughan, ON, Canada
Re: Step-by-step instructions for linux build?
Thanks. I'll dig through that. By the way, could you provide me with the mozconfig.txt, etc, that you use to generate the 32-bit Atom optimized build? That'll have a large chunk of optimization done already.Matt A Tobin wrote:Not everything has an option but Perhaps you should look into configure.in its self and see what you can find.
I guess I didn't make myself clear enough. I want to make a minimal build for my 32-bit Atom netbook. More minimal than the Atom-optimized version at http://linux.palemoon.org/files/atom/25 ... 86.tar.bz2 Plus I want to optimize it for MY netbook, with the CPU flags that it supports.Matt A Tobin wrote:Matt A Tobin wrote:You never did answer me as to why you want to build it from source when our generic package via the installer should do the trick.
There's a right way
There's a wrong way
And then there's my way
There's a wrong way
And then there's my way
-
- Astronaut
- Posts: 652
- Joined: 2015-07-30, 20:29
- Location: Vaughan, ON, Canada
Re: Step-by-step instructions for linux build?
After poring through configure.in, I went hacking and slashing. Here's mozconfig.txt. Note that I did this on the netbook, with "-march=native"to ensure that there were no problems with the cross-compiler. The compile soon died but threw multiple errors along the way. The first 2 errors referenced "ldnet". I've gzipped config.log and attached it. All sorts of weird stuff, including...
gcc: error: unrecognized command line option '-fno-integrated-as'
Can anybody make sense of it? mozconfig.txt listed below
gcc: error: unrecognized command line option '-fno-integrated-as'
Can anybody make sense of it? mozconfig.txt listed below
Code: Select all
# Please note the restrictions on official branding when using this line.
ac_add_options --enable-official-branding
export MOZILLA_OFFICIAL=1
export IBMBIDI=0
mk_add_options MOZ_CO_PROJECT=browser
ac_add_options --enable-application=browser
mk_add_options MOZ_OBJDIR=/home/$USER/palemoon/pmbuild/
ac_add_options --disable-installer
ac_add_options --disable-updater
ac_add_options --disable-tests
ac_add_options --disable-mochitests
ac_add_options --disable-debug
ac_add_options --enable-strip
ac_add_options --enable-optimize="-O2 -march=native -mfpmath=sse -fomit-frame-pointer -pipe -fno-unwind-tables -fno-asynchronous-unwind-tables"
ac_add_options --target=i686-pc-linux
ac_add_options --x-libraries=/usr/lib
ac_add_options --disable-elf-hack
ac_add_options --disable-jemalloc
ac_add_options --disable-valgrind
ac_add_options --disable-dbus
ac_add_options --disable-profiling
ac_add_options --with-pthreads
ac_add_options --disable-startup-notification
ac_add_options --disable-pango
ac_add_options --disable-gio
ac_add_options --disable-gconf
ac_add_options --disable-gnomeui
ac_add_options --disable-websms-backend
ac_add_options --disable-jsd
#WebRTC can be a security problem
ac_add_options --disable-webrtc
ac_add_options --disable-webspeech
ac_add_options --enable-ogg
ac_add_options --enable-webm
ac_add_options --without-system-libvpx
ac_add_options --disable-pulseaudio
ac_add_options --disable-gstreamer
ac_add_options --enable-libjpeg-turbo
ac_add_options --disable-safe-browsing
ac_add_options --disable-url-classifier
ac_add_options --disable-mobile-optimize
ac_add_options --enable-elf-dynstr-gc
ac_add_options --disable-necko-wifi
You do not have the required permissions to view the files attached to this post.
There's a right way
There's a wrong way
And then there's my way
There's a wrong way
And then there's my way
Re: Step-by-step instructions for linux build?
Which version of gcc are you using? Do you have all the necessary headers installed?
The .mozconfig you seem to be using also looks like a dump of all --disable-* you could find, and I'm not sure if things like --without-system-libvpx, --enable-elf-dynstr-gc and --disable-elf-hack make any sense. (The first one is redundant, the last two are not very commonly used and IIRC were generally used in the Firefox 3.* era). Try using the official .mozconfig, which you can find under about:buildconfig of the respective builds.
The .mozconfig you seem to be using also looks like a dump of all --disable-* you could find, and I'm not sure if things like --without-system-libvpx, --enable-elf-dynstr-gc and --disable-elf-hack make any sense. (The first one is redundant, the last two are not very commonly used and IIRC were generally used in the Firefox 3.* era). Try using the official .mozconfig, which you can find under about:buildconfig of the respective builds.
-
- Astronaut
- Posts: 652
- Joined: 2015-07-30, 20:29
- Location: Vaughan, ON, Canada
Re: Step-by-step instructions for linux build?
i686-pc-linux-gnu-4.9.3 and given that Gentoo builds everything except proprietary binaries (Flash, etc), I hope that it's got necessary headers.squarefractal wrote:Which version of gcc are you using? Do you have all the necessary headers installed?
You get the idea.squarefractal wrote:The .mozconfig you seem to be using also looks like a dump of all --disable-* you could find
Thank you very much for that pointer. I didn't know about "about:mozconfig". Apparently the Atom-specific build was done with gcc version 4.7.2 20121015 (Red Hat 4.7.2-5). I wonder if that makes a difference. Anyhow, I'll look at them and see how they work on my system. Thanks again for the pointer.squarefractal wrote:Try using the official .mozconfig, which you can find under about:buildconfig of the respective builds.
There's a right way
There's a wrong way
And then there's my way
There's a wrong way
And then there's my way
-
- Astronaut
- Posts: 652
- Joined: 2015-07-30, 20:29
- Location: Vaughan, ON, Canada
Re: Step-by-step instructions for linux build?
Another newbie-type question, at least for developers, coming up. I've gotten the compile to go some distance before dying. It's getting slow, waiting for the Atom to get to where the build dies. I'd like to cross-compile on my desktop. What do I have to tweak, and where, to tell build.sh to use "/usr/bin/i686-pc-linux-gnu-gcc" and friends, rather than "/usr/bin/gcc" and friends? I have the cross-compiler installed for Gentoo, but it does things automatically, so I'm not familiar with how to switch manually.
There's a right way
There's a wrong way
And then there's my way
There's a wrong way
And then there's my way
-
- Contributing developer
- Posts: 1742
- Joined: 2013-05-20, 18:19
- Location: Somewhere in Sector 001
Re: Step-by-step instructions for linux build?
It's the same as the one posted here, with the following four lines added:Walter Dnes wrote:By the way, could you provide me with the mozconfig.txt, etc, that you use to generate the 32-bit Atom optimized build? That'll have a large chunk of optimization done already.
Code: Select all
export CFLAGS="-march=atom -mtune=atom"
export CXXFLAGS="-march=atom -mtune=atom"
ac_add_options --disable-devtools
ac_add_options --disable-jsd
The Pale Moon 26.0 beta 3 builds (including Atom) were compiled with GCC 4.9.Walter Dnes wrote:Apparently the Atom-specific build was done with gcc version 4.7.2 20121015 (Red Hat 4.7.2-5). I wonder if that makes a difference.
Re: Step-by-step instructions for linux build?
Since you are doing a native compile, and I assume your Atom machine does not have much RAM, create a larger SWAP file/partition.Walter Dnes wrote:Another newbie-type question, at least for developers, coming up. I've gotten the compile to go some distance before dying. It's getting slow, waiting for the Atom to get to where the build dies. I'd like to cross-compile on my desktop. What do I have to tweak, and where, to tell build.sh to use "/usr/bin/i686-pc-linux-gnu-gcc" and friends, rather than "/usr/bin/gcc" and friends? I have the cross-compiler installed for Gentoo, but it does things automatically, so I'm not familiar with how to switch manually.
Cross compile:
Specifying your compiler is done by adding these two lines in your .mozconfig:
export CC=/path/to/c/compiler (for you that would be export CC=/usr/bin/i686-pc-linux-gnu-gcc).
export CXX=/path/to/cpp/compiler
If you wish to cross compile, you will not only need GCC (/usr/bin/i686-pc-linux-gnu-gcc), but G++ as well, which is likely /usr/bin/i686-pc-linux-gnu-g++.
-
- Astronaut
- Posts: 652
- Joined: 2015-07-30, 20:29
- Location: Vaughan, ON, Canada
Re: Step-by-step instructions for linux build?
I tried that once. Do not want to do again; it's painfull.Axiomatic wrote:Since you are doing a native compile, and I assume your Atom machine does not have much RAM, create a larger SWAP file/partition.
Thanks, but no luck. Gentoo Portage handles cross-compiling complex packages, but I can't.Axiomatic wrote:Cross compile:
Specifying your compiler is done by adding these two lines in your .mozconfig:
export CC=/path/to/c/compiler (for you that would be export CC=/usr/bin/i686-pc-linux-gnu-gcc).
export CXX=/path/to/cpp/compiler
If you wish to cross compile, you will not only need GCC (/usr/bin/i686-pc-linux-gnu-gcc), but G++ as well, which is likely /usr/bin/i686-pc-linux-gnu-g++.
Code: Select all
cc1: warning: include location "/usr/include" is unsafe for cross-compilation [-Wpoison-system-directories]
*** Fix above errors and then restart with "make -f client.mk build"
/home/waltdnes/palemoon/pmsrc/client.mk:329: recipe for target 'configure' failed
There's a right way
There's a wrong way
And then there's my way
There's a wrong way
And then there's my way
-
- Astronaut
- Posts: 652
- Joined: 2015-07-30, 20:29
- Location: Vaughan, ON, Canada
Re: Step-by-step instructions for linux build?
I disappeared longer than intended. The machine I had intended to install QEMU on is a 7+ year old Core 2, with 3 Gigs of ram. I re-installed Gentoo in 32-bit mode, which can still access all the ram, so I'm not losing anything. And I can do a semi-native compile with different cpu flags. I'm confused about where to get the source code, which may have contributed to my earlier problems.
- I went to https://www.palemoon.org/sourcecode.shtml
- It says The source code archive above is for the main-line x86/x64 release version of Pale Moon. If you are interested in other release branches like the Atom source, please check the git repository linked to below.
- The repository link is https://github.com/MoonchildProductions/Pale-Moon
- The main release branch is https://github.com/MoonchildProductions ... _RelBranch
- The Atom release branch is https://github.com/MoonchildProductions ... _Relbranch
- They both have an "HTTPS clone URL" box on the right-hand side. Both of them list https://github.com/MoonchildProductions/Pale-Moon.git as the URL to clone from.
There's a right way
There's a wrong way
And then there's my way
There's a wrong way
And then there's my way
-
- Pale Moon guru
- Posts: 35648
- Joined: 2011-08-28, 17:27
- Location: Motala, SE
Re: Step-by-step instructions for linux build?
If you've already cloned the repo, then you can switch branches with:
git checkout 25.8_Atom_RelBranch
git checkout 25.8_Atom_RelBranch
"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
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite