Compiling FileZilla 3 under macOS: Difference between revisions
(revamped dependencies for using gnutls 3 with nettle instead of gnutls 2 with libgcrypt) |
|||
Line 47: | Line 47: | ||
FileZilla depends on the work of several open source projects. We must build them before we can build FileZilla. | FileZilla depends on the work of several open source projects. We must build them before we can build FileZilla. | ||
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). | |||
=== pkg-config === | |||
''Note'': Mac OS X Lion (10.7) appears to come with pkg-config already installed. So you should be able to skip this if you have 10.7 or later. | |||
Download [http:// | Download [http://pkgconfig.freedesktop.org/releases/ pkg-config]. The current version is [http://pkgconfig.freedesktop.org/releases/pkg-config-0.28.tar.gz pkg-config-0.28.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 | ||
tar xzf ~/ | tar xzf ~/Downloads/pkg-config-0.28.tar.gz | ||
cd | cd pkg-config-0.28 | ||
./configure --prefix $HOME/filezilla/pkg-config --with-internal-glib \ | |||
&& nice make && make install | |||
=== GNU gettext === | === GNU gettext === | ||
Download [ftp://ftp.gnu.org/gnu/gettext/ GNU gettext]. The current version is [ftp://ftp.gnu.org/gnu/gettext/gettext-0.18. | Download [ftp://ftp.gnu.org/gnu/gettext/ GNU gettext]. The current version is [ftp://ftp.gnu.org/gnu/gettext/gettext-0.18.2.1.tar.gz gettext-0.18.2.1.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 | ||
tar xzf ~/ | tar xzf ~/Downloads/gettext-0.18.2.1.tar.gz | ||
cd gettext-0.18. | cd gettext-0.18.2.1 | ||
./configure --prefix $HOME/filezilla/gettext && nice make && make install | ./configure --prefix $HOME/filezilla/gettext && nice make && make install | ||
=== | === xz-utils === | ||
Download [http:// | Download [http://tukaani.org/xz/ xz-utils]. The current version is [http://tukaani.org/xz/xz-5.0.4.tar.bz2 xz-5.0.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 | ||
tar | tar xjf ~/Downloads/xz-5.0.4.tar.bz2 | ||
cd | cd xz-5.0.4 | ||
./configure --prefix $HOME/filezilla/ | ./configure --prefix $HOME/filezilla/xz && nice make && make install | ||
=== wxWidgets === | |||
Download [http://www.wxwidgets.org/downloads/ wxWidgets]. The current version for Mac is [http://prdownloads.sourceforge.net/wxwindows/wxMac-2.8.12.tar.gz wxMac-2.8.12.tar.gz]. | |||
Start Terminal from the Applications/Utilities folder and enter the following commands: | |||
export CFLAGS="${CFLAGS} -O2 -arch i386" | |||
export CXXFLAGS="${CXXFLAGS} ${CFLAGS}" | |||
export OBJCXXFLAGS="${OBJCXXFLAGS} ${CFLAGS}" | |||
export LDFLAGS="${LDFLAGS} -arch i386" | |||
cd /tmp | |||
tar xzf ~/Downloads/wxMac-2.8.12.tar.gz | |||
cd wxMac-2.8.12 | |||
mkdir build-wx && cd build-wx | |||
../configure --disable-compat26 --enable-unicode --prefix $HOME/filezilla/wxMac \ | |||
--enable-printfposparam && nice make && make install | |||
=== GNU libidn === | === GNU libidn === | ||
Download [ftp://ftp.gnu.org/gnu/libidn/ GNU libidn]. The current version is [ftp://ftp.gnu.org/gnu/libidn/libidn-1. | Download [ftp://ftp.gnu.org/gnu/libidn/ GNU libidn]. The current version is [ftp://ftp.gnu.org/gnu/libidn/libidn-1.26.tar.gz libidn-1.26.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: | ||
export CFLAGS="${CFLAGS} -O2 -arch i386" | |||
export CXXFLAGS="${CXXFLAGS} ${CFLAGS}" | |||
export OBJCXXFLAGS="${OBJCXXFLAGS} ${CFLAGS}" | |||
export LDFLAGS="${LDFLAGS} -arch i386" | |||
cd /tmp | cd /tmp | ||
tar xzf ~/ | tar xzf ~/Downloads/libidn-1.26.tar.gz | ||
cd libidn-1. | cd libidn-1.26 | ||
./configure --prefix $HOME/filezilla/libidn && nice make && make install | ./configure --prefix $HOME/filezilla/libidn && nice make && make install | ||
=== | === GNU mp === | ||
Download [ | Download [http://gmplib.org/ GNU mp]. The current version is [ftp://ftp.gnu.org/gnu/gmp/gmp-5.1.2.tar.bz2 gmp-5.1.2.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: | ||
export CFLAGS="${CFLAGS} -O2 -arch i386" | |||
export CXXFLAGS="${CXXFLAGS} ${CFLAGS}" | |||
export OBJCXXFLAGS="${OBJCXXFLAGS} ${CFLAGS}" | |||
export LDFLAGS="${LDFLAGS} -arch i386" | |||
cd /tmp | cd /tmp | ||
tar xjf ~/ | tar xjf ~/Downloads/gmp-5.1.2.tar.bz2 | ||
cd | cd gmp-5.1.2 | ||
./configure | ./configure -prefix $HOME/filezilla/gmp --build=i386-apple-darwin && nice make && make install | ||
=== | === libnettle === | ||
Download [ | Download [http://www.lysator.liu.se/~nisse/nettle/ libnettle]. The current version is [http://www.lysator.liu.se/~nisse/archive/nettle-2.7.tar.gz nettle-2.7.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: | ||
export CPPFLAGS="${CPPFLAGS} -I$HOME/filezilla/gmp/include" | |||
export CFLAGS="${CFLAGS} -O2 -arch i386" | |||
export CXXFLAGS="${CXXFLAGS} ${CFLAGS}" | |||
export OBJCXXFLAGS="${OBJCXXFLAGS} ${CFLAGS}" | |||
export LDFLAGS="${LDFLAGS} -arch i386 -L$HOME/filezilla/gmp/lib" | |||
cd /tmp | cd /tmp | ||
tar | tar xzf ~/Downloads/nettle-2.7.tar.gz | ||
cd | cd nettle-2.7 | ||
./configure --prefix $HOME/filezilla/ | ./configure --prefix $HOME/filezilla/nettle && nice make && make install | ||
=== GNU TLS === | === GNU TLS === | ||
Download [ | Download [http://www.gnutls.org/ GNU TLS]. The current version is [ftp://ftp.gnutls.org/gcrypt/gnutls/v3.2/gnutls-3.2.0.tar.xz gnutls-3.2.0.tar.xz]. | ||
Start Terminal from the Applications/Utilities folder and enter the following commands: | Start Terminal from the Applications/Utilities folder and enter the following commands: | ||
export CPPFLAGS="${CPPFLAGS} -I$HOME/filezilla/gmp/include -I$HOME/filezilla/libidn/include" | |||
export CFLAGS="${CFLAGS} -O2 -arch i386" | |||
export CXXFLAGS="${CXXFLAGS} ${CFLAGS}" | |||
export OBJCXXFLAGS="${OBJCXXFLAGS} ${CFLAGS}" | |||
export LDFLAGS="${LDFLAGS} -arch i386 -L$HOME/filezilla/gmp/lib -L$HOME/filezilla/libidn/lib" | |||
export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:$HOME/filezilla/libidn/lib/pkgconfig" | |||
export PATH="$HOME/filezilla/xz/bin:$PATH" | |||
cd /tmp | cd /tmp | ||
xzcat ~/Downloads/gnutls-3.2.0.tar.xz | tar x | |||
cd gnutls-2. | cd gnutls-3.2.0 | ||
./configure --prefix $HOME/filezilla/gnutls -- | ./configure --prefix=$HOME/filezilla/gnutls --build=i386-apple-darwin \ | ||
--with-libnettle-prefix=$HOME/filezilla/nettle && nice make && make install | |||
=== SQLite === | === SQLite === | ||
Download [http://www.sqlite.org/download.html SQLite]. The current version is [http://www.sqlite.org/sqlite-autoconf- | Download [http://www.sqlite.org/download.html SQLite]. The current version is [http://www.sqlite.org/2013/sqlite-autoconf-3071700.tar.gz sqlite-autoconf-3071700.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: | ||
export CFLAGS="${CFLAGS} -O2 -arch i386" | |||
export CXXFLAGS="${CXXFLAGS} ${CFLAGS}" | |||
export OBJCXXFLAGS="${OBJCXXFLAGS} ${CFLAGS}" | |||
export LDFLAGS="${LDFLAGS} -arch i386" | |||
cd /tmp | cd /tmp | ||
tar xzf ~/ | tar xzf ~/Downloads/sqlite-autoconf-3071700.tar.gz | ||
cd sqlite-autoconf- | cd sqlite-autoconf-3071700 | ||
./configure --prefix $HOME/filezilla/sqlite --disable-static && nice make && make install | ./configure --prefix $HOME/filezilla/sqlite --disable-static && nice make && make install | ||
Revision as of 00:25, 28 May 2013
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 have been tested under Tiger and Leopard on an Intel Mac. Other Mac OS versions may or may not work.
See this post for more information about the build process on Tiger along with some automated build files.
Automated building with Fink
You may find it easier to use Fink to automate the process of building FileZilla from source.
Advantages of Fink
- works under Tiger and Leopard on Intel and PPC
- all necessary dependencies are downloaded, built, and installed automatically with a single command
- does not interfere with any system software or other third-party software on your machine
- as new versions of FileZilla are released, rebuilding and upgrading is automated
Disadvantages of Fink
- packaged version of FileZilla can sometimes lag behind the newest release
- customizing the build process is not straightforward
Instructions
- Install Fink per the User's Guide.
- Enable the "unstable" tree per this FAQ entry.
- Run
fink install filezilla
in a Terminal window.
Once the build process completes successfully, you will find a FileZilla icon in your Applications folder.
Setting up the build environment
This includes the compiler and the required tools to build FileZilla 3 and its dependencies.
Xcode
You will need to download the version of Xcode appropriate for your version of OS X.
- Xcode 2.5 for Tiger
- Xcode 3.2.6 for Leopard and Snow Leopard
- Xcode 4 for Lion can be found in the App Store
If you are using Xcode 2.5, you will need to customize the install. Ensure all options under "Command Line Support" are checked. In Xcode 3, this is not necessary.
Building the Dependencies
FileZilla depends on the work of several open source projects. We must build them before we can build FileZilla.
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).
pkg-config
Note: Mac OS X Lion (10.7) appears to come with pkg-config already installed. So you should be able to skip this if you have 10.7 or later.
Download pkg-config. The current version is pkg-config-0.28.tar.gz.
Start Terminal from the Applications/Utilities folder and enter the following commands:
cd /tmp tar xzf ~/Downloads/pkg-config-0.28.tar.gz cd pkg-config-0.28 ./configure --prefix $HOME/filezilla/pkg-config --with-internal-glib \ && nice make && make install
GNU gettext
Download GNU gettext. The current version is gettext-0.18.2.1.tar.gz.
Start Terminal from the Applications/Utilities folder and enter the following commands:
cd /tmp tar xzf ~/Downloads/gettext-0.18.2.1.tar.gz cd gettext-0.18.2.1 ./configure --prefix $HOME/filezilla/gettext && nice make && make install
xz-utils
Download xz-utils. The current version is xz-5.0.4.tar.bz2.
Start Terminal from the Applications/Utilities folder and enter the following commands:
cd /tmp tar xjf ~/Downloads/xz-5.0.4.tar.bz2 cd xz-5.0.4 ./configure --prefix $HOME/filezilla/xz && nice make && make install
wxWidgets
Download wxWidgets. The current version for Mac is wxMac-2.8.12.tar.gz.
Start Terminal from the Applications/Utilities folder and enter the following commands:
export CFLAGS="${CFLAGS} -O2 -arch i386" export CXXFLAGS="${CXXFLAGS} ${CFLAGS}" export OBJCXXFLAGS="${OBJCXXFLAGS} ${CFLAGS}" export LDFLAGS="${LDFLAGS} -arch i386" cd /tmp tar xzf ~/Downloads/wxMac-2.8.12.tar.gz cd wxMac-2.8.12 mkdir build-wx && cd build-wx ../configure --disable-compat26 --enable-unicode --prefix $HOME/filezilla/wxMac \ --enable-printfposparam && nice make && make install
GNU libidn
Download GNU libidn. The current version is libidn-1.26.tar.gz.
Start Terminal from the Applications/Utilities folder and enter the following commands:
export CFLAGS="${CFLAGS} -O2 -arch i386" export CXXFLAGS="${CXXFLAGS} ${CFLAGS}" export OBJCXXFLAGS="${OBJCXXFLAGS} ${CFLAGS}" export LDFLAGS="${LDFLAGS} -arch i386" cd /tmp tar xzf ~/Downloads/libidn-1.26.tar.gz cd libidn-1.26 ./configure --prefix $HOME/filezilla/libidn && nice make && make install
GNU mp
Download GNU mp. The current version is gmp-5.1.2.tar.bz2.
Start Terminal from the Applications/Utilities folder and enter the following commands:
export CFLAGS="${CFLAGS} -O2 -arch i386" export CXXFLAGS="${CXXFLAGS} ${CFLAGS}" export OBJCXXFLAGS="${OBJCXXFLAGS} ${CFLAGS}" export LDFLAGS="${LDFLAGS} -arch i386" cd /tmp tar xjf ~/Downloads/gmp-5.1.2.tar.bz2 cd gmp-5.1.2 ./configure -prefix $HOME/filezilla/gmp --build=i386-apple-darwin && nice make && make install
libnettle
Download libnettle. The current version is nettle-2.7.tar.gz.
Start Terminal from the Applications/Utilities folder and enter the following commands:
export CPPFLAGS="${CPPFLAGS} -I$HOME/filezilla/gmp/include" export CFLAGS="${CFLAGS} -O2 -arch i386" export CXXFLAGS="${CXXFLAGS} ${CFLAGS}" export OBJCXXFLAGS="${OBJCXXFLAGS} ${CFLAGS}" export LDFLAGS="${LDFLAGS} -arch i386 -L$HOME/filezilla/gmp/lib" cd /tmp tar xzf ~/Downloads/nettle-2.7.tar.gz cd nettle-2.7 ./configure --prefix $HOME/filezilla/nettle && nice make && make install
GNU TLS
Download GNU TLS. The current version is gnutls-3.2.0.tar.xz.
Start Terminal from the Applications/Utilities folder and enter the following commands:
export CPPFLAGS="${CPPFLAGS} -I$HOME/filezilla/gmp/include -I$HOME/filezilla/libidn/include" export CFLAGS="${CFLAGS} -O2 -arch i386" export CXXFLAGS="${CXXFLAGS} ${CFLAGS}" export OBJCXXFLAGS="${OBJCXXFLAGS} ${CFLAGS}" export LDFLAGS="${LDFLAGS} -arch i386 -L$HOME/filezilla/gmp/lib -L$HOME/filezilla/libidn/lib" export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:$HOME/filezilla/libidn/lib/pkgconfig" export PATH="$HOME/filezilla/xz/bin:$PATH" cd /tmp xzcat ~/Downloads/gnutls-3.2.0.tar.xz | tar x cd gnutls-3.2.0 ./configure --prefix=$HOME/filezilla/gnutls --build=i386-apple-darwin \ --with-libnettle-prefix=$HOME/filezilla/nettle && nice make && make install
SQLite
Download SQLite. The current version is sqlite-autoconf-3071700.tar.gz.
Start Terminal from the Applications/Utilities folder and enter the following commands:
export CFLAGS="${CFLAGS} -O2 -arch i386" export CXXFLAGS="${CXXFLAGS} ${CFLAGS}" export OBJCXXFLAGS="${OBJCXXFLAGS} ${CFLAGS}" export LDFLAGS="${LDFLAGS} -arch i386" cd /tmp tar xzf ~/Downloads/sqlite-autoconf-3071700.tar.gz cd sqlite-autoconf-3071700 ./configure --prefix $HOME/filezilla/sqlite --disable-static && nice make && make install
Building FileZilla 3
Download the FileZilla source. The current version is FileZilla_3.5.1.src.tar.bz2.
Start Terminal from the Applications/Utilities folder and enter the following commands:
cd /tmp tar xjf ~/Desktop/FileZilla_3.5.1_src.tar.bz2 cd filezilla-3.5.1 export PATH=$HOME/filezilla/wxMac/bin:$HOME/filezilla/gettext/bin:$HOME/filezilla/pkg-config/bin:$PATH export PKG_CONFIG_PATH=$HOME/filezilla/gnutls/lib/pkgconfig:$HOME/filezilla/sqlite/lib/pkgconfig export CPPFLAGS="-I$HOME/filezilla/libidn/include" export LDFLAGS="-L$HOME/filezilla/libidn/lib" ./configure && nice make cd FileZilla.app/Contents/MacOS strip filezilla fzputtygen fzsftp cd - && mv FileZilla.app ~/Desktop
If you get an error after "nice make", try this:
rm -rf FileZilla.app && nice make
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. Feel free to ask questions on the FileZilla forums.
Building under 10.6 Snow Leopard
When trying to build these codes under 10.6 you might - on certain machines - end up with errors. The reason is that we fail to compile wxWidgets for 64 bits. See [1] for how to build wxMac for 32 bits, or we may just use the Macports to install wxWidgets:
sudo port install wxwidgets
And now we also need to build libgpg-error, libgcrypt, GNU TLS and GNU libidn for 32 bits. Here is the commands for libgpg-error:
$ arch_flags="-arch i386" $ ./configure --prefix $HOME/filezilla/libgpg-error CFLAGS="$arch_flags" CXXFLAGS="$arch_flags" \ CPPFLAGS="$arch_flags" LDFLAGS="$arch_flags" OBJCFLAGS="$arch_flags" OBJCXXFLAGS="$arch_flags" $ nice make -j5 && make install
The commands for installing libgcrypt:
cd libgcrypt-1.4.6 ./configure --prefix $HOME/filezilla/libgcrypt --with-gpg-error-prefix=$HOME/filezilla/libgpg-error CC="gcc -m32" nice make -j5 && make install
Note CC="gcc -m32" is used for building Assemble code for 32 bits. For GNU TLS:
$ ./configure --prefix $HOME/filezilla/gnutls --with-libgcrypt --with-libgcrypt-prefix=$HOME/filezilla/libgcrypt \ CFLAGS="$arch_flags" CXXFLAGS="$arch_flags" CPPFLAGS="$arch_flags" LDFLAGS="$arch_flags" \ OBJCFLAGS="$arch_flags" OBJCXXFLAGS="$arch_flags" $ nice make -j5 && make install
And for GNU libidn:
$ cd libidn-1.22 $ ./configure --prefix $HOME/filezilla/libidn CFLAGS="$arch_flags" CXXFLAGS="$arch_flags" CPPFLAGS="$arch_flags" \ LDFLAGS="$arch_flags" OBJCFLAGS="$arch_flags" OBJCXXFLAGS="$arch_flags" $ nice make -j5 && make install
Now we can build FileZilla:
cd filezilla-3.5.0 export PATH=$HOME/filezilla/wxMac/bin:$HOME/filezilla/gettext/bin:$HOME/filezilla/pkg-config/bin:$PATH export PKG_CONFIG_PATH=$HOME/filezilla/gnutls/lib/pkgconfig:$HOME/filezilla/sqlite/lib/pkgconfig export CPPFLAGS="-I$HOME/filezilla/libidn/include" $ ./configure CFLAGS="$arch_flags" CXXFLAGS="$arch_flags" CPPFLAGS="$arch_flags" LDFLAGS="$arch_flags" \ OBJCFLAGS="$arch_flags" OBJCXXFLAGS="$arch_flags" --with-tinyxml=builtin --with-idn-lib=$HOME/filezilla/libidn/lib/libidn.dylib $ nice make -j5 $ cd FileZilla.app/Contents/MacOS $ strip filezilla fzputtygen fzsftp $ cd - $ mv FileZilla.app/ ~/Desktop/