From MLDonkey
Revision as of 19:51, 14 October 2010 by Ygrek (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search


Non OS specific tips

configure options

This is summary of the main configure options, to get a full list try ./configure --help

--enable-multinet default, compiles the support for all networks but OpenNapster, DirectConnect, Soulseek and openFT
--disable-multinet only eDonkey2000, Overnet and Kademlia

In addition to the multinet option you can enable or disable support of specific networks, by using the following options. All these options below also exist in the "--disable-..." flavor to remove the network.

--enable-donkey allows you to add support for eDonkey2000, Overnet and Kademlia. These networks have lots of code in common, you can't compile them separately
--enable-bittorrent allows you to add support for BitTorrent
--enable-filetp allows you to add support for FileTP (http and ftp downloads)
--enable-opennap allows you to add support for OpenNapster
--enable-gnutella allows you to add support for Gnutella/LimeWire
--enable-gnutella2 allows you to add support for Gnutella2
--enable-fasttrack allows you to add support for Fasttrack
--enable-directconnect allows you to add support for DirectConnect
--enable-soulseek allows you to add support for SoulSeek

Don't forget that network supports must be enabled with runtime toggles, so it's ok to compile protocols you will only use at times.

--disable-gd remove support for graphical stats in Web Interface
--disable-bzip2 remove support for bz2 zipped guarding.p2p, servers.met and other web_infos
--disable-magic no filetype recognition with libmagic (GNU file)
--enable-batch reply YES to all queries in this script
--enable-checks turn on bounds checking in ocaml it's safer, a bit slower, recommended for developers and paranoids
--disable-gui default, only compile MLdonkey core
--enable-gui=newgui2 use GTK2 GUI
--enable-gui=newgui1 use GTK1 newgui
--enable-gui=oldgui use GTK1 oldgui
--enable-ocamlver=?.?? force/enable compiling with CVS or unsupported ocaml versions, ?.?? is the ocaml version, e.g:3.11
--disable-donkeysui disables Secure User Identification, you'll obtain lighter cores + SUI doesn't work on some HW

Non OS specific problems

The following modules will not be compiled: { open_napster direct_connect(not working) soulseek openFT(obsolete)

Those network supports aren't developed (anymore), and won't even compile without some hacking. Forget about compiling them for now.

The following modules will not be compiled: { ... mldonkey_gui$(EXE) mldonkey_gui2$(EXE) mlchat$(EXE) }

Install GTK headers files (usually in libgtk-dev package)

OS specific tips

Debian Compile

If you use Debian packages of Ocaml don't forget to install ocaml-native-compilers to speed-up compilation significantly.

FreeBSD Compile:

Basically follow the Howto on the mainpage - the cvspassword didn't work for me - I guess my box didn't accept an empty password so I just created the .cvspass file and left it empty. The needed tools (ocaml and ocaml_labgtk) should be installed by using the provided packages. I first tried the ports but this takes forever because they somehow manage to pull in every bit of software there is :) After the two packages (ocaml in lang; ocaml_labgtk in x11-toolkits) have been installed just do a configure and use gmake to run the compile process. The binary is in the ./ dir and is the only thing you need since mldonkey will created everything else from scratch.

Microsoft Windows Compile:

The whole Windows guide here was outdated, for current compile instructions go here.

OpenBSD Compile:

configure just as normal, but use gmake instead of make.

couldn't compile static until i replaced "-static" with "-static -cclib -L/usr/local/lib/ -cclib -liconv" in config/ Kokamomi

OpenSolaris Compile:

Tested on clean install of OpenSolaris 2009.06

Install dependencies :

pkg install SUNWocaml SUNWgmake SUNWgcc SUNWaconf

Install GTK2 GUI dependencies :

pkg install SUNWgnome-common-devel SUNWGtk SUNWxwinc SUNWxorg-headers SUNWlablgtk

Installation instructions for Ubuntu

(can be used for other Debian-based distros as well)

Which packages are needed to compile MLDonkey?

First install packages to download MLDonkey CVS code:

sudo apt-get install ssh cvs

MLDonkey CVS checkout needs autoconf and m4:

sudo apt-get install autoconf

Get MLDonkey source code and start compiling:

cvs co -P mldonkey
cd mldonkey
checking for gcc... no
checking for cc... no
checking for cc... no
checking for cl... no
configure: error: no acceptable C compiler found in $PATH
See `config.log' for more details.

We don't need more details, just install a compiler and a developer package:

sudo apt-get install gcc g++ libc-dev
checking for gmake... no
checking for make... no
configure: error: GNU make not found
sudo apt-get install make
''''''''''''''''''''''''  Objective-Caml 3.09.1 is required  ''''''''''''''''''''''''*
'''''''''''''''''''''  Check  '''''''''''''''''''''*
Do you want this script to try to download and install ocaml
LOCALLY in mldonkey directory ?

Now you have the choice to let MLDonkey compile Ocaml, this is convenient but you have to compile Ocaml everytime you compile a new MLDonkey version. You can say "no" here and install the Ocaml package

sudo apt-get install ocaml-nox ocaml-native-compilers

or say "yes" here to go ahead and let MLDonkey compile a local copy of Ocaml.

checking for inflate in -lz... no
Zlib missing, did you install zlib and zlib-developer packages?
sudo apt-get install zlib1g-dev

there are now enough packages installed to compile MLDonkey.
But some libraries are still missing for additional features.

Features: threads zlib-1.2.3 no-bzip2 no-gd no-magic iconv no-check-bounds
checking bzlib.h usability... no
checking bzlib.h presence... no
checking for bzlib.h... no
configure: WARNING: Your system lacks bzip2 support

sudo apt-get install libbz2-dev
checking for gdlib-config... no
checking for gdImageCreate in -lgd... no
checking for gdImageCreate in -lgd... no
configure: libgd not available
checking support for graphical statistics... no

sudo apt-get install libgd2-noxpm-dev

libgd2 is needed to display nice bandwidth graphs in web interface. If you already have libgd2-xpm installed (check with dpkg --get-selections libgd2-xpm) then instead run

sudo apt-get install libgd2-xpm-dev
checking magic.h usability... no
checking magic.h presence... no
checking for magic.h... no
configure: libmagic not available

sudo apt-get install libmagic-dev

Now all packages needed for a full-featured MLDonkey are present on the system. Just run


now to compile MLDonkey. After successful compile you will find the file mlnet.

> buildinfo
Version:	 MLNet Multi-Network p2p client version 2.7.6.CVS
SCM version:	 2006-06-03 23:27:32
Networks:	 Global Shares  Gnutella  G2  Fasttrack  FileTP  BitTorrent  Donkey (SUI)
Ocaml version:	 3.09.1 - C compiler version: 4.0.3 - C++ compiler version: 4.0.3
Build on:	 Linux i686 2.6.15-23-386 (little endian) with glibc 2.3.6
Features:	 threads zlib-1.2.3 bzip2-1.0.3 gd(jpg/png-1.2.8) iconv magic(active) no-check-bounds

Now the instructions for manually compiling OCaml, you can either use a released version or an SVN checkout.
Here we use SVN checkout:

svn co ocaml
cd ocaml
make world.opt
make install

This installs OCaml in /usr/local, it can now be used when compiling MLDonkey.

If MLDonkey complains about OCaml version use --enable-ocamlver=3 as additional parameter for ./configure

Applying a Patch

If there is a patch that you want to test that the developers have released, then the following will apply that patch to a clean CVS update (The patch chosen below is just for the example, you'll need to change the name obviously):

Firstly clean up and download the source from the CVS

rm -rf mldonkey
cvs co -P mldonkey

Then download the patch and apply it

cd mldonkey
patch -p0 -E -i ../remove_tar_output_size_limitation.patch 

The patching process will give feedback about what files it is changing, once complete compile as normal.

Personal tools