Welcome to Boredom

Show entries from:

2010

2009

2008

2007

2006

2005

How to compile lftp on OS X Leopard

I've recently been missing a few pieces of software from my linux days most recently, lftp. It wasn't as simple as I had hoped it would be so I thought I'd record how I did it here.

# Download and install readline
$ wget ftp://ftp.cwru.edu/pub/bash/readline-6.0.tar.gz # (or latest stable version)
...
$ tar zxvf readline-6.0.tar.gz
$ cd readline-6.0
$ ./configure --prefix=/usr/local
...
$ make
...
$ sudo make install

# Download lftp
$ wget http://ftp.yars.free.net/pub/source/lftp/lftp-3.7.15.tar.gz # (or latest stable version)
...
$ tar zxvf lftp-3.7.15.tar.gz
# Here comes the magic
$ CXXFLAGS="-O0 -Wall -fno-exceptions -fno-rtti -fno-implement-inlines" \
   LDFLAGS="-Xlinker -search_paths_first -L/usr/local/lib" \
   CPPFLAGS="-I/usr/local/include" \
  ./configure --with-openssl --disable-shared --disable-nls --prefix=/usr/local
...
$ make
...
$ make install

.. and that should be it. As I understand it, the 'magic' part tells the compiler to look in the right place for the readline library.

UPDATE: I suggest you now ignore this and use Homebrew where I have contributed an lftp recipe.

Categories: Mac, Tech

Posted on Fri 21st August 2009 by david

Edited on Fri 16th October 2009

Comments