Firefox build instructions

Discussion about official Mozilla Firefox builds
Post Reply
User avatar
djst
Moderator
Posts: 2826
Joined: November 5th, 2002, 1:34 am
Location: Sweden
Contact:

Firefox build instructions

Post by djst »

I want to update the download page at Mozilla Firebird (Help) to link to a page with good, step by step instructions for how to build Firebird (and perhaps Thunderbird if the approach is similar). Unfortunately, I'm not very experienced when it comes to building Mozilla in the first place so I would like to hear if someone is up to the task or perhaps could point me to a good page to start with.

I want this page to be on the Mozilla Firebird site. Any help or suggestions on where to get help is greatly appreciated and will probably benefit the community as a whole. Either use email, pm or reply to this thread if you have any ideas. Thanks in advance.

(Title changed by alanjstr 20031211, and by vfwlkr 20040209)
User avatar
DamianMoran
Posts: 726
Joined: January 30th, 2003, 10:14 pm

Post by DamianMoran »

Here is a good resource for Windows: http://gemal.dk/mozilla/build.html
Old Persist
Posts: 0
Joined: December 31st, 1969, 5:00 pm

Post by Old Persist »

I've only just built Firebird and Thunderbird on Linux successfully in the last few days. I did my first succesfull build following the instructions on this page http://forums.mozillazine.org/viewtopic.php?t=17745 . But really that was the last step in a long process. The main thing is, when your build fails at the ./configure stage, read the error messages carefully. Search your hard drive to see if the programs are there but are in an unusual place. Check your Linux CD's to see if the app is on there. Google on the error message. Read. All the information is out there. You can download all the tools for free. It's quicker (and more satisfying) to solve your problems yourself so Google.
User avatar
daihard
Folder@Home
Posts: 16633
Joined: November 17th, 2002, 6:27 pm
Location: Lynnwood, WA
Contact:

Post by daihard »

To build Firebird on Linux...

First, make sure you have the following environment variable set:

Code: Select all

CVSROOT=:pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot

Second, create the file called ".mozconfig" and save it under your $HOME directory. (It can be saved on other locations, but let's be simple here.) Here's a sample .mozconfig file.

Third, create an empty directory where the source tree will be downloaded. For instance:

Code: Select all

$ mkdir $HOME/fb_source
cd $HOME/fb_source

Fourth, run the following command from there:

Code: Select all

$ cvs co -f mozilla/client.mk

This will create the directory called "mozilla" and the main makefile under the directory. Once it's done, move to that directory:

Code: Select all

$ cd mozilla

Fifth, run the following command to download the latest source code from the Internet:

Code: Select all

gmake -f client.mk checkout

Finally, run the following command to build Firebird for Linux:

Code: Select all

$ gmake -f client.mk build


The basic Mozilla build instruction for UNIX can be found here:

http://www.mozilla.org/build/unix.html

EDIT: This is my own build script file for Firebird on Linux.
Kubuntu 8.04 (kernel 2.6.24-25-generic) / KDE 3.5.10
CentOS 4.8 (kernel 2.6.9-78.0.22.ELsmp) / KDE 3.5.10
Mac OS X 10.6.1 (Snow Leopard) / iPhone 3GS (32GB black)
aarem
Posts: 119
Joined: November 13th, 2002, 9:23 pm

Post by aarem »

daihard wrote:To build Firebird on Linux...

First, make sure you have the following environment variable set:

Code: Select all

CVSROOT=:pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot

Second, create the file called ".mozconfig" and save it under your $HOME directory. (It can be saved on other locations, but let's be simple here.) Here's a sample .mozconfig file.

Third, create an empty directory where the source tree will be downloaded. For instance:

Code: Select all

$ mkdir $HOME/fb_source
cd $HOME/fb_source

Fourth, run the following command from there:

Code: Select all

$ cvs co -f mozilla/client.mk

This will create the directory called "mozilla" and the main makefile under the directory. Once it's done, move to that directory:

Code: Select all

$ cd mozilla

Fifth, run the following command to download the latest source code from the Internet:

Code: Select all

gmake -f client.mk checkout

Finally, run the following command to build Firebird for Linux:

Code: Select all

$ gmake -f client.mk build


The basic Mozilla build instruction for UNIX can be found here:

http://www.mozilla.org/build/unix.html

EDIT: This is my own build script file for Firebird on Linux.


Thanks! Where do you put the optimizations in?

-aarem
User avatar
daihard
Folder@Home
Posts: 16633
Joined: November 17th, 2002, 6:27 pm
Location: Lynnwood, WA
Contact:

Post by daihard »

aarem wrote:Thanks! Where do you put the optimizations in?

It's in the .mozconfig file. Here's the relevant line:

Code: Select all

ac_add_options --enable-optimize="-O3 -mcpu=pentium4 -msse"

This says optimize as much as possible for Pentium 4 and SSE. "-Ox" tells the level of optimization, with x ranging from 0 (don't optimize) to 3 (optimize most) and s (optimize for size).
Kubuntu 8.04 (kernel 2.6.24-25-generic) / KDE 3.5.10
CentOS 4.8 (kernel 2.6.9-78.0.22.ELsmp) / KDE 3.5.10
Mac OS X 10.6.1 (Snow Leopard) / iPhone 3GS (32GB black)
mondaypickle
Posts: 5
Joined: April 20th, 2003, 6:16 am

Post by mondaypickle »

I cannot seem to get firebird to build. I keep getting this error

Code: Select all

gmake[2]: Entering directory `/downloads/internet/mozfirebird/mozilla/toolkit'
gmake[2]: *** No rule to make target `export'.  Stop.
gmake[2]: Leaving directory `/downloads/internet/mozfirebird/mozilla/toolkit'
gmake[1]: *** [tier_9] Error 2
gmake[1]: Leaving directory `/downloads/internet/mozfirebird/mozilla'
make: *** [default] Error 2


ive tried serveral different copies of the source, i want to build my own becuase all the current gtk2 builds segfault on me.
User avatar
Waldo
Posts: 596
Joined: July 29th, 2003, 8:21 am
Location: Cambridge, MA
Contact:

Post by Waldo »

daihard wrote:To build Firebird on Linux...

First, make sure you have the following environment variable set:

Code: Select all

CVSROOT=:pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot

Second, create the file called ".mozconfig" and save it under your $HOME directory. (It can be saved on other locations, but let's be simple here.) Here's a sample .mozconfig file.

Third, create an empty directory where the source tree will be downloaded. For instance:

Code: Select all

$ mkdir $HOME/fb_source
cd $HOME/fb_source

Fourth, run the following command from there:

Code: Select all

$ cvs co -f mozilla/client.mk

This will create the directory called "mozilla" and the main makefile under the directory. Once it's done, move to that directory:

Code: Select all

$ cd mozilla

Fifth, run the following command to download the latest source code from the Internet:

Code: Select all

gmake -f client.mk checkout

Finally, run the following command to build Firebird for Linux:

Code: Select all

$ gmake -f client.mk build


I don't know why, but the cvs co -f mozilla/client.mk command was erroring on me and saying CVSROOT wasn't defined (even though I had run the initial CVSROOT=... command). This is the command I've been able to use (on Mandrake Linux 9.1) to get the initial makefile:

Code: Select all

cvs -f -d :pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot co mozilla/client.mk


After that "gmake -f client.mk checkout" worked fine. For some reason in the earlier stages of the cvs download I was getting warning messages about the file .cvspass not being in the correct location (my /home/waldo/ folder). Any ideas from veteran builders on this? I assume it has something to do with protected folders in the source that are only accessible by the Firebird elite, but maybe I'm wrong. If I'm right, I think some note of this needs to be added to the default UNIX build instructions page - probably the others, too.

I haven't built yet, however, because I assume when I build in Linux I'll get a Linux build by default. This would be nice, but I still primarily use Windows on my computer. How do I make a Windows build in Linux (or does the build process make builds for both)? I've tried getting Cygwin running on my computer to build in Windows XP, but it didn't seem to work, so I gave up and went to Linux where I knew there'd be fewer problems.

P.S.--Regarding build optimizations, I read somewhere recently (some sort of official Firebird build page) that they don't really work on Windows, so the only option there is --enable-optimize. Or maybe you could talk to the makers of the optimized nightlies that seem to show up here and see what they say.
User avatar
mtigas
Posts: 430
Joined: August 11th, 2003, 8:04 pm
Contact:

Post by mtigas »

Oh man. Those build instructions are great. I did a few things differently, but it looks to be good. I'm pulling the source now.

It's so terrible. I'm such a newb at this. This sounds like it'll be fun.

If it goes well, then I simply don't know what to say. Awesome.
User avatar
daihard
Folder@Home
Posts: 16633
Joined: November 17th, 2002, 6:27 pm
Location: Lynnwood, WA
Contact:

Post by daihard »

Waldo wrote:I don't know why, but the cvs co -f mozilla/client.mk command was erroring on me and saying CVSROOT wasn't defined (even though I had run the initial CVSROOT=... command). This is the command I've been able to use (on Mandrake Linux 9.1) to get the initial makefile:

Code: Select all

cvs -f -d :pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot co mozilla/client.mk

You may need to export the variable instead of just setting it; i.e. run the command as follows:

Code: Select all

CVSROOT=:pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot; export CVSROOT

That's what I do in my .bashrc file so each time I open a terminal, the variable gets defined automatically.

Waldo wrote:After that "gmake -f client.mk checkout" worked fine. For some reason in the earlier stages of the cvs download I was getting warning messages about the file .cvspass not being in the correct location (my /home/waldo/ folder).

The first time you access CVS, you need to run the following command and type "anonymous" as your password when prompted:

Code: Select all

cvs login

This will create .cvspass under your home directory. Sorry that I missed that part in my instructions.

Waldo wrote:I haven't built yet, however, because I assume when I build in Linux I'll get a Linux build by default. This would be nice, but I still primarily use Windows on my computer. How do I make a Windows build in Linux (or does the build process make builds for both)? I've tried getting Cygwin running on my computer to build in Windows XP, but it didn't seem to work, so I gave up and went to Linux where I knew there'd be fewer problems.

I don't think you can build the Windows version of Firebird using Linux. The Linux binaries aren't compatible with the Win32 binaries, and AFAIK, the compiler on Linux (gcc) doesn't produce Win32 binaries.

Waldo wrote:P.S.--Regarding build optimizations, I read somewhere recently (some sort of official Firebird build page) that they don't really work on Windows, so the only option there is --enable-optimize. Or maybe you could talk to the makers of the optimized nightlies that seem to show up here and see what they say.

It's mainly the problem with either MingW (gcc that comes with cygwin) or Visual Studio 6. You can optimize Firebird without any problem if you use a newer compiler such as Visual Studio .NET 2002.
Kubuntu 8.04 (kernel 2.6.24-25-generic) / KDE 3.5.10
CentOS 4.8 (kernel 2.6.9-78.0.22.ELsmp) / KDE 3.5.10
Mac OS X 10.6.1 (Snow Leopard) / iPhone 3GS (32GB black)
User avatar
daihard
Folder@Home
Posts: 16633
Joined: November 17th, 2002, 6:27 pm
Location: Lynnwood, WA
Contact:

Post by daihard »

mondaypickle wrote:I cannot seem to get firebird to build. I keep getting this error

Code: Select all

gmake[2]: Entering directory `/downloads/internet/mozfirebird/mozilla/toolkit'
gmake[2]: *** No rule to make target `export'.  Stop.
gmake[2]: Leaving directory `/downloads/internet/mozfirebird/mozilla/toolkit'
gmake[1]: *** [tier_9] Error 2
gmake[1]: Leaving directory `/downloads/internet/mozfirebird/mozilla'
make: *** [default] Error 2


ive tried serveral different copies of the source, i want to build my own becuase all the current gtk2 builds segfault on me.

There may be more than one reason for that error. Run "make export" from your build root directory (<path_to_your_build>/mozilla) and then run your build procedure again.
Kubuntu 8.04 (kernel 2.6.24-25-generic) / KDE 3.5.10
CentOS 4.8 (kernel 2.6.9-78.0.22.ELsmp) / KDE 3.5.10
Mac OS X 10.6.1 (Snow Leopard) / iPhone 3GS (32GB black)
User avatar
nilson
Posts: 4100
Joined: February 15th, 2003, 11:55 pm
Location: Tuscaloosa, Alabama
Contact:

Post by nilson »

User avatar
daihard
Folder@Home
Posts: 16633
Joined: November 17th, 2002, 6:27 pm
Location: Lynnwood, WA
Contact:

Post by daihard »


Wow, this page looks awesome! Did you create it manually or with a program? I've been kinda tweaking my Web site lately, but it's nowhere as great as yours... Great job!
Kubuntu 8.04 (kernel 2.6.24-25-generic) / KDE 3.5.10
CentOS 4.8 (kernel 2.6.9-78.0.22.ELsmp) / KDE 3.5.10
Mac OS X 10.6.1 (Snow Leopard) / iPhone 3GS (32GB black)
User avatar
nilson
Posts: 4100
Joined: February 15th, 2003, 11:55 pm
Location: Tuscaloosa, Alabama
Contact:

Post by nilson »

Manually :) I havn't used an editor since 7th or 8th grade ;) Thanks :)
Hendikins
Posts: 26
Joined: December 31st, 1969, 5:00 pm
Location: On a train

Post by Hendikins »

I can't believe nobody has mentioned http://lxr.mozilla.org/mozilla/source/b ... EADME.html yet!
Post Reply