Compiling FileZilla 3 under macOS: Difference between revisions

From FileZilla Wiki
Jump to navigationJump to search
(No additional wx flags are needed if this guide is followed precisely.)
 
(73 intermediate revisions by 10 users not shown)
Line 1: Line 1:
This documentation explains how to setup a build environment for [[FileZilla 3]] and how to compile it under Mac OS X using [https://developer.apple.com/TOOLS/xcode/ Xcode]. These directions have been tested under OS X 10.11 on an Intel Mac. Resulting binaries are for OS X 10.7 or later.
This documentation explains how to setup a build environment for [[FileZilla 3]] and how to compile it under macOS using [https://developer.apple.com/xcode/ Xcode]. These directions have been tested under macOS 12 (Monterey) on an Intel Mac. Resulting binaries are for macOS 10.13 or later.
 
__TOC__
__TOC__


== Xcode ==
==Xcode==
 
You need to download and install the latest version of Xcode from https://developer.apple.com/xcode/download/
You need to download and install the latest version of Xcode from https://developer.apple.com/xcode/download/


== Build environment ==
==Build environment==
 
Open a Terminal and type the following:
Open a Terminal and type the following:
  mkdir -p "$HOME/prefix"
  mkdir -p "$HOME/prefix"
  mkdir -p "$HOME/src"
  mkdir -p "$HOME/src"
  export CC="clang -mmacosx-version-min=10.7"
  export CC="clang -mmacosx-version-min=10.13"
  export CXX="clang++ -std=c++14 -stdlib=libc++ -mmacosx-version-min=10.7"
  export CXX="clang++ -std=c++17 -stdlib=libc++ -mmacosx-version-min=10.13"
  export AS="as -mmacosx-version-min=10.7"
export OBJC="clang -mmacosx-version-min=10.13"
  export LD="ld -macosx_version_min 10.7"
export OBJCXX="clang++ -std=c++17 -stdlib=libc++ -mmacosx-version-min=10.13"
  export PATH="$PATH:$HOME/prefix/bin"
  export AS="as -mmacosx-version-min=10.13"
  export LD="ld -macosx_version_min 10.13"
  export PATH="$HOME/prefix/bin:$PATH"
  export CPPFLAGS="-I$HOME/prefix/include"
  export CPPFLAGS="-I$HOME/prefix/include"
  export LDFLAGS="-L$HOME/prefix/lib"
  export LDFLAGS="-L$HOME/prefix/lib"
Line 25: Line 23:
If you ever close the terminal and reopen it, repeat the above steps before you continue.
If you ever close the terminal and reopen it, repeat the above steps before you continue.


== pkg-config ==
==pkg-config==
 
  cd ~/src
  cd ~/src
# Note that we cannot use the newer pkg-config 0.29, it doesn't link on OS X.
  curl -OL https://pkgconfig.freedesktop.org/releases/pkg-config-0.29.2.tar.gz
  curl -OL http://pkgconfig.freedesktop.org/releases/pkg-config-0.28.tar.gz
  tar xvf pkg-config-0.29.2.tar.gz
  tar xvf pkg-config-0.28.tar.gz
  cd pkg-config-0.29.2
  cd pkg-config-0.28
  ./configure --prefix="$HOME/prefix" --enable-shared --disable-static --with-internal-glib
  ./configure --prefix="$HOME/prefix" --disable-shared --with-internal-glib
  make
  make
  make install
  make install


== libidn ==
==libidn==
 
  cd ~/src
  cd ~/src
  curl -OL http://ftp.gnu.org/gnu/libidn/libidn-1.32.tar.gz
  curl -OL https://ftp.gnu.org/gnu/libidn/libidn-1.41.tar.gz
  tar xvzf libidn-1.32.tar.gz
  tar xvzf libidn-1.41.tar.gz
  cd libidn-1.32
  cd libidn-1.41
  ./configure --prefix="$HOME/prefix" --disable-shared
  ./configure --prefix="$HOME/prefix" --enable-shared --disable-static
  make
  make
  make install
  make install


== GMP ==
==GMP==
 
  cd ~/src
  cd ~/src
  curl -OL https://gmplib.org/download/gmp/gmp-6.1.0.tar.xz
  curl -OL https://gmplib.org/download/gmp/gmp-6.3.0.tar.xz
  tar xvf gmp-6.1.0.tar.xz
  tar xvf gmp-6.3.0.tar.xz
  cd gmp-6.1.0
  cd gmp-6.3.0
  ./configure --prefix="$HOME/prefix" --disable-shared --enable-fat
  ./configure --prefix="$HOME/prefix" --enable-shared --disable-static --enable-fat
  make
  make
  make install
  make install


== Nettle ==
==Nettle==
 
  cd ~/src
  cd ~/src
  curl -OL https://ftp.gnu.org/gnu/nettle/nettle-3.1.tar.gz
  curl -OL https://ftp.gnu.org/gnu/nettle/nettle-3.9.1.tar.gz
  tar xvf nettle-3.1.tar.gz
  tar xvf nettle-3.9.1.tar.gz
  cd nettle-3.1
  cd nettle-3.9.1
  ./configure --prefix="$HOME/prefix" --disable-shared --enable-fat  
  ./configure --prefix="$HOME/prefix" --enable-shared --disable-static --enable-fat  
  make
  make
  make install
  make install


== GnuTLS ==
==GnuTLS==
 
  cd ~/src
  cd ~/src
  curl -OL ftp://ftp.gnutls.org/gcrypt/gnutls/v3.4/gnutls-3.4.8.tar.xz
  curl -OL https://www.gnupg.org/ftp/gcrypt/gnutls/v3.8/gnutls-3.8.4.tar.xz
  tar xvf gnutls-3.4.8.tar.xz
  tar xvf gnutls-3.8.4.tar.xz
  cd gnutls-3.4.8
  cd gnutls-3.8.4
  ./configure --prefix="$HOME/prefix" --disable-shared --with-included-libtasn1 --without-p11-kit --disable-doc --enable-local-libopts
  ./configure --prefix="$HOME/prefix" --enable-shared --disable-static --with-included-libtasn1 --without-p11-kit --disable-doc --enable-local-libopts --disable-nls --with-included-unistring --disable-guile --disable-cxx --without-brotli
  make
  make
  make install
  make install


== Compile SQLite ==
==Compile SQLite==
 
  cd ~/src
  cd ~/src
  curl -OL http://sqlite.org/2016/sqlite-autoconf-3100200.tar.gz
  curl -OL https://sqlite.org/2024/sqlite-autoconf-3450300.tar.gz
  tar xvzf sqlite-autoconf-3100200.tar.gz
  tar xvzf sqlite-autoconf-3450300.tar.gz
  cd sqlite-autoconf-3100200
  cd sqlite-autoconf-3450300
  ./configure --prefix="$HOME/prefix" --disable-shared --disable-dynamic-extensions
  ./configure --prefix="$HOME/prefix" --enable-shared --disable-static --disable-dynamic-extensions
  make
  make
  make install
  make install


== gettext ==
==gettext==
 
  cd ~/src
  cd ~/src
  curl -OL http://ftp.gnu.org/pub/gnu/gettext/gettext-0.19.7.tar.xz
  curl -OL https://ftp.gnu.org/pub/gnu/gettext/gettext-0.22.4.tar.xz
  tar xvf gettext-0.19.7.tar.xz
  tar xvf gettext-0.22.4.tar.xz
  cd gettext-0.19.7
  cd gettext-0.22.4
  ./configure --prefix="$HOME/prefix" --disable-shared
  ./configure --prefix="$HOME/prefix" --enable-shared --disable-static
  make
  make
  make install
  make install


== Compile wxWidgets ==
==Compile wxWidgets==
 
  cd ~/src
  cd ~/src
  curl -OL http://sourceforge.net/projects/wxwindows/files/3.0.2/wxWidgets-3.0.2.tar.bz2
  curl -OL https://github.com/wxWidgets/wxWidgets/releases/download/v3.2.4/wxWidgets-3.2.4.tar.bz2
  tar xvf wxWidgets-3.0.2.tar.bz2
  tar xvf wxWidgets-3.2.4.tar.bz2
  cd wxWidgets-3.0.2
  cd wxWidgets-3.2.4
  ./configure --prefix="$HOME/prefix" --disable-shared --disable-webkit --disable-webview
  ./configure --prefix="$HOME/prefix" --enable-shared --without-libcurl --without-libtiff --with-macosx-version-min=10.13
  make
  make
  make install
  make install


== Compile libfilezilla ==
==Compile libfilezilla==
 
  cd ~/src
  cd ~/src
  curl -OL https://download.filezilla-project.org/libfilezilla/libfilezilla-0.3.0.tar.bz2
  curl -OL https://download.filezilla-project.org/libfilezilla/libfilezilla-0.41.1.tar.bz2
  tar xf libfilezilla-0.3.0.tar.bz2
  tar xf libfilezilla-0.41.1.tar.bz2
  cd libfilezilla-0.3.0
  cd libfilezilla-0.41.1
  ./configure --prefix="$HOME/prefix" --disable-shared
  ./configure --prefix="$HOME/prefix" --enable-shared --disable-static
  make
  make
  make install
  make install


== Compile FileZilla ==
==Compile FileZilla==
 
  cd ~/src
  cd ~/src
  curl -OL http://download.filezilla-project.org/client/FileZilla_3.14.1_src.tar.bz2
  curl -OL https://download.filezilla-project.org/client/FileZilla_3.63.2_src.tar.bz2
  tar xvjf FileZilla_3.14.1_src.tar.bz2
  tar xvjf FileZilla_3.63.2_src.tar.bz2
  cd filezilla-3.14.1
  cd filezilla-3.63.2
  ./configure --with-pugixml=builtin
  ./configure --with-pugixml=builtin
  make
  make

Latest revision as of 10:21, 8 May 2024

This documentation explains how to setup a build environment for FileZilla 3 and how to compile it under macOS using Xcode. These directions have been tested under macOS 12 (Monterey) on an Intel Mac. Resulting binaries are for macOS 10.13 or later.

Xcode[edit]

You need to download and install the latest version of Xcode from https://developer.apple.com/xcode/download/

Build environment[edit]

Open a Terminal and type the following:

mkdir -p "$HOME/prefix"
mkdir -p "$HOME/src"
export CC="clang -mmacosx-version-min=10.13"
export CXX="clang++ -std=c++17 -stdlib=libc++ -mmacosx-version-min=10.13"
export OBJC="clang -mmacosx-version-min=10.13"
export OBJCXX="clang++ -std=c++17 -stdlib=libc++ -mmacosx-version-min=10.13"
export AS="as -mmacosx-version-min=10.13"
export LD="ld -macosx_version_min 10.13"
export PATH="$HOME/prefix/bin:$PATH"
export CPPFLAGS="-I$HOME/prefix/include"
export LDFLAGS="-L$HOME/prefix/lib"
export LD_LIBRARY_PATH="$HOME/prefix/lib"
export PKG_CONFIG_PATH="$HOME/prefix/lib/pkgconfig"

If you ever close the terminal and reopen it, repeat the above steps before you continue.

pkg-config[edit]

cd ~/src
curl -OL https://pkgconfig.freedesktop.org/releases/pkg-config-0.29.2.tar.gz
tar xvf pkg-config-0.29.2.tar.gz
cd pkg-config-0.29.2
./configure --prefix="$HOME/prefix" --enable-shared --disable-static --with-internal-glib
make
make install

libidn[edit]

cd ~/src
curl -OL https://ftp.gnu.org/gnu/libidn/libidn-1.41.tar.gz
tar xvzf libidn-1.41.tar.gz
cd libidn-1.41
./configure --prefix="$HOME/prefix" --enable-shared --disable-static
make
make install

GMP[edit]

cd ~/src
curl -OL https://gmplib.org/download/gmp/gmp-6.3.0.tar.xz
tar xvf gmp-6.3.0.tar.xz
cd gmp-6.3.0
./configure --prefix="$HOME/prefix" --enable-shared --disable-static --enable-fat
make
make install

Nettle[edit]

cd ~/src
curl -OL https://ftp.gnu.org/gnu/nettle/nettle-3.9.1.tar.gz
tar xvf nettle-3.9.1.tar.gz
cd nettle-3.9.1
./configure --prefix="$HOME/prefix" --enable-shared --disable-static --enable-fat 
make
make install

GnuTLS[edit]

cd ~/src
curl -OL https://www.gnupg.org/ftp/gcrypt/gnutls/v3.8/gnutls-3.8.4.tar.xz
tar xvf gnutls-3.8.4.tar.xz
cd gnutls-3.8.4
./configure --prefix="$HOME/prefix" --enable-shared --disable-static --with-included-libtasn1 --without-p11-kit --disable-doc --enable-local-libopts --disable-nls --with-included-unistring --disable-guile --disable-cxx --without-brotli
make
make install

Compile SQLite[edit]

cd ~/src
curl -OL https://sqlite.org/2024/sqlite-autoconf-3450300.tar.gz
tar xvzf sqlite-autoconf-3450300.tar.gz
cd sqlite-autoconf-3450300
./configure --prefix="$HOME/prefix" --enable-shared --disable-static --disable-dynamic-extensions
make
make install

gettext[edit]

cd ~/src
curl -OL https://ftp.gnu.org/pub/gnu/gettext/gettext-0.22.4.tar.xz
tar xvf gettext-0.22.4.tar.xz
cd gettext-0.22.4
./configure --prefix="$HOME/prefix" --enable-shared --disable-static
make
make install

Compile wxWidgets[edit]

cd ~/src
curl -OL https://github.com/wxWidgets/wxWidgets/releases/download/v3.2.4/wxWidgets-3.2.4.tar.bz2
tar xvf wxWidgets-3.2.4.tar.bz2
cd wxWidgets-3.2.4
./configure --prefix="$HOME/prefix" --enable-shared --without-libcurl --without-libtiff --with-macosx-version-min=10.13
make
make install

Compile libfilezilla[edit]

cd ~/src
curl -OL https://download.filezilla-project.org/libfilezilla/libfilezilla-0.41.1.tar.bz2
tar xf libfilezilla-0.41.1.tar.bz2
cd libfilezilla-0.41.1
./configure --prefix="$HOME/prefix" --enable-shared --disable-static
make
make install

Compile FileZilla[edit]

cd ~/src
curl -OL https://download.filezilla-project.org/client/FileZilla_3.63.2_src.tar.bz2
tar xvjf FileZilla_3.63.2_src.tar.bz2
cd filezilla-3.63.2
./configure --with-pugixml=builtin
make