|
|
|
|
GNUnet
GNU’s decentralized anonymous and censorship-resistant P2P framework.
|
|
|
Building GNUnet and libextractor on Microsoft Windows 32-bit Platforms
This document is a guide to building GNUnet and libextractor on Windows platforms.
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 or ask the mailinglist for assistance.
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
-
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.
-
UNIX environment
The 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)
- Install MSYS (to c:\mingw, for example.)
Do not use spaces in the pathname (c:\program files\mingw).
- Install MinGW runtime, utilities and GCC to a subdirectory (to c:\mingw\mingw, for example)
- Install the Development Kit to the MSYS directory (c:\mingw)
-
Create a batch file bash.bat in your MSYS directory with the content:
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
for each compilation step.
On Vista, bash.bat needs to be run as administrator.
- 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
- 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)
- Unpack autoconf, automake to the MSYS directory (c:\mingw)
- Install all other packages to the MinGW directory (c:\mingw\mingw\)
-
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)
-
Pthreads
GNUnet uses the portable POSIX thread library for multi-threading.
- Save libpthreadGC2.a as libpthread.a into the lib directory (c:\mingw\mingw\lib\libpthread.a)
- Save pthreadGC2.dll into the MinGW bin directory (c:\mingw\mingw\bin)
- Download all header files from include/ to the include directory (c:\mingw\mingw\include)
-
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)
-
GNU Gettext
GNU gettext is used to provide national language support.
Get the prebuilt package from here and unpack it to the MinGW directory (c:\mingw\mingw)
-
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)
-
SQLite
GNUnet uses the SQLite database to store content.
Get the prebuilt binary from here and unpack it to your MinGW directory.
-
MySQL
As an alternative to SQLite, GNUnet also supports MySQL.
-
Get the binary installer from the MySQL project (version 4.1),
install it and follow the instructions in README.mysql.
-
Create a temporary build directory (c:\mysql)
-
Copy the directories include\ and lib\ from the MySQL directory to the new directory
-
Get the patches from Bug #8906 and Bug #8872 (the latter is only required for MySQL < 4.1.12) and apply them:
patch -p 0 < mysql01.diff
patch -p 0 < mysql_def03.diff
-
Move lib\opt\libmysql.dll to lib\libmysql.dll
-
Change to lib\ and create an import library:
dlltool --input-def ../include/libmySQL.def --dllname libmysql.dll --output-lib libmysqlclient.a -k
-
Copy include\* to include\mysql\
-
Pass "--with-mysql=/c/mysql" to ./configure and copy libmysql.dll to your PATH or GNUnet′s bin\ directory
-
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 from http://www.gimp.org/~tml/gimp/win32/downloads.html and unpack them to the MinGW directory (c:\mingw\mingw)
Do not overwrite any existing files!
-
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).
-
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)
-
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)
-
Libgcrypt
Libgcrypt provides the cryptographic functions used by GNUnet
Get Libgcrypt from here (Signature) and unpack it to the MinGW directory (c:\mingw\mingw)
-
PlibC
PlibC emulates Unix functions under Windows.
Get PlibC from here and unpack it to the MinGW directory (c:\mingw\mingw)
-
OGG Vorbis
OGG Vorbis is used to extract meta-data from .ogg files
Get the packages libogg and libvorbis and unpack them to the MinGW directory (c:\mingw\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:
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.
Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008 Christian Grothoff.
Verbatim copying and distribution of this entire article
is permitted in any medium, provided this notice is preserved.
Translation engine based on i18nHTML (C) 2003, 2004, 2005, 2006, 2007 Christian Grothoff.
go to i18nHTML administration page