1 TITLE: Compiling Mozilla and Installing Plugins
5 AUTHOR: Tushar Teredesai <Tushar@LinuxFromScratch.Org>
8 How to compile 'Mozilla from Scratch' and install some relevant plugins.
12 Primary Location of this hint:
13 http://www.linuxfromscratch.org/~tushar/
14 The latest version of the hint and any relevant patches are available at that
15 site. Please refer to the primary location before submitting
16 bug-reports/enhancements to this hint.
18 You may freely copy this document or create derivate works or distribute the
19 document in any format. At your discretion, you may give credit to the original
22 Use the hint at your own risk. Neither the author, nor the Linux From Scratch
23 project accepts any reponsibility for anything that happens when using these
24 documents or associated files.
26 An appropriate place to discuss this hint is blfs-support MailingList/NewsGroup
27 at LinuxFromScratch.Org.
31 * Changed primary location and e-mail address.
33 * Added fontconfig and Xft2 support for gtk2 builds (unstable).
34 * Upgrade to mozilla-1.2.
37 * Added triple install (mozilla-1.0.1, mozilla-1.2b, phoenix).
39 * Added instructions for Phoenix.
41 * Added spellchecker, enigmail and easysearch extensions.
43 * Added modifications required for OpenOffice.
45 * Changed location of nss headers from nss to security.
47 * Added lcms dependency.
49 * Added notes for Galeon suggested by Scot Mc Pherson.
51 * Added comment on LD_LIBRARY_PATH and /etc/ld.so.conf.
52 * Added comment on dowloading gcc2 libraries for precompiled mozilla.
54 * Added warning regarding stripping mozilla-bin.
55 * Added Problems and workarounds section.
57 * Made individual patches.
59 * Added link netscape -> mozilla.
61 * Changed the CFLAGS I use.
63 * Added alternate site for hint.
65 * Added "make install" option.
66 * Added MOZ_PLUGIN_PATH.
67 * Added warning for GTK2 option.
69 * Added explanations for configure options.
70 * Added options to build only the browser.
72 * Add gtk2 toolkit option.
73 * Added a section to list of relevant URLs.
75 * Added hack to ignore autocomplete=off attribute used by some websites.
76 * Added some useful preference settings.
78 * Fixed some typos, again!
79 * Renamed hint to mozilla.
80 * Added warning for CFLAGS, CXXFLAGS.
81 * Added warning for QT and XLib toolkits.
82 * Added info about pre-compiled distributions.
83 * Added MOZILLA_FIVE_HOME to .mozconfig.
84 * Added instructions to copy man page, header files and idl files.
87 * Environment variable to speed up Mozilla.
88 * First version as mozcompile.
90 Pre-requisites (Post-LFS):
92 <http://freshmeat.net/projects/xfree86/>
94 <http://freshmeat.net/projects/which/>
96 <http://freshmeat.net/projects/glib/>
98 <http://freshmeat.net/projects/gtk/>
100 <http://freshmeat.net/projects/libidl/>
101 <http://freshmeat.net/projects/orbit/>
103 <http://freshmeat.net/projects/libjpeg/>
105 <http://freshmeat.net/projects/libpng/>
107 <http://freshmeat.net/projects/libmng/>
109 <http://freshmeat.net/projects/lcms/>
111 <http://freshmeat.net/projects/zip/>
112 Installation of all these packages is covered in the BLFS book at
113 <http://beyond.linuxfromscratch.org>. As per the BLFS book, I have all packages
114 installed in /usr, so if you install in a non-standard location, you are on your
117 Packages to download:
119 <http://freshmeat.net/projects/libical/>
121 <http://freshmeat.net/projects/mozilla/>
122 * Mozilla SpellChecker
123 <http://spellchecker.mozdev.org/source.html>
125 <http://fontconfig.org>
127 Which Mozilla version?
129 I use Mozilla-1.2 for regular use. But I also install a copy of Mozilla-1.0.1
130 since it is the stable version and hence useful for experimenting with packages
131 such as japhar, openoffice, sun-jdk. I also use Phoenix browser for general
132 browsing. I have Mozilla-1.2 and Phoenix-0.4 installed in the system wide
133 prefix /usr and Mozilla-1.0.1 installed in /opt/mozilla.
135 The Mozilla instructions below are, for the most part, applicable to both
136 Mozilla-1.0.1 and Mozilla-1.2. Instructions for Phoenix are in the latter part
141 I use the GTK2 as the default toolkit. But if you want to play it safe, use
146 You may use the latest libIDL (0.8.0), also known as libIDL2. Mozilla-1.2
147 automatically utilizes libIDL2. But for Mozilla-1.0.1 you will need to do the
148 following so that libIDL2 is properly recognized. This is assuming that you
149 don't have Orbit1 or libIDL-0.6.x installed.
150 export LIBIDL_CONFIG=/usr/bin/libIDL-config-2
151 ln -sf libIDL-2.so /usr/lib/libIDL.so
152 The variable LIBIDL_CONFIG needs only to be set when configuring Mozilla. You
157 If you plan to install the calendar component or any mozdev projects, you will
158 need a CVS client to download the relevant code. See the BLFS-book for
159 instructions to install a CVS client.
162 Preparations for installing Calendar component:
164 libical is only required if you want to play around with calendar. I had
165 problems building Mozilla calendar, YMMV. Also, mozilla requires the libical
166 that is available from mozilla's CVS (dubbed 0.23a).
167 cvs -d :pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot co \
168 mozilla/other-licenses/libical &&
169 cd mozilla/other-licenses/libical &&
170 ./autogen.sh --prefix=/usr --disable-python-bindings &&
174 The released source tarballs don't include the calendar component. Download it
175 using the following instructions:
176 cvs -d :pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot co \
178 After you untar mozilla tarball, move this directory to where the mozilla source
180 rm -rf $MOZ_SRC/calendar
181 mv mozilla/calendar $MOZ_SRC
184 Preparations for installing mozdev projects:
185 (Spellchecker, Protozilla, Enigmail, Easysearch)
187 All these mentioned projects are part of mozdev. Spellchecker aims to provide
188 spellchecking for composer and mail. Protozilla allows extending the protocols
189 supported by mozilla. Enigmail provides authentication and encryption features
190 (via GNU PG or PGP). Easy Search bar provides a search bar (similar to the
191 Google bar). For further information on mozdev, check out <http://mozdev.org>.
193 Enigmail requires that you have GNU Privacy Guard or PGP installed. Installation
194 of GNU PG (available at http://www.gnupg.org) is the usual ./configure dance
195 routine which now you must be really familiar with:) Enigmail also depends on
198 You will need to download the code for these applications via CVS. The password
199 for anonymous cvs access is "guest".
203 export CVSROOT=":pserver:guest@mozdev.org:/cvs"
205 cvs co spellchecker/spellcheck
206 cvs co protozilla/ipc
207 cvs co protozilla/pipella
209 cvs co easysearch/www/download
211 Except for the easysearch, all other packages are to be built within the mozilla
212 source tree. Also, there is a difference in the way these projects are built.
213 Spellchecker can be built along with mozilla as extensions. Protozilla and
214 Enigmail need to be built after building the entire mozilla build. Easy Search
215 is added after installing mozilla.
217 First lets move the files to the appropriate locations.
218 mv spellchecker/spellcheck $MOZ_SRC/extensions
219 mv protozilla/ipc $MOZ_SRC/extensions
220 mv protozilla/pipella $MOZ_SRC/extensions
221 mv enigmail/src $MOZ_SRC/extensions/enigmail
224 Installing FontConfig and Xft:
226 Fontconfig is needed to enable xft support in Mozilla. 1.0.x versions use an
227 internal copy of fontconfig, but it has been removed since the 1.1 series.
229 Fontconfig and Xft are going to be incorporated into X-4.3. Till then they are
230 available as seperate packages. Installing these packages in the standard X
231 prefix (/usr/X11R6) caused me a lot of problems with many GNOME2 packages. Hence
232 I installed these with a seperate prefix and renamed the Xft lib to Xft2. That
233 way the apps that have not yet been upgraded to Xft2 can still continue to link
234 against libXft.so while apps such as mozilla can link against libXft2.so.
236 Download the fontconfig package from the URL mentioned above and install it as
237 follows. Remember to add /opt/xft/lib to /etc/ld.so.conf.
239 ./configure --prefix=/opt/xft
242 ln -sf /opt/xft/pkgconfig/fontconfig.pc /usr/lib/pkgconfig
245 for i in xft.pc.in xft-config.in
248 sed -e "s:\-lXft:\-lXft2:g" $i.orig > $i
250 export CFLAGS="$CFLAGS -L/opt/xft/lib"
251 export CXXFLAGS="$CFLAGS -L/opt/xft/lib"
252 export CPPFLAGS="-I/opt/xft/include"
253 ./configure --prefix=/opt/xft
256 mv /opt/xft/lib/libXft.so /opt/xft/lib/libXft2.so
257 ln -sf /opt/xft/pkgconfig/xft.pc /usr/lib/pkgconfig
259 WARNING: Though I got the build to compile, I got runtime errors. I don't know
260 whether it was a problem with Mozilla or incorrect configuration of fontconfig.
261 So use the Xft option at your own risk.
266 Apply patches that you think are useful from the site mentioned above. Some of
267 the patches are specific to the Mozilla version. For Galeon users, it is better
268 to stick with Mozilla 1.0.x for now. The VERSION variable refers to the Mozilla
271 One option is to pass the options to configure. Alternatively, these options can
272 be placed in a file .mozconfig that is read by Mozilla's configure script. I
273 prefer latter method (useful for recompiles).
275 First we will set the flags so that we can build a distribution rather than
276 having to run Mozilla from the directory we compiled.
277 export MOZILLA_OFFICIAL=1
278 export BUILD_OFFICIAL=1
279 export MOZ_INTERNAL_LIBART_LGPL=1
280 The third export specifies that you accept the LGPL License for libart. This is
281 required for SVG support and is recommended.
283 Set CFLAGS and CXXFLAGS based on your needs. I have had no problems setting both
284 CFLAGS and CXXFLAGS to "-O3 -march=i686 -fforce-addr -funroll-loops
285 -frerun-cse-after-loop -frerun-loop-opt -falign-functions=4
286 -fomit-frame-pointer". YMMV. Though, for my default build I use "-O3 -march=i686
287 -fomit-frame-pointer -fexpensive-optimizations -s -w".
292 to understand all the options that are available to you.
294 Now create the .mozconfig file containing the options you want. The .mozconfig
295 file can be in various locations (home directory of the user compiling, or in a
296 hierarchy above the mozilla source directory). Since I use MSB's package user
297 hint, I prefer to keep the file in the home directory.
299 There are options that you can use to install just the browser and skip all the
300 additional baggage that comes along with mozilla. These are some of the common
301 options along with short descriptions.
303 Mozilla now supports the "make install" option:) I prefer installing mozilla in
304 one of the standard locations such as /usr. You may prefer to install it in
305 /opt/mozilla. I will refer to this as MOZ_PREFIX.
306 echo ac_add_options --prefix=$MOZ_PREFIX >> .mozconfig
308 The --enable-default-mozilla-five-home is not relevant anymore since mozilla
309 installs in the standard locations.
311 Redundant but here for the sake of completeness:)
312 echo ac_add_options --with-x >> .mozconfig
314 Use the packages we have installed as against using the ones available with
316 echo ac_add_options --with-system-jpeg >> .mozconfig
317 echo ac_add_options --with-system-zlib >> .mozconfig
318 echo ac_add_options --with-system-png >> .mozconfig
319 echo ac_add_options --with-system-mng >> .mozconfig
321 Build the calendar client (optional).
322 echo ac_add_options --enable-calendar >> .mozconfig
324 Disable the mail and news client (optional).
325 echo ac_add_options --disable-mailnews >> .mozconfig
327 Disable LDAP Support, recommended if mail is disabled.
328 echo ac_add_options --disable-ldap >> .mozconfig
330 Enable the Xft support (this is unstable).
331 echo ac_add_options --enable-xft >> .mozconfig
333 Enable the Personal Security Manager to enable SSL connections.
334 echo ac_add_options --enable-crypto >> .mozconfig
336 Disable all debugging options and enable all optimization options. Pick and
338 echo ac_add_options --disable-accessibility >> .mozconfig
339 echo ac_add_options --disable-tests >> .mozconfig
340 echo ac_add_options --disable-debug >> .mozconfig
341 echo ac_add_options --enable-optimize=-O3 >> .mozconfig
342 echo ac_add_options --disable-logging >> .mozconfig
343 echo ac_add_options --enable-reorder >> .mozconfig
344 echo ac_add_options --enable-strip >> .mozconfig
345 echo ac_add_options --enable-elf-dynstr-gc >> .mozconfig
346 echo ac_add_options --enable-cpp-rtti >> .mozconfig
347 Among the above options, --disable-accessibility and --disable-logging cause
348 problems in a GTK2 build.
350 Some features are only required for developer of webapplications (Optional):
351 echo ac_add_options --disable-jsd >> .mozconfig
352 echo ac_add_options --disable-dtd-debug >> .mozconfig
354 The following option is for enabling the xterm title with the current command
356 echo ac_add_options --enable-xterm-updates >> .mozconfig
358 Disable support for HTML editing (optional).
359 echo ac_add_options --enable-plaintext-editor-only >> .mozconfig
361 Enable extensions you want. I prefer to enable all the extensions:)
362 echo ac_add_options --enable-extensions="all" >> .mozconfig
363 If you want to include spellchecker, then change the above line to:
364 echo ac_add_options \
365 --enable-extensions="all,spellcheck" >> \
367 You may also pick and choose the extensions you want. To disable everything
368 other than the browser, use the following.
369 echo ac_add_options \
370 --enable-extensions="default,-venkman,-inspector,-irc" >> \
373 Enable SVG (Scalable Vector Graphics) support.
374 echo ac_add_options --enable-svg >> .mozconfig
376 Mozilla now supports both gtk 1.2 and gtk 2.0. To enable gtk2 support:
377 echo "ac_add_options --enable-toolkit-gtk2" >> .mozconfig
378 echo "ac_add_options --enable-default-toolkit=gtk2" >> .mozconfig
380 The QT and XLib toolkit support are not stable and may (!) fail to compile. Try
381 compiling without these first and if all goes well, experiment with the other
382 toolkits. If you would like to help out with the QT port of Mozilla, check out
383 the Mozilla Developer NGs since they are looking for developers.
386 According to the financial institutions, the following hack makes your browser
387 insecure. IMO, it is no more insecure than using MS-IIS (along with its security
388 history) as the server for financial sites;) You have been warned. Many sites
389 use an MS-IE specific tag (autocomplete=off) to prevent autocomplete from
390 working in some forms. This tag is now supported in mozilla to appease the
391 financial institutions. As per the requirements of the financial institutions,
392 they will not even accept a solution where this a preference option. My opinion
393 is that it should be in the hands of the user. To enable autocomplete to bypass
394 this restriction, we need to make a slight modification in the code. Note that
395 this modification is also available as a patch.
399 Open the file $MOZ_SRC/extensions/wallet/src/wallet.cpp and search for
401 #define WALLET_DONT_CACHE_ALL_PASSWORDS
402 and delete or comment out the line.
405 If anyone tells you MS-IE is user friendly, give them this example and explain
406 to them the distinction between corporate friendly and user friendly:)
408 Now configure the package as usual. If there are problems run configure again by
409 removing the offending option.
412 If you have enabled xft support, mozilla needs Xft2 headers but in the
413 Makefiles, /usr/X11R6/include appears before /opt/fontconfig/include and hence
414 the build picks up Xft headers installed by X (i.e. Xft1) and the build craps
415 out. The easiest fix is to sed in the Xft2 headers to appear before X11 headers.
417 cp autoconf.mk autoconf.mk.orig
418 sed -e "s:\-I\/usr\/X11R6\/include:\-I\/opt\/xft\/include \
419 \-I\/usr\/X11R6\/include:g" autoconf.mk.orig > autoconf.mk
422 Now do the usual build stuff.
424 This will take a few hours to compile. Watch your favorite Startrek movie.
426 If you plan to include Enigmail, then you will need to compile it since it needs
427 to be built after the entire mozilla is built. Also since it depends on
428 Protozilla, Protozilla is built first.
430 for subdir in ipc pipella enigmail
437 The makemake command generates the Makefile. make compiles the package:)
439 You have two options, installing mozilla in the standard locations or making a
440 distribution that can be installed on various computers.
442 Installing mozilla on top of an existing installation creates some problems. So
443 I usually delete the previous installation before installing a new one. There is
444 no need to delete your profile, just delete the installed package.
446 If you would like to install in the standard locations do the standard:
449 The nss headers are not installed by default, so do the following.
450 install -d $MOZ_PREFIX/include/mozilla-$VERSION/nss
451 If you are installing Mozilla-1.0.1, do
452 cp -Lf dist/private/security/*.h dist/public/security/*.h \
453 $MOZ_PREFIX/include/mozilla-$VERSION/nss
454 If you are installing Mozilla-1.2, do
455 cp -Lf dist/private/nss/*.h dist/public/nss/*.h \
456 $MOZ_PREFIX/include/mozilla-$VERSION/nss
458 Also, if you are installing mozilla-1.0, then all header files may not copied
459 and hence packages (such as Galenon) that depend on mozilla cannot be compiled.
460 So do the following to verify that all header files are copied.
461 cp -Lur dist/include/* $MOZ_PREFIX/include/
463 Now we make some symlinks so that apps (OpenOffice, Gnome) that depend on
464 Mozilla don't need to know the mozilla version that is installed to use the
465 headers and libraries installed by Moz.
466 ln -nsf mozilla-${VERSION} ${MOZ_PREFIX}/include/mozilla
467 ln -nsf mozilla-${VERSION} ${MOZ_PREFIX}/lib/mozilla
469 Also if you plan on compiling OpenOffice and link it to Mozilla address book,
470 then you will need to copy some static libraries that are not installed by "make
472 install -d ${MOZ_PREFIX}/lib/mozilla-${VERSION}/openoffice
473 cp -f dist/lib/libembed_base_s.a dist/lib/liblber50.a \
474 dist/lib/libmozreg_s.a \
475 ${MOZ_PREFIX}/lib/mozilla-${VERSION}/openoffice
477 If you want to install the easysearch toolbar, do the following: (There was no
478 way I could fit the following in a 80 column width)
479 cd $MOZ_SRC/mozdev/easysearch/www/download
480 unzip -qq -o easysearch_e0983.xpi
481 cp -a easysearch.jar $MOZ_PREFIX/lib/mozilla-${VERSION}/chrome
483 'content,install,url,jar:resource:/chrome/easysearch.jar!/content/easysearch/' \
484 >> chrome/installed-chrome.txt
486 'locale,install,url,jar:resource:/chrome/easysearch.jar!/locale/en-US/easysearch/' \
487 >> chrome/installed-chrome.txt
489 There are many search engines that you can add to the easysearch toolbar.
490 Download the easysearch plugins tarball from the project's homepage and copy the
491 engines you need to ${MOZ_PREFIX}/lib/mozilla-${VERSION}/searchplugins.
493 Do the following to register the components (else the build segfaults if the
494 user running mozilla does not have write access to the installation directories.
495 Note that the MOZILLA_FIVE_HOME and LD_LIBRARY_PATH are not relevant anymore
496 when running mozilla.
497 export LD_LIBRARY_PATH=/usr/X11R6/mozilla-$VERSION:$LD_LIBRARY_PATH
498 export MOZILLA_FIVE_HOME=/usr/X11R6/mozilla-$VERSION
499 rm -rf chrome/overlayinfo chrome/*.rdf
500 mkdir chrome/overlayinfo
501 $MOZ_PREFIX/lib/mozilla-$VERSION/regxpcom
502 $MOZ_PREFIX/lib/mozilla-$VERSION/regchrome
503 touch `find $MOZ_PREFIX/lib/mozilla-$VERSION -name *.rdf`
505 Some apps look for netscape for starting the browser (RMS has started a movement
506 so that these apps start recognizing the BROWSER env variable). Till then it is
507 better to do a symlink.
508 ln -sf mozilla netscape
509 in the directory where the mozilla startup script is installed (/usr/X11R6/bin).
511 To make a distribution that you would like to install on other machines:
512 cd xpinstall/packager &&
515 tar -xzf $MOZ_SRC/dist/mozilla-i686-pc-linux-gnu.tar.gz &&
517 cp -LfR man /opt/mozilla &&
518 cp -LfR idl /opt/mozilla &&
519 cp -LfR include /opt/mozilla &&
520 mkdir /opt/mozilla/include/security &&
521 cp -Lf private/security/*.h /opt/mozilla/include/security &&
522 cp -Lf public/security/*.h /opt/mozilla/include/security &&
523 install -d /opt/mozilla/openoffice
524 cp -f lib/libembed_base_s.a lib/liblber50.a lib/libmozreg_s.a \
525 /opt/mozilla/openoffice
527 tar -cvzf mozilla-dist.tar.gz mozilla/
528 The above commands create a binary distribution, installs it in /opt/mozilla,
529 copies the man pages and header files to the installation and then creates a
530 distribution that can be untarred on other machines.
532 Now we make some environment settings.
534 If you install mozilla in a non-standard location, make sure that the location
535 is in your PATH. Also you may add the man page to your MANPATH.
536 export PATH=$PATH:/opt/mozilla
537 export MANPATH=$MANPATH:/opt/mozilla/man
538 In addition, if you plan on using Galeon, then you will need to export
539 MOZILLA_FIVE_HOME, though it is not required for running Mozilla. There is no
540 need to add the mozilla libraries to /etc/ld.so.conf since the startup script
541 automatically adjusts the library paths that it requires (such as the Mozilla
542 libraries, the plugin directories, etc.).
544 To make your Mozilla build go faster, add:
545 export XPCOM_CHECK_THREADSAFE=0
546 in .bash_profile or in run-mozilla.sh. This apparently only affects debug
547 builds, but no harm in setting it for optimized builds.
549 I use a different location for the Mozilla plugins so that I can keep remove and
550 reinstall mozilla without affecting the plugins. If you do this set the
551 MOZ_PLUGIN_PATH to the appropriate directory. I use:
552 export MOZ_PLUGIN_PATH=/opt/mozilla-plugins
554 Please note that you shouldn't need any modifications with /etc/ld.so.conf
555 and/or LD_LIBRARY_PATH env variable. The mozilla wrapper scripts takes care of
556 adding all the required libraries to LD_LIBRARY_PATH before running mozilla-bin.
557 So don't modify either LD_LIBRARY_PATH or /etc/ld.so.conf. IMO, /etc/ld.so.conf
558 should only list the standard system wide library locations.
565 Phoenix is a redesign of the Mozilla browser component written using the XUL
566 user interface language and designed to be cross-platform.
568 You will need do download the Phoenix code using CVS. I won't discuss the
569 options since they have alreay been discussed before. Most of the options
570 discussed above apply (such as the wallet hack and creating the registry for
571 multi user installs) apply when building phoenix.
573 One problem with Phoenix is that the source tar balls for each version are not
574 available, so the only way to install is to use cvs. There is a bug report to
575 make source tarballs available for Phoenix (Bug # 175934).
577 In the following PHOENIX_SRC refers to the directory where you want to compile
581 export CVSROOT=":pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot"
583 cvs co mozilla/toolkit
584 cvs co mozilla/browser
586 export MOZILLA_OFFICIAL=1
587 export BUILD_OFFICIAL=1
588 export MOZ_INTERNAL_LIBART_LGPL=1
590 echo "ac_add_options --prefix=${MOZ_PREFIX}" >> .mozconfig
591 echo "ac_add_options --enable-default-mozilla-five-home" >> .mozconfig
592 echo "ac_add_options --with-x" >> .mozconfig
593 echo "ac_add_options --with-system-jpeg" >> .mozconfig
594 echo "ac_add_options --with-system-zlib" >> .mozconfig
595 echo "ac_add_options --with-system-png" >> .mozconfig
596 echo "ac_add_options --with-system-mng" >> .mozconfig
597 echo "ac_add_options --disable-mailnews" >> .mozconfig
598 echo "ac_add_options --disable-ldap" >> .mozconfig
599 echo "ac_add_options --enable-xft" >> .mozconfig
600 echo "ac_add_options --enable-crypto" >> .mozconfig
601 echo "ac_add_options --enable-java-supplement" >> .mozconfig
602 echo "ac_add_options --disable-jsd" >> .mozconfig
603 echo "ac_add_options --disable-accessibility" >> .mozconfig
604 echo "ac_add_options --disable-tests" >> .mozconfig
605 echo "ac_add_options --disable-debug" >> .mozconfig
606 echo "ac_add_options --enable-optimize=-O3" >> .mozconfig
607 echo "ac_add_options --disable-dtd-debug" >> .mozconfig
608 echo "ac_add_options --disable-logging" >> .mozconfig
609 echo "ac_add_options --enable-reorder" >> .mozconfig
610 echo "ac_add_options --enable-strip" >> .mozconfig
611 echo "ac_add_options --enable-elf-dynstr-gc" >> .mozconfig
612 echo "ac_add_options --enable-cpp-rtti" >> .mozconfig
613 echo "ac_add_options \
614 --enable-extensions=default,-venkman,-inspector,-irc" \
616 echo "ac_add_options --enable-svg" >> .mozconfig
619 If we use make install, it will overwrite the mozilla installation, hence do the
620 following to copy phoenix.
621 install -d ${MOZ_PREFIX}/lib/phoenix-${VERSION}
622 cp -LfR dist/bin/* ${MOZ_PREFIX}/lib/phoenix-${VERSION}
623 ln -sf ${MOZ_PREFIX}/lib/phoenix-${VERSION}/phoenix ${MOZ_PREFIX}/bin/phoenix
624 cd ${MOZ_PREFIX}/lib/phoenix-${VERSION}
625 export LD_LIBRARY_PATH="${MOZ_PREFIX}/lib/phoenix-${VERSION}"
626 export MOZILLA_FIVE_HOME="${MOZ_PREFIX}/lib/phoenix-${VERSION}"
627 rm -rf chrome/overlayinfo chrome/*.rdf
628 mkdir chrome/overlayinfo
631 touch `find ${MOZ_PREFIX}/lib/phoenix-${VERSION} -name *.rdf`
634 Installing a pre-compiled distribution:
636 An alternative is to install a pre-compiled Mozilla distribution. Though against
637 "the spirit of LFS", the reasons you may wish to do so:
638 1. Chicken and egg problem:) You are having problems compiling Mozilla
639 and till you resolve them, you need a browser to get support with the
641 2. You don't want to spend 5 hours (thats how long it takes on my P-II
643 3. You are content with the options used by the pre-compiled
645 4. You have a GCC3 CVS and you would like to use a GCC2 compiled mozilla
646 so that commercial plugins can work without problems. Though I am
647 using all the plugins (except for Real) mentioned below without
650 If so, head over to mozilla.org and download the "talkback enabled full
651 installer" and read the installation instructions in the release notes.
652 Remember to follow the instructions for multi-user installs in the notes, else
653 a core dump may occur at startup.
655 If your system is gcc3 based, and the precompiled distro is linked against gcc2,
656 download the libraries from <http://www.linuxfromscratch.org/~timothy/misc/> and
657 move it to where mozilla can find it (such as the MOZILLA_FIVE_HOME).
662 Visit the following sites to find help and find extensions to mozilla.
663 * http://www.mozdev.org/projects.html
664 Some really cool extensions to mozilla such as google bar.
665 * http://www.mozilla.org/projects/
666 Projects related to mozilla, some of them are already integrated into
667 the current release, some are yet to mature.
668 * http://www.gerbilbox.com/newzilla/
669 The unofficial Mozilla FAQ.
670 * http://www.themes.org/skins/mozilla/
671 Theme park for Mozilla.
674 Changing Preferences:
676 Whether to follow the settings in the current section is entirely at your
677 discretion. Would just like to mention some changes in the preferences I like:
678 * Appearance -> Colors -> Enable Use System Colors.
679 * Appearance -> Theme -> Select Modern Theme. Way better than Classic.
680 * Navigator -> Smart Browsing -> Enable Internet Keywords.
681 * Navigator -> Search Engine -> Search Using Google:)
682 * Navigator -> Tabbed Browsing -> Enable all options under Open Tabs
683 instead of windows. Tabs are cool.
684 * Privacy & Security -> Cookies -> Enable Ask me before storing a
685 cookie. Bye bye Doubleclick.
686 * Privacy & Security -> Images -> Enable Ask me before downloading an
687 image. Do this only if you are on a slow connection. Otherwise it is
688 more of a hassle. I usually set it because it prevents the user
689 tracking images from loading.
690 * Advanced -> Scripts & Windows -> Disable Open Unrequested Windows,
691 Move or resize existing windows, Raise or lower windows. Bye bye X10.
692 * Advanced -> Cache -> Disk Cache = 8192KB. I had some problems in an
693 older version when the disk cache became very large (although that was
694 on Windows 2000:D). Anyways 50 MB sounds a bit too much.
697 Installing Adobe Acrobat Plugin:
699 Download the Acrobat Reader from Adobe's website.
700 http://www.adobe.com/products/acrobat/readstep2.html
702 Install Acrobat in /opt/acrobat. Now link the plugin.
703 cd $MOZ_PLUGIN_PATH &&
704 ln -s /opt/acrobat/Browsers/intellinux/nppdf.so
707 Installing Java Plugin:
709 Download SUN JRE 1.4 from
710 http://java.sun.com/j2se/
712 Install JDK in /opt/j2sdk and then link the plugin.
713 cd $MOZ_PLUGIN_PATH &&
714 ln -s ${JAVA_HOME}/jre/plugin/i386/ns610/libjavaplugin_oji.so
716 Some alternative java plugins:
717 http://www.alphaworks.ibm.com/
718 http://www.blackdown.org/
720 I have succesfully managed to compile Java 2 SDK 1.4 that is linked against
721 GCC3. Check out the "Java From Scratch" hint.
724 Installing Macromedia Flash Player:
726 Download the Flash Player from Macromedia's website.
727 http://sdc.shockwave.com/shockwave/download/alternates/#linux
730 cp libflashplayer.so ShockwaveFlash.class $MOZ_PLUGIN_PATH
733 Installing RealPlayer:
735 Download the plugin from Real Networks.
736 http://forms.real.com/real/player/unix/unix.html
738 Install RealPlayer in /opt/RealPlayer8 and then copy the plugin to mozilla's
740 cp rpnp.so raclass.zip $MOZ_PLUGIN_PATH
743 CodeWeaver's CrossOver Plugin:
745 If you are interested in using Windows plugins, this commercial product will
746 allow you to do it. Check out:
747 http://www.codeweavers.com/products/crossover/
750 Problems and Workarounds:
752 * If you are using the gcc2 compatible patch when compiling for gcc3, avoid
753 stripping the mozilla-bin binary. If you follow the instructions mentioned
754 above, the binaries are stripped of debugging information. So no need to strip
755 further. Credit for the problem and the workaround goes to Kelledin.
758 Have fun mozzing around.
760 Don't forget to send me bug reports and enhancements so that I can keep the hint