Compiling FileZilla 3 under macOS: Difference between revisions

From FileZilla Wiki
Jump to navigationJump to search
m (revert to 3.2.0 version since 3.2.1 has major bug http://forum.filezilla-project.org/viewtopic.php?f=2&t=9994)
(updated for FileZilla 3.2.2.1; updated libidn to 1.12, libgcrypt to 1.4.4, gnutls to 2.6.4)
Line 28: Line 28:


  cd /tmp
  cd /tmp
  gzip -cd ~/Desktop/wxMac-2.8.9.tar.gz | tar x
  gzcat ~/Desktop/wxMac-2.8.9.tar.gz | tar x
  mkdir build-wx
  mkdir build-wx
  cd build-wx
  cd build-wx
Line 36: Line 36:
=== GNU gettext ===
=== GNU gettext ===


Download [http://ftp.gnu.org/gnu/gettext/ GNU gettext]. The current version is [http://ftp.gnu.org/gnu/gettext/gettext-0.17.tar.gz gettext-0.17.tar.gz].
Download [ftp://ftp.gnu.org/gnu/gettext/ GNU gettext]. The current version is [ftp://ftp.gnu.org/gnu/gettext/gettext-0.17.tar.gz gettext-0.17.tar.gz].


Start Terminal from the Applications/Utilities folder and enter the following commands:
Start Terminal from the Applications/Utilities folder and enter the following commands:


  cd /tmp
  cd /tmp
  gzip -cd ~/Desktop/gettext-0.17.tar.gz | tar x
  gzcat ~/Desktop/gettext-0.17.tar.gz | tar x
  cd gettext-0.17
  cd gettext-0.17
  ./configure --prefix "$HOME/filezilla/gettext" && nice make && make install
  ./configure --prefix "$HOME/filezilla/gettext" && nice make && make install
Line 47: Line 47:
=== GNU libidn ===
=== GNU libidn ===


Download [http://ftp.gnu.org/gnu/libidn/ GNU libidn]. The current version is [http://ftp.gnu.org/gnu/libidn/libidn-1.11.tar.gz libidn-1.11.tar.gz].
Download [ftp://ftp.gnu.org/gnu/libidn/ GNU libidn]. The current version is [ftp://ftp.gnu.org/gnu/libidn/libidn-1.12.tar.gz libidn-1.12.tar.gz].


Start Terminal from the Applications/Utilities folder and enter the following commands:
Start Terminal from the Applications/Utilities folder and enter the following commands:


  cd /tmp
  cd /tmp
  gzip -cd ~/Desktop/libidn-1.11.tar.gz | tar x
  gzcat ~/Desktop/libidn-1.12.tar.gz | tar x
  cd libidn-1.11
  cd libidn-1.12
  ./configure --disable-shared --prefix "$HOME/filezilla/libidn" && nice make && make install
  ./configure --disable-shared --prefix "$HOME/filezilla/libidn" && nice make && make install


Line 63: Line 63:


  cd /tmp
  cd /tmp
  bzip2 -cd ~/Desktop/libgpg-error-1.7.tar.bz2 | tar x
  bzcat ~/Desktop/libgpg-error-1.7.tar.bz2 | tar x
  cd libgpg-error-1.7
  cd libgpg-error-1.7
  ./configure --disable-shared --prefix "$HOME/filezilla/libgpg-error" && nice make && make install
  ./configure --disable-shared --prefix "$HOME/filezilla/libgpg-error" && nice make && make install
Line 69: Line 69:
=== libgcrypt ===
=== libgcrypt ===


Download [ftp://ftp.gnupg.org/gcrypt/libgcrypt/ libgcrypt]. The current version is [ftp://ftp.gnupg.org/gcrypt/libgcrypt/libgcrypt-1.4.3.tar.bz2 libgcrypt-1.4.3.tar.bz2].
Download [ftp://ftp.gnupg.org/gcrypt/libgcrypt/ libgcrypt]. The current version is [ftp://ftp.gnupg.org/gcrypt/libgcrypt/libgcrypt-1.4.4.tar.bz2 libgcrypt-1.4.4.tar.bz2].


Start Terminal from the Applications/Utilities folder and enter the following commands:
Start Terminal from the Applications/Utilities folder and enter the following commands:


  cd /tmp
  cd /tmp
  bzip2 -cd ~/Desktop/libgcrypt-1.4.3.tar.bz2 | tar x
  bzcat ~/Desktop/libgcrypt-1.4.4.tar.bz2 | tar x
  cd libgcrypt-1.4.3
  cd libgcrypt-1.4.4
  ./configure --disable-shared --prefix "$HOME/filezilla/libgcrypt" \
  ./configure --disable-shared --prefix "$HOME/filezilla/libgcrypt" \
  --with-gpg-error-prefix="$HOME/filezilla/libgpg-error" && nice make && make install
  --with-gpg-error-prefix="$HOME/filezilla/libgpg-error" && nice make && make install
Line 81: Line 81:
=== GNU TLS ===
=== GNU TLS ===


Download [http://ftp.gnu.org/gnu/gnutls/ GNU TLS]. The current version is [http://ftp.gnu.org/gnu/gnutls/gnutls-2.6.3.tar.bz2 gnutls-2.6.3.tar.bz2]
Download [ftp://ftp.gnu.org/gnu/gnutls/ GNU TLS]. The current version is [ftp://ftp.gnu.org/gnu/gnutls/gnutls-2.6.4.tar.bz2 gnutls-2.6.4.tar.bz2]


You also need to download [http://filezilla-project.org/codesquid/gnutls.patch gnutls.patch].
You also need to download [http://filezilla-project.org/codesquid/gnutls.patch gnutls.patch].
Line 88: Line 88:


  cd /tmp
  cd /tmp
  bzip2 -cd ~/Desktop/gnutls-2.6.3.tar.bz2 | tar x
  bzcat ~/Desktop/gnutls-2.6.4.tar.bz2 | tar x
  cd gnutls-2.6.3
  cd gnutls-2.6.4
  patch < ~/Desktop/gnutls.patch
  patch < ~/Desktop/gnutls.patch
  ./configure --disable-shared --prefix "$HOME/filezilla/gnutls" \
  ./configure --disable-shared --prefix "$HOME/filezilla/gnutls" \
Line 108: Line 108:
== Building [[FileZilla 3]] ==
== Building [[FileZilla 3]] ==


Download the [http://filezilla-project.org/download.php?type=client FileZilla source]. The current version is [https://www.ohloh.net/projects/filezilla/download?filename=FileZilla_3.2.0_src.tar.bz2 FileZilla_3.2.0_src.tar.bz2].
Download the [http://filezilla-project.org/download.php?type=client FileZilla source]. The current version is [https://www.ohloh.net/projects/filezilla/download?filename=FileZilla_3.2.2.1_src.tar.bz2 FileZilla_3.2.2.1_src.tar.bz2].


Start Terminal from the Applications/Utilities folder and enter the following commands:
Start Terminal from the Applications/Utilities folder and enter the following commands:


  cd /tmp
  cd /tmp
  bzip2 -cd ~/Desktop/FileZilla_3.2.0_src.tar.bz2 | tar x
  bzcat ~/Desktop/FileZilla_3.2.2.1_src.tar.bz2 | tar x
  cd filezilla-3.2.0
  cd filezilla-3.2.2.1
  export PATH="$HOME/filezilla/wxMac-2.8.9/bin":"$HOME/filezilla/gettext/bin":$PATH
  export PATH="$HOME/filezilla/wxMac-2.8.9/bin":"$HOME/filezilla/gettext/bin":$PATH
  ./configure CPPFLAGS="-I\"$HOME/filezilla/libidn/include\"" \
  ./configure CPPFLAGS="-I\"$HOME/filezilla/libidn/include\"" \

Revision as of 23:52, 22 February 2009

This documentation explains how to setup a build environment for FileZilla 3 and how to compile it under Mac OS X using Xcode. These directions were written for and tested under Mac OS X Tiger Intel. They may or may not work with Panther, Leopard, or any other Mac Cats you have.

Setting up the build environment

This includes the compiler and the required tools to build FileZilla 3 and its dependancies.

Xcode

Download and install the latest Xcode package for your system. Xcode 2.5 is the right version for Tiger.

Be sure you Customize the install. You will need to make sure all options under "Command Line Support" are checked.

Building the Dependencies

FileZilla depends on the work of several open source projects. We must build them before we can build FileZilla.

The dependencies can take a long time to build. Instead of waiting for each project to build, you can start an additional Terminal Shell for each one and run them at the same time. However, you must have libgpg-error built before libgcrypt, and you must have libgcrypt built before GNU TLS.

If you have a multi-core machine, the build may go faster if you change "nice make" to "nice make -jN" where N equals the number of cores you have + 1 (e.g. dual-core: N = 3).

wxWidgets

Download wxWidgets. You will need version 2.8.9 or later. The current version for Mac is wxMac-2.8.9.tar.gz.

Start Terminal from the Applications/Utilities folder and enter the following commands:

cd /tmp
gzcat ~/Desktop/wxMac-2.8.9.tar.gz | tar x
mkdir build-wx
cd build-wx
../wxMac-2.8.9/configure --disable-shared --disable-compat26 --enable-unicode \
--prefix "$HOME/filezilla/wxMac-2.8.9" && nice make && make install

GNU gettext

Download GNU gettext. The current version is gettext-0.17.tar.gz.

Start Terminal from the Applications/Utilities folder and enter the following commands:

cd /tmp
gzcat ~/Desktop/gettext-0.17.tar.gz | tar x
cd gettext-0.17
./configure --prefix "$HOME/filezilla/gettext" && nice make && make install

GNU libidn

Download GNU libidn. The current version is libidn-1.12.tar.gz.

Start Terminal from the Applications/Utilities folder and enter the following commands:

cd /tmp
gzcat ~/Desktop/libidn-1.12.tar.gz | tar x
cd libidn-1.12
./configure --disable-shared --prefix "$HOME/filezilla/libidn" && nice make && make install

libgpg-error

Download libgpg-error. The current version is libgpg-error-1.7.tar.bz2.

Start Terminal from the Applications/Utilities folder and enter the following commands:

cd /tmp
bzcat ~/Desktop/libgpg-error-1.7.tar.bz2 | tar x
cd libgpg-error-1.7
./configure --disable-shared --prefix "$HOME/filezilla/libgpg-error" && nice make && make install

libgcrypt

Download libgcrypt. The current version is libgcrypt-1.4.4.tar.bz2.

Start Terminal from the Applications/Utilities folder and enter the following commands:

cd /tmp
bzcat ~/Desktop/libgcrypt-1.4.4.tar.bz2 | tar x
cd libgcrypt-1.4.4
./configure --disable-shared --prefix "$HOME/filezilla/libgcrypt" \
--with-gpg-error-prefix="$HOME/filezilla/libgpg-error" && nice make && make install

GNU TLS

Download GNU TLS. The current version is gnutls-2.6.4.tar.bz2

You also need to download gnutls.patch.

Start Terminal from the Applications/Utilities folder and enter the following commands:

cd /tmp
bzcat ~/Desktop/gnutls-2.6.4.tar.bz2 | tar x
cd gnutls-2.6.4
patch < ~/Desktop/gnutls.patch
./configure --disable-shared --prefix "$HOME/filezilla/gnutls" \
--with-libgcrypt-prefix="$HOME/filezilla/libgcrypt" && nice make && make install

Now we need to fix a problem with libgnutls-config because it forgets it needs zlib.

Open the file "$HOME/filezilla/gnutls/bin/libgnutls-config" in TextEdit (or some other text editor). Look for a line near the top that resembles:

gnutls_libs="-L${exec_prefix}/lib -lgnutls  -L/Users/x/filezilla/gnutls/lib -lgcrypt -lgpg-error  "

Add -lz at the end so that it looks more like:

gnutls_libs="-L${exec_prefix}/lib -lgnutls  -L/Users/x/filezilla/gnutls/lib -lgcrypt -lgpg-error -lz "

Please note the space between -lz and the closing quote; it must be present.

Building FileZilla 3

Download the FileZilla source. The current version is FileZilla_3.2.2.1_src.tar.bz2.

Start Terminal from the Applications/Utilities folder and enter the following commands:

cd /tmp
bzcat ~/Desktop/FileZilla_3.2.2.1_src.tar.bz2 | tar x
cd filezilla-3.2.2.1
export PATH="$HOME/filezilla/wxMac-2.8.9/bin":"$HOME/filezilla/gettext/bin":$PATH
./configure CPPFLAGS="-I\"$HOME/filezilla/libidn/include\"" \
--with-idn-lib="$HOME/filezilla/libidn/lib/libidn.a" \
--with-libgnutls-prefix="$HOME/filezilla/gnutls" --disable-shared && nice make
cd FileZilla.app/Contents/MacOS
strip filezilla fzputtygen fzsftp
cd - && mv FileZilla.app ~/Desktop

Troubleshooting

If you run into problems, please make sure you've followed each step exactly how it is explained and that you haven't missed any steps along the way.