Compiling 32-bit Firefox on a Linux 64-bit OS

  • Revision slug: Compiling_32-bit_Firefox_on_a_Linux_64-bit_OS
  • Revision title: Compiling 32-bit Firefox on a Linux 64-bit OS
  • Revision id: 66430
  • Created:
  • Creator: Benjamin Smedberg
  • Is current revision? No
  • Comment Show me the 32-bit love

Revision Content

The following commands are a recipe bsmedberg uses to compile 32-bit Firefox on an x86-64 Fedora Core 7 system. This is not technically cross-compiling, because the "target" binaries being produced will run on the native system; this means that a lot of the complexities of cross-compiling can be avoided.

Packages

The following extra packages must be installed (using <tt>sudo yum install packagename</tt>:

  • libXi-devel.i386
  • cairo-devel.i386
  • xorg-x11-proto-devel.i386
  • fontconfig-devel.i386 - Unfortunately, <tt>yum</tt> refuses to install this package at the same time as fontconfig-devel.x86_64 - I had to download the RPM and install it manually using <tt>rpm -i --replacefiles fontconfig-devel-2.4.2-3.fc7.i386.rpm</tt>
  • libIDL-devel.i386

Configuration

To configure by hand in a bash-like shell, use the following command:

PKG_CONFIG_LIBDIR=/usr/lib/pkgconfig CC="gcc -m32" CXX="g++ -m32" ../mozilla/configure --x-libraries=/usr/lib --target=i686-pc-linux --other-options-here

To do the same thing with a mozconfig file:

export PKG_CONFIG_LIBDIR=/usr/lib/pkgconfig
CC="gcc -m32"
CXX="g++ -m32"
ac_add_options --x-libraries=/usr/lib
ac_add_options --target=i686-pc-linux

Revision Source

<p>The following commands are a recipe bsmedberg uses to compile 32-bit Firefox on an x86-64 Fedora Core 7 system. This is not technically cross-compiling, because the "target" binaries being produced will run on the native system; this means that a lot of the complexities of cross-compiling can be avoided.
</p>
<h3 name="Packages"> Packages </h3>
<p>The following extra packages must be installed (using <tt>sudo yum install <var>packagename</var></tt>:
</p>
<ul><li> libXi-devel.i386
</li><li> cairo-devel.i386
</li><li> xorg-x11-proto-devel.i386
</li><li> fontconfig-devel.i386 - Unfortunately, <tt>yum</tt> refuses to install this package at the same time as fontconfig-devel.x86_64 - I had to download the RPM and install it manually using <tt>rpm -i --replacefiles fontconfig-devel-2.4.2-3.fc7.i386.rpm</tt>
</li><li> libIDL-devel.i386
</li></ul>
<h3 name="Configuration"> Configuration </h3>
<p>To configure by hand in a bash-like shell, use the following command:
</p><p>PKG_CONFIG_LIBDIR=/usr/lib/pkgconfig CC="gcc -m32" CXX="g++ -m32" ../mozilla/configure --x-libraries=/usr/lib --target=i686-pc-linux <var>--other-options-here</var>
</p><p>To do the same thing with a mozconfig file:
</p>
<pre>export PKG_CONFIG_LIBDIR=/usr/lib/pkgconfig
CC="gcc -m32"
CXX="g++ -m32"
ac_add_options --x-libraries=/usr/lib
ac_add_options --target=i686-pc-linux</pre>
Revert to this revision