Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Tue 23 Sep 2014, 12:42
All times are UTC - 4
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Compiling
Firefox-12.0 Compiling Options
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [11 Posts]  
Author Message
Tman


Joined: 22 Jan 2011
Posts: 814
Location: Toronto

PostPosted: Sat 21 Apr 2012, 13:21    Post subject:  Firefox-12.0 Compiling Options
Subject description: a short howto
 

** 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.org/firefox/releases/12.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:
tar xvfj firefox-12*.bz2


2) In the terminal, cd to the extracted source folder and configure your Firefox settings:
Code:

./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:
make -is


4) Install to a folder:
Code:
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/viewtopic.php?p=521822#521822
-

Last edited by Tman on Sat 05 May 2012, 13:33; edited 3 times in total
Back to top
View user's profile Send private message 
chrome307


Joined: 15 Jan 2009
Posts: 713

PostPosted: Mon 23 Apr 2012, 08:45    Post subject:  

Thank you for this guide demonstrating the steps on compilation.

btw .... it does take ages compiling even with a dual core cpu !!
Back to top
View user's profile Send private message 
Tman


Joined: 22 Jan 2011
Posts: 814
Location: Toronto

PostPosted: Sat 28 Apr 2012, 17:10    Post subject:  

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/20/tip-compile-your-programs-fasters-with-multiple-processor-machines/
Back to top
View user's profile Send private message 
01micko


Joined: 11 Oct 2008
Posts: 7802
Location: qld

PostPosted: Sat 28 Apr 2012, 17:43    Post subject:  

Hi Tman

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

Here's the latest..

FIREFOX
Code:
. $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:
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:
#!/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!

_________________
Woof Mailing List | keep the faith Cool |
Back to top
View user's profile Send private message Visit poster's website 
Tman


Joined: 22 Jan 2011
Posts: 814
Location: Toronto

PostPosted: Sat 28 Apr 2012, 19:28    Post subject:  

Hi micko,

Thats an interesting technique; I will have to try it out sometime. Thanks for sharing. Smile
Back to top
View user's profile Send private message 
01micko


Joined: 11 Oct 2008
Posts: 7802
Location: qld

PostPosted: Sat 28 Apr 2012, 19:38    Post subject:  

Tman wrote:
Hi micko,

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


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.

_________________
Woof Mailing List | keep the faith Cool |
Back to top
View user's profile Send private message Visit poster's website 
01micko


Joined: 11 Oct 2008
Posts: 7802
Location: qld

PostPosted: Thu 10 May 2012, 22:24    Post subject:  

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:
# 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:
. $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:
#!/bin/sh
export LD_LIBRARY_PATH=/usr/lib/firefox:$LD_LIBRARY_PATH
exec /usr/lib/firefox/firefox "$@"
namoroka_3_series_kernel.diff.gz
Description  see instructions for use
gz

 Download 
Filename  namoroka_3_series_kernel.diff.gz 
Filesize  1.26 KB 
Downloaded  349 Time(s) 

_________________
Woof Mailing List | keep the faith Cool |
Back to top
View user's profile Send private message Visit poster's website 
BarryK
Puppy Master


Joined: 09 May 2005
Posts: 7047
Location: Perth, Western Australia

PostPosted: Fri 11 May 2012, 04:13    Post subject:  

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.

_________________
http://bkhome.org/news/
Back to top
View user's profile Send private message Visit poster's website 
Ledster

Joined: 26 Aug 2006
Posts: 67
Location: Devon, England

PostPosted: Wed 16 May 2012, 14:03    Post subject:
Subject description: A strange problem
 

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
Back to top
View user's profile Send private message 
01micko


Joined: 11 Oct 2008
Posts: 7802
Location: qld

PostPosted: Fri 18 May 2012, 08:01    Post subject:  

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)

_________________
Woof Mailing List | keep the faith Cool |
Back to top
View user's profile Send private message Visit poster's website 
Ledster

Joined: 26 Aug 2006
Posts: 67
Location: Devon, England

PostPosted: Sun 20 May 2012, 10:20    Post subject:
Subject description: solved
 

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.
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 1 [11 Posts]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Compiling
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0901s ][ Queries: 13 (0.0053s) ][ GZIP on ]