Search code examples
macosfilezillagnutls

Compiling FileZilla on OSX


I've been trying to compile the FileZilla versions 3.11 and 3.24 on Mac for a research project but when I run ../configure I get the following error:

configure: error: libgnutls 3.1.12 greater was not found. You can get it from http://gnutls.org/

However, I've installed gnutls using homebrew; when I run

brew list gnutls

I can see the library installed at /usr/local/Cellar/gnutls/3.5.8/

Any ideas to resolve the problem are appreciated. Thanks


Solution

  • Updated Answer

    It seems that GNUtls, as installed by homebrew ships with a pkgconfig file. So, you need to install pkgconfig if you don't have it already using:

    brew install pkgconfig
    

    Then, once you have that, you can find the compiler include file settings with:

    pkg-config --cflags gnutls
    

    Sample Output

    -I/usr/local/Cellar/gnutls/3.5.8/include -I/usr/local/Cellar/nettle/3.3/include -I/usr/local/Cellar/libtasn1/4.10/include -I/usr/local/Cellar/p11-kit/0.23.3/include/p11-kit-1
    

    And the linker library settings with:

    pkg-config --libs gnutls
    

    Sample Output

    -L/usr/local/Cellar/gnutls/3.5.8/lib -lgnutls
    

    So, we (just) need to convey that information to FileZilla. So, first we run:

    ./configure --help | grep -i utls
    

    Sample Output

      --enable-gnutlssystemciphers
                              Enables the use of gnutls system ciphers.
      LIBGNUTLS_CFLAGS
                  C compiler flags for LIBGNUTLS, overriding pkg-config
      LIBGNUTLS_LIBS
                  linker flags for LIBGNUTLS, overriding pkg-config
    

    So it looks like we need to do something like:

    export LIBGNUTLS_CFLAGS=$(pkg-config --cflags gnutls)
    export LIBGNUTLS_LIBS=$(pkg-config --libs gnutls)
    ./configure
    

    Original Answer

    I haven't tried this with FileZilla, but I use it with other packages, and there is nothing to lose...

    If homebrew has installed your GNUtls in /usr/local/Cellar/gnutls/3.5.8/, you could try telling FileZilla that location in your configure like this:

    ./configure CPPFLAGS="-I/usr/local/Cellar/gnutls/3.5.8/include" LDFLAGS="-L/usr/local/Cellar/gnutls/3.5.8/lib" ... other flags