Difference between revisions of "Compiling FileZilla 3 and Getting Dependencies on Linux"

From FileZilla Wiki
Jump to navigationJump to search
m (just added 2 dependencies to make the configure execution shorter)
m (Reverted edits by 2600:387:2:803:0:0:0:72 (talk) to last revision by CodeSquid)
Tag: Rollback
 
(16 intermediate revisions by 5 users not shown)
Line 1: Line 1:
This walkthrough is intended for use on a clean Linux distribution such as Ubuntu, Linux Mint, etc by a beginner who is unfamiliar with resolving dependencies.  
+
This documentation explains how to setup a build environment for FileZilla 3 and how to compile it under Debian based distributions. This guide assumes you are using Debian stable,  but should work as well on other recent Debian-based distributions.
  
Step-By-Step guide on how to use this script:
+
== Setting up build environment ==
# Create a file called fzscript.sh in the directory where you wish to build Filezilla
 
# Copy the below script into the file, save and exit.
 
# Ensure fzscript.sh has permission to run
 
# Open terminal and change the current working directory to the location of fzscript.sh
 
# run this command: "sudo ./fzscript.sh"
 
  
The expected running time can be anywhere from 10 minutes to hours depending on computer speed and internet connection speed.  
+
As root, execute:
 +
apt build-dep filezilla libwxgtk3.0-dev
 +
apt install libtool git subversion xdg-utils
  
The script is publicly available at the pastebin link: http://pastebin.com/6r0dB43d
+
Back as normal user, execute:
 +
mkdir ~/prefix
 +
export PATH="$HOME/prefix/bin:$PATH"
 +
export LD_LIBRARY_PATH="$HOME/prefix/lib:$LD_LIBRARY_PATH"
 +
export PKG_CONFIG_PATH="$HOME/prefix/lib/pkgconfig:$PKG_CONFIG_PATH"
  
In case the script does not work, because the Linux libraries are not always up-to-date, follow this step-by-step guide to compile and install Filezilla Client.
+
== Getting dependencies ==
  
Run the following commands from the Linux terminal:
+
Note: This guide is for setting up a development environment. To build the latest officially released versions, download and extract the respective source tarballs instead and skip the autoreconf step.
#sudo apt-get install gettext
 
#sudo apt-get install autoconf
 
#sudo apt-get install automake
 
#sudo apt-get install libdbus-c++-dev
 
#sudo apt-get install libperl-dev
 
#sudo apt-get install libtool
 
#sudo apt-get install libgtk2.0-dev
 
#sudo apt-get install libsqlite3-dev
 
#sudo apt-get install libtinyxml
 
#sudo apt-get install libdbus-1-dev
 
  
To install the following dependencies, download the specified version or most recent if not specified, extract the downloaded files, navigate to the directory in the terminal and execute the commands:
+
=== wxWidgets ===
*sudo ./configure
+
 
*sudo make
+
  cd ~
*sudo make install
+
  git clone --branch WX_3_0_BRANCH --single-branch https://github.com/wxWidgets/wxWidgets.git wx3
*For #4 Nettle, use this special configure line: sudo ./configure --prefix=/usr/local --with-include-path=/usr/local/include --with-lib-path=/usr/local/lib
+
  cd wx3
#libdbin download & install - http://ftp.gnu.org/gnu/libidn/
+
  ./configure --prefix="$HOME/prefix" --enable-shared --disable-static --enable-unicode
#GMP download & install - https://gmplib.org/
+
  make && make install
#libgcrypt and libgpg-error download & install - https://www.gnupg.org/download/index.html
+
 
#Nettle download & install - https://ftp.gnu.org/gnu/nettle/ (Version 2.7.1)
+
=== libfilezilla ===
#Gnutls download & install - http://gnutls.org/download.html
+
 
#wxWidgets download & install https://www.wxwidgets.org/downloads/
+
  cd ~
To compile and install Filezilla, extract Filezilla's source code and navigate to the directory in a terminal. Then, execute the following commands:
+
  svn co https://svn.filezilla-project.org/svn/libfilezilla/trunk lfz
#sudo autoreconf -i
+
  cd lfz
#sudo ./configure
+
  autoreconf -i
#sudo make
+
  ./configure --prefix="$HOME/prefix" --enable-shared --disable-static
#sudo make install
+
  make && make install
If you get an error loading shared libraries at the make step, here is how to fix it:
+
 
#Run as a root in the Filezilla directory using this command: sudo su
+
== Compiling FileZilla ==
#Execute the command: ldconfig
+
 
#Execute the command: Exit
+
  cd ~
#Try make again
+
  svn co https://svn.filezilla-project.org/svn/FileZilla3/trunk fz
If you followed these steps, executing filezilla in the terminal should run the program. If you get stuck in the compilation go back over the steps and be sure you installed every dependency as specified.
+
  cd fz
 +
  autoreconf -i
 +
  ./configure --prefix="$HOME/prefix" --enable-shared --disable-static
 +
  make && make install
 +
 
 +
And you're done. Type filezilla to start FileZilla.

Latest revision as of 08:41, 12 October 2023

This documentation explains how to setup a build environment for FileZilla 3 and how to compile it under Debian based distributions. This guide assumes you are using Debian stable, but should work as well on other recent Debian-based distributions.

Setting up build environment[edit]

As root, execute:

apt build-dep filezilla libwxgtk3.0-dev
apt install libtool git subversion xdg-utils

Back as normal user, execute:

mkdir ~/prefix
export PATH="$HOME/prefix/bin:$PATH"
export LD_LIBRARY_PATH="$HOME/prefix/lib:$LD_LIBRARY_PATH"
export PKG_CONFIG_PATH="$HOME/prefix/lib/pkgconfig:$PKG_CONFIG_PATH"

Getting dependencies[edit]

Note: This guide is for setting up a development environment. To build the latest officially released versions, download and extract the respective source tarballs instead and skip the autoreconf step.

wxWidgets[edit]

 cd ~
 git clone --branch WX_3_0_BRANCH --single-branch https://github.com/wxWidgets/wxWidgets.git wx3
 cd wx3
 ./configure --prefix="$HOME/prefix" --enable-shared --disable-static --enable-unicode
 make && make install

libfilezilla[edit]

 cd ~
 svn co https://svn.filezilla-project.org/svn/libfilezilla/trunk lfz
 cd lfz
 autoreconf -i
 ./configure --prefix="$HOME/prefix" --enable-shared --disable-static 
 make && make install

Compiling FileZilla[edit]

 cd ~
 svn co https://svn.filezilla-project.org/svn/FileZilla3/trunk fz
 cd fz
 autoreconf -i
 ./configure --prefix="$HOME/prefix" --enable-shared --disable-static 
 make && make install

And you're done. Type filezilla to start FileZilla.