You are here

Basic installation for Mac OS X

Primary tabs

This documentation may be outdated!

This page is providing guidelines for users trying to install GNUnet on Mac OS X.
Mainly users trying to install GNUnet by building source code are the most welcome readers.
The steps below are tested on an Intel Architecture running Mac OS X Tiger (10.4.11). Ideally they should work on other Mac boxes with different configurations as all the configuration done for it is dependent on MacPorts

For having GNUnet installed successfully, some dependencies should be firstly resolved:

  1. Install/Update your Xcode version 3.2.1 or later for Snow Leopard, 3.1.4 or later for Leopard, or 2.5 for Tiger.
  2. Download and install MacPorts.
    Now you are ready for installing GNunet dependencies.
  3. First, you'd better make sure that: /opt/local/bin and /opt/local/sbin are available in your PATH. (For doing so, open a terminal and type:
    $ echo $PATH 

    and examine the output of it). If the paths are not available in your environment, you have to add them (You can add them by editing your .profile file in your home directory, append them to the PATH line). Then type:

    $ source ~/.profile

    and re-examine the echo command output.

  4. Use MacPorts to download and install the dependencies:
    The libraries are:

    The port command is as follows:

    port install libmicrohttpd libgcrypt curl libtool sqlite3 linunistring glpk

    One of the dependencies, the libextractor, should be explicitly installed, since the version available from macports is outdated to work with GNUnet. To install the latest libextractor:

    • Install the Subversion Client:
      For more information about Subversion visit:
      # port install subversion
    • Use Subversion to download the latest Extractor:
      $ svn checkout
    • Go to the installation directory of the Extractor, compile and install it:
      $ ./bootstrap
      $ export CPPFLAGS="-I/opt/local/include"
      $ export  LDFLAGS="-L/opt/local/lib" 
      $ ./configure --prefix=/opt/local
      $ make
      # make install
  5. Now, your system is ready to install GNunet. If you downloaded GNUnet by checking it out from svn, you should start by running the bootstrap script. Open a terminal pointing to the GNUnet directory and type:
    $ ./bootstrap
  6. Run the configure script:
    $ export CPPFLAGS="-I/opt/local/include" 
    $ export LDFLAGS="-L/opt/local/lib" 
    $ ./configure --prefix=/tmp/gnunet_build

    GNUnet will be installed in the directory /tmp/gnunet_build (Of course that installation path can be changed).
    The CPPFLAGS and LDFLAGS are mentioned in order to inform the compiler and the linker to lookup headers and libraries in /opt/local/include and /opt/local/lib.

  7. Compile
    $ make
  8. Install GNUnet
    # make install