Firefox-12.0 Compiling Options

discuss compiling applications for Puppy
Post Reply
Message
Author
User avatar
Tman
Posts: 808
Joined: Sat 22 Jan 2011, 21:39
Location: Toronto

Firefox-12.0 Compiling Options

#1 Post by Tman »

** Initially, this post was for Firefox-11.0, but the same compiling options work with the Firefox-12.0 source.

* First, I recommend at least a dual-core cpu system to compile Firefox.
I was successfull in compiling Firefox in dpup exprimo, which has gcc version 4.4.5-8
In older pups, you may need to upgrade your version of gcc compiler for it to work.
Type: "gcc -v" in the console to find out what version you have. ( Of course, make sure you have the devx.sfs loaded first )

You can get the Firefox source from -> http://releases.mozilla.org/pub/mozilla ... .0/source/
* get the firefox-12.0.source.tar.bz2 file (75MB)

1) Copy the source to a linux partition and extract with the following terminal command:

Code: Select all

tar xvfj firefox-12*.bz2
2) In the terminal, cd to the extracted source folder and configure your Firefox settings:

Code: Select all

./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var --disable-dbus --disable-libnotify --enable-official-branding --enable-shared --disable-static --disable-debug --disable-crashreporter --disable-tests --disable-xinerama --disable-gnomevfs --disable-gnomeui --enable-safe-browsing --disable-accessibility --disable-logging --enable-strip --disable-necko-wifi --enable-application=browser --disable-webm --disable-libjpeg-turbo --disable-updater
3) Compile Firefox: This step can take a long time, depending on your CPU speed.

Code: Select all

make -is
4) Install to a folder:

Code: Select all

make install DESTDIR=/tmp/firefox-12.0
* if the DESTDIR is a windows partition, your permissions will get messed-up

5)
- Trim uneeded files/folders in /tmp/firefox-12.0
- then create a .desktop entry
- lastly, use "dir2pet" to package Firefox.
I am not going to teach you how to create a pet. If you don't know how, please see the pet packaging tutorial thread, by technosaurus:
http://www.murga-linux.com/puppy/viewtopic.php?t=35507

EXTRA OPTIONS
- if you want it to auto-update; remove the --disable-updater option
- if you have yasm installed, you can remove the --disable-webm --disable-libjpeg-turbo options
* I should add, you are supposed to get permission for the enable-official-branding option, so you may wish to leave that out if you are intending to share your pet with the public

for options to optimize Firefox for your specific cpu, see Playdayz thread:
http://www.murga-linux.com/puppy/viewto ... 822#521822
-
Last edited by Tman on Sat 05 May 2012, 17:33, edited 3 times in total.

User avatar
chrome307
Posts: 708
Joined: Thu 15 Jan 2009, 11:00

#2 Post by chrome307 »

Thank you for this guide demonstrating the steps on compilation.

btw .... it does take ages compiling even with a dual core cpu !!

User avatar
Tman
Posts: 808
Joined: Sat 22 Jan 2011, 21:39
Location: Toronto

#3 Post by Tman »

There are so many apps to compile out there. It would be nice to see the .configure options for other peoples' compiled apps.

chrome307,
Yes, Firefox does take a long tme to compile. There are options to speed up the process if you have more than 1 cpu. Please see the attached link: http://linux.koolsolutions.com/2009/04/ ... -machines/

User avatar
01micko
Posts: 8741
Joined: Sat 11 Oct 2008, 13:39
Location: qld
Contact:

#4 Post by 01micko »

Hi Tman

I use the method recommended by mozilla with a "mozconfig". I do it for seamonkey too.

Here's the latest..

FIREFOX

Code: Select all

. $topsrcdir/browser/config/mozconfig
mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/objdir-ff-release
mk_add_options MOZ_MAKE_FLAGS="-j4"
ac_add_options --disable-libjpeg-turbo
ac_add_options --enable-system-hunspell
ac_add_options --localstatedir=/var
ac_add_options --sysconfdir=/etc
ac_add_options --prefix=/usr
ac_add_options --host=i486-pc-linux-gnu
#ac_add_options --enable-system-cairo
ac_add_options --enable-strip
ac_add_options --with-system-jpeg
ac_add_options --with-system-zlib
ac_add_options --enable-default-toolkit=cairo-gtk2

# make -f client.mk

# cd objdir-ff-release

# make package #...makes tarball in dist

#TODO, make dev package
SEAMONKEY

Code: Select all

mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/objdir-sm-release
mk_add_options MOZ_CO_PROJECT=suite
ac_add_options --enable-application=suite
ac_add_options --enable-system-hunspell
ac_add_options --localstatedir=/var
ac_add_options --sysconfdir=/etc
ac_add_options --prefix=/usr
ac_add_options --host=i486-pc-linux-gnu
ac_add_options --disable-accessibility
ac_add_options --with-system-bz2
ac_add_options --disable-updater
ac_add_options --disable-parental-controls
ac_add_options --enable-places
ac_add_options --disable-gnomevfs
ac_add_options --disable-gnomeui
#ac_add_options --enable-system-cairo
ac_add_options --enable-strip
ac_add_options --with-system-jpeg
ac_add_options --with-system-zlib
ac_add_options --enable-libxul
ac_add_options --enable-storage
ac_add_options --disable-tests
ac_add_options --with-default-mozilla-five-home=/usr/lib/seamonkey
ac_add_options --enable-jsd
ac_add_options --enable-default-toolkit=cairo-gtk2
ac_add_options --disable-crashreporter
ac_add_options --disable-libnotify
#ac_add_options --with-system-libvpx



#ac_add_options --with-system-png



# make -f client.mk

# cd objdir-sm-release

# make package #...makes tarball in mozilla/dist/
The "--enable-system-cairo" was enabled, and png too but as time wears on Slacko's libs are ageing a little so these options fail with the latest moz sources

YMMV!!!

BTW... I script the SM build :wink:

Code: Select all

#!/bin/bash

#extract
echo "extracting seamonkey source ..wait"
tar -xf sea*2
[ $? -ne 0 ] && echo "failed extracting seamonkey source" && exit 1

#compile
echo "compiling seamonkey"
cd com*
cp ../mozconfig ./.mozconfig
make -f client.mk
[ $? -ne 0 ] && echo "failed compiling seamonkey source" && exit 1
echo "seamonkey compiled successfully"

#pack
echo "packaging seamonkey":
cd objdir-sm-release
make package
[ $? -ne 0 ] && echo "failed packaging seamonkey" && exit 1

#headers
cd -
cd ..
echo "creating headers package"
mkdir seamonkey-dev-files
cp -frL comm-release/objdir-sm-release/mozilla/dist/include/* ./seamonkey-dev-files
cp -frL comm-release/objdir-sm-release/mozilla/dist/public/* ./seamonkey-dev-files
tar -czf seamonkey-dev-files.tar.gz seamonkey-dev-files
[ $? -ne 0 ] && echo "failed packaging seamonkey headers" && exit 1

#move main SM package to pwd
cp -a comm-release/objdir-sm-release/mozilla/dist/seamonkey*tar.bz2 ./
echo "seamonkey package has been copied to the current directory" 

echo "done!"
exit 0
Extracts the header files for a dev package, same can be done for firefox.

Cheers!
Puppy Linux Blog - contact me for access

User avatar
Tman
Posts: 808
Joined: Sat 22 Jan 2011, 21:39
Location: Toronto

#5 Post by Tman »

Hi micko,

Thats an interesting technique; I will have to try it out sometime. Thanks for sharing. :)

User avatar
01micko
Posts: 8741
Joined: Sat 11 Oct 2008, 13:39
Location: qld
Contact:

#6 Post by 01micko »

Tman wrote:Hi micko,

Thats an interesting technique; I will have to try it out sometime. Thanks for sharing. :)
Barry does it similarly too.

Just a note. I haven't specified the mozconfig file in the seamonkey script. by default it looks for .mozconfig (dot <-- hidden) :wink: . The script takes care of that.
Puppy Linux Blog - contact me for access

User avatar
01micko
Posts: 8741
Joined: Sat 11 Oct 2008, 13:39
Location: qld
Contact:

#7 Post by 01micko »

Here's a patch for Firefox-3.6.28 to compile against 3 series kernels, works in 3.1.10.. YMMV in other series though the patch covers them. I may post it to mozilla, it's very simple.

Instructions:

Code: Select all

# tar xf mozilla*
# gunzip namoroka_3_series_kernel.diff
# patch -p0 <namoroka_3_series_kernel.diff
mozconfig for Slacko (for wary/racy add ac_add_options --disable-dbus)

Code: Select all

. $topsrcdir/browser/config/mozconfig
mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/objdir-ff-release
mk_add_options MOZ_MAKE_FLAGS="-j4"
ac_add_options --disable-libjpeg-turbo
ac_add_options --enable-system-hunspell
ac_add_options --localstatedir=/var
ac_add_options --sysconfdir=/etc
ac_add_options --prefix=/usr
ac_add_options --host=i486-pc-linux-gnu
ac_add_options --enable-system-cairo
ac_add_options --enable-strip
ac_add_options --with-system-jpeg
ac_add_options --with-system-zlib
ac_add_options --enable-default-toolkit=cairo-gtk2

# make -f client.mk to build
NOTE: if you don't redistribute it you can add ac_add_options --enable-official-branding

Makes a < 11MB pet

Here's my start script (put in /usr/bin if you install FF to /usr/lib, adjust path otherwise)

Code: Select all

#!/bin/sh
export LD_LIBRARY_PATH=/usr/lib/firefox:$LD_LIBRARY_PATH
exec /usr/lib/firefox/firefox "$@"
Attachments
namoroka_3_series_kernel.diff.gz
see instructions for use
(1.26 KiB) Downloaded 677 times
Puppy Linux Blog - contact me for access

User avatar
BarryK
Puppy Master
Posts: 9392
Joined: Mon 09 May 2005, 09:23
Location: Perth, Western Australia
Contact:

#8 Post by BarryK »

Regarding the .mozconfig technique, that is the officially supported technique.

I was actually forced to go over to using .mozconfig with SeaMonkey, as I got a bug in the Mail&News module otherwise. I think that is documented somewhere back in my blog or earlier news pages.
[url]https://bkhome.org/news/[/url]

Ledster
Posts: 88
Joined: Sat 26 Aug 2006, 15:33
Location: Devon, England

#9 Post by Ledster »

Strange problem (to me!)
Decided to try this compile (for fun).
The first computer I tried it on is an Athlon XP2500 with Nvidia FX5200 graphics card. Using Slacko 533 PAE Himem it worked a treat, but took 2 hrs 30 mins. So tried it on a second computer (quad core i5, ATI Radeon HD 5750 graphics, Slacko 533 PAE Highmem) to see how much faster it would be.
Would not configure. Error was:-

"checking for GL/glx.h... no configure: error: Can't find header GL/glx.h for WebGL (install mesa-common-dev (Ubuntu), mesa-libGL-devel (Fedora), or Mesa-devel (openSUSE))"

Tried symlinking glx.h into .../GL/, but made no difference.
So tried the same experiment on both computers with Slacko 531 - same result(s).
Tried again using Saluki 022 on both computers - same result(s).

I can only conclude that the difference between graphics drivers used by the two computers is causing this, but I'm out of my depth.
Can I disable WebGL (is it a good idea?).
I've looked on the slackware sites and cannot find any mesa packages, so I'm lost.

Ledster

User avatar
01micko
Posts: 8741
Joined: Sat 11 Oct 2008, 13:39
Location: qld
Contact:

#10 Post by 01micko »

Hi Ledster,

You need the mesa headers, aka mesa_DEV :wink: . See the "drivers" tab in Slickpet or PPM, you don't need the full mesa package, the headers are only small.

2.5 hrs isn't too bad on an old Athlon, for seamonkey; firefox should be quicker. Seamonkey takes me about 65 mins on an Athlon X2 3GHz, 2GB RAM, firefox about 45 mins, both on slacko-533 4g (fwiw, PAE version takes the same time)
Puppy Linux Blog - contact me for access

Ledster
Posts: 88
Joined: Sat 26 Aug 2006, 15:33
Location: Devon, England

#11 Post by Ledster »

Hi 01Micko

Sorry I'm a bit slow getting back, been busy.
Installed the mesa_DEV-7.10.2-s, made all the difference. Configured, made, made install using DESTDIR=, removed the firefox-devel-12.0 directory and made a pet. Installed and am posting from it now.
I used a usb stick formatted ext3 for this - not a good idea. It took 2.75 hours to compile on a quad core i5! For interest I am going to try again sometime in a / directory (4 gigs of memory on this machine) to see how much faster it is.

Many thanks for the help.

Post Reply