You are here

Instructions for Microsoft Windows Platforms (Old)

Primary tabs

This document is a DEPRECATED installation guide for gnunet on windows. It will not work for recent gnunet versions, but maybe it will be of some use if problems arise.

The Windows build uses a UNIX emulator for Windows, MinGW, to build the executable modules. These modules run natively on Windows and do not require additional emulation software besides the usual dependencies.

GNUnet development is mostly done under Linux and especially SVN checkouts may not build out of the box. We regret any inconvenience, and if you have problems, please report them.

Hardware and OS requirements

  • Pentium II or equivalent processor, 350 MHz or better
  • 128 MB RAM
  • 600 MB free disk space
  • Windows 2000 or Windows XP are recommended

Software installation

  1. Compression software

    The software packages GNUnet depends on are usually compressed using UNIX tools like tar, gzip and bzip2.
    If you do not already have an utility that is able to extract such archives, get 7-Zip.
  2. UNIX environment

    EThe MinGW project provides the compiler toolchain that is used to build GNUnet.
    Get the following packages from the MinGW project:
    • GCC core
    • GCC g++
    • MSYS
    • MSYS Developer Tool Kit (msysDTK)
    • MSYS Developer Tool Kit - msys-autoconf (bin)
    • MSYS Developer Tool Kit - msys-automake (bin)
    • MinGW Runtime
    • MinGW Utilities
    • Windows API
    • Binutils
    • make
    • pdcurses
    • GDB (snapshot)
    1. Install MSYS (to c:\mingw, for example.)
      Donot use spaces in the pathname (c:\program files\mingw).
    2. Install MinGW runtime, utilities and GCC to a subdirectory (to c:\mingw\mingw, for example)
    3. Install the Development Kit to the MSYS directory (c:\mingw)
    4. Create a batch file bash.bat in your MSYS directory with the files:
      bin\sh.exe --login

      This batch file opens a shell which is used to invoke the build processes..
      MinGW′s standard shell (msys.bat) is not suitable because it opens a separate console window
      On Vista, bash.bat needs to be run as administrator.

    5. Start bash.sh and rename (c:\mingw\mingw\)lib\libstdc++.la to avoid problems:
      mv /usr/mingw/lib/libstdc++.la /usr/mingw/lib/libstdc++.la.broken
    6. Unpack the Windows API to the MinGW directory (c:\mingw\mingw\) and remove the declaration of DATADIR from (c:\mingw\mingw\)include\objidl.h (lines 55-58)
    7. Unpack autoconf, automake to the MSYS directory (c:\mingw)
    8. Install all other packages to the MinGW directory (c:\mingw\mingw\)
  3. GNU Libtool

    GNU Libtool is required to use shared libraries.

    Get the prebuilt package from here and unpack it to the MinGW directory (c:\mingw)
  4. Pthreads

    GNUnet uses the portable POSIX thread library for multi-threading..
    1. Save libpthreadGC2.a (x86) or libpthreadGC2.a (x64) as libpthread.a into the lib directory (c:\mingw\mingw\lib\libpthread.a)
    2. Save pthreadGC2.dll (x86) or libpthreadGC2.a (x64) into the MinGW bin directory (c:\mingw\mingw\bin)
    3. Download all header files from include/ to the include directory (c:\mingw\mingw\include)
  5. GNU MP


    GNUnet uses the GNU Multiple Precision library for special cryptographic operations.

    Get the GMP binary package from the MinGW repository and unpack it to the MinGW directory (c:\mingw\mingw)
  6. GNU Gettext

    GNU gettext is used to provide national language support.

    Get the prebuilt package from hereand unpack it to the MinGW directory (c:\mingw\mingw)
  7. GNU iconv

    GNU Libiconv is used for character encoding conversion.

    Get the prebuilt package from here and unpack it to the MinGW directory (c:\mingw\mingw)
  8. SQLite

    GNUnet uses the SQLite database to store data.

    Get the prebuilt binary from here and unpack it to your MinGW directory.
  9. MySQL

    As an alternative to SQLite, GNUnet also supports MySQL.
    1. Get the binary installer from the MySQL project (version 4.1),
      install it and follow the instructions in README.mysql.
    2. Create a temporary build directory (c:\mysql)
    3. Copy the directories include\ and lib\ from the MySQL directory to the new directory
    4. Get the patches from Bug #8906 and Bug #8872 (the latter is only required for MySQL
      patch -p 0 
    5. Move lib\opt\libmysql.dll to lib\libmysql.dll
    6. Change to lib\ and create an import library:
      dlltool --input-def ../include/libmySQL.def --dllname libmysql.dll 
        --output-lib libmysqlclient.a -k
      
    7. Copy include\* to include\mysql\
    8. Pass "--with-mysql=/c/mysql" to ./configure and copy libmysql.dll to your PATH or GNUnet′s bin\ directory
  10. GTK+

    gnunet-gtk and libextractor depend on GTK.

    Get the the binary and developer packages of atk, glib, gtk, iconv, gettext-runtime, pango from gtk.org and unpack it to the MinGW directory (c:\mingw\mingw)

    Get pkg-config and libpng and unpack them to the MinGW directory (c:\mingw\mingw)

    Here is an all-in-one package for gtk+dependencies. Do not overwrite any existing files!
  11. Glade

    gnunet-gtk and and gnunet-setup were created using this interface builder
    • Get the Glade and libglade (-bin and -devel) packages (without GTK!) from GladeWin32 and unpack it to the MinGW directory (c:\mingw\mingw)
    • Get libxml from here and unpack it to the MinGW directory (c:\mingw\mingw).
  12. zLib

    libextractor requires zLib to decompress some file formats. GNUnet uses it to (de)compress meta-data.

    Get zLib from here (Signature) and unpack it to the MinGW directory (c:\mingw\mingw)
  13. Bzip2

    libextractor also requires Bzip2 to decompress some file formats.

    Get Bzip2 (binary and developer package) from GnuWin32 and unpack it to the MinGW directory (c:\mingw\mingw)
  14. Libgcrypt

    Libgcrypt provides the cryptographic functions used by GNUnet

    Get Libgcrypt from here, compile and place it in the MinGW directory (c:\mingw\mingw). Currently you need at least version 1.4.2 to compile gnunet.
  15. PlibC

    PlibC emulates Unix functions under Windows.

    Get PlibC from here and unpack it to the MinGW directory (c:\mingw\mingw)
  16. OGG Vorbis

    OGG Vorbis is used to extract meta-data from .ogg files

    Get the packages libogg and libvorbis from the libextractor win32 build and unpack them to the MinGW directory (c:\mingw\mingw)
  17. Exiv2

    (lib)Exiv2 is used to extract meta-data from files with Exiv2 meta-data

    Download Exiv2 and unpack it to the MSYS directory (c:\mingw)

Building libextractor and GNUnet

Before you compile libextractor or GNUnet, be sure to set
PKG_CONFIG_PATH:

export PKG_CONFIG_PATH=/mingw/lib/pkgconfig

See Installation for basic instructions on building libextractor and GNUnet.

By default, all modules that are created in this way contain debug information and are quite large.
To compile release versions (small and fast) set the variable CFLAGS:

export CFLAGS='-O2 -march=pentium -fomit-frame-pointer' 
./configure --prefix=$HOME --with-extractor=$HOME

Installer

The GNUnet installer is made with NSIS
The installer script is located in contrib\win in the GNUnet source tree.

Source

The sources of all dependencies are available here.