Building lftp.exe On Windows.

An associate of mine needed to synchronize their Windows server backup directory to an off-site FTP server. The easiest way I know to do this is to use lftp. However, Windows is not officially supported by the lftp author. Therefore, you can either hunt down a version that someone compiled and bundled with the cygwin .dll files, or you can install cygwin and it’s version of lftp.

My associate wanted to use the latest version of lftp, which is not available using either one of these methods. Therefore I built version 4.3.0 (lastest as of now) for him on Cygwin. Below are the simple steps required to do so.

  1. Download cygwin’s setup.exe.
  2. Install your toolchain: bison, autoconf, gcc, gcc-c++, make.
  3. Install the provided version of lftp (4.2.3-1) this will pull in all the required dependencies.
  4. Install GNUTLS: gnutls & gnutls-devel.
  5. You can now extract the lftp sources and build using:
    $ ./configure && make
  6. Once the build was successful, I simply determined the dependencies, then gathered the .exe file and all required .dll files into a folder and zipped them up. The following command will show all the non-Windows (cygwin) dependencies:
    $ ldd lftp.exe | grep -v WINDOWS

– OR –

You can download the version I built for him and save some time :-).


About this entry