Difference between revisions of "HowTo Compile In Debian/Ubuntu"

From AMule Project FAQ
Jump to: navigation, search
(no more crypto++ and update by user suggestion)
(What developement packages do I need for compiling?)
 
(151 intermediate revisions by 35 users not shown)
Line 1: Line 1:
<center><h2><u><b>HowTo compile aMule in [[Debian]]</b></u></h2><br>
+
<center>
<h2>by <i>[[User:Jacobo221|Jacobo221]]</i></h2><br>
+
'''English''' |
 +
[[HowTo_Compile_In_Debian-de|Deutsch]] |
 +
[[HowTo_Compile_In_Debian-es|Espa&ntilde;ol]] |
 +
[[HowTo_Compile_In_Debian-fr|Fran&ccedil;ais]]
 +
</center>
  
<h3>Very special thanks to <i>darknox</i>, <i>Arathornz</i>, <i>guest234</i>, <i>parasito</i>, <i>maya</i> and <i>klando</i> for their tests!</h3></center><br>
+
See also general [[Compilation Installation]]
<br>
+
== <h4><u>Notes before starting</u></h4> ==
+
<b>Important:</b> Have in mind that this HowTo was done having in mind aMule 2.0.0 or greater in [[Debian]] 3.0 (Woody/Sarge/Sid).<br>
+
<br>
+
This HowTo is based on using the apt-get package installer tool, which means you'll have to be able to get super-user (root) access. Also, apt-get requires a perfect packet dependencies installed system. If you usually use apt-get for installing any application, skip this and go to the next section. If you rarely use apt-get but, instead, use dpkg, you can<br>
+
<br>
+
A) (Recommended) Solve all the dependencies problems on your system. This can be done by taking a look at the <code>"dpkg -C"</code> output and installing/removing/updating the packages it mentions depending on what's required. This option is the recommended since it will not only ensure your aMule compilation will be most surely correct, but it will also make your system the most stable it can possibly be and from now on you'll be able to use apt-get to not only make easier installations, but also to easily upgrade your system.<br>
+
<br>
+
B) Force apt-get to ignore the dependencies problems using the -f or --fix-broken switches (just one of them, since they're exactly the same, so that'd be, for example, <code>"apt-get install -f ..."</code>). This option may cause a corrupt installation of some packages which may cause the apps not to work. Also have in mind that using this switch in a system with dependencies problems may cause the system to completely brake if the package being installed is a base package (although this is not the case).<br>
+
<br>
+
C) Follow this instructions but, instead of using <code>"apt-get install foo"</code>, use <code>"dpkg -i foo"</code> where foo is the package to install. Remember the packages must be already on the system when installing packages with dpkg. Remember also to download any "Depends" package since it most-surely will be necessary for successfully compiling [[aMule]]. Avoid using whichever of the following dpkg switches: --force-all  --force-depends-version --force-depends --force-conflicts<br>
+
<br>
+
If you usually install applications from source, read deltaHF's [[Compilation_Installation|"aMule compilation / installation HowTo"]] since your system might not be complying the Debian aMule package dependencies although <code>"dpkg -C"</code> shows no errors.<br>
+
<br>
+
<br>
+
== <h4><u>The easiest: Preparing the system</u></h4> ==
+
Once you decided to use apt-get, you must make sure you'll be downloading the latest versions of the packages (aMule team has discovered bugs in some deb packages that would make aMule impossible to compile on Debian without compiling some other libraries too. This bugs have been mostly fixed in those affected debian packages, so it is very important to be sure to have the packages up to date). This is done by<br>
+
<br>
+
<code>apt-get update && apt-get dist-upgrade</code><br>
+
<br>
+
<i><b>Note 1:</b> You must be root user to do this. Log in as root or <code>"su"</code> or use <code>"sudo"</code> (<code>"sudo"</code> must be specified on both apt-get commands, that is <code>"sudo apt-get update && sudo apt-get dist-upgrade"</code>). <code>"sudo"</code> is not a base command, so it may not be installed on your system, although it most probably will. Be aware that following this HowTo entirely as root may bring some problems later such as being unable to delete certain files as a normal user, so please only use tooy priviledges when necessary.</i><br>
+
<i><b>Note 2:</b> Woody users (that is, people stuck in the stable Debian 3.0 branch) will be unable to install the wxGTK, wxbase and Crypto++ libraries since they were not available in the current version (2.4.2) when Woody was released.</i><br>
+
<i>The best for Woody users is to switch to the Sarge or Sid branch. That can be done with the following command (again, you must be root) <code>"sed s/stable/testing/g /etc/apt/sources.list > /etc/apt/sources.list"</code> or <code>"sed s/woody/sarge/g /etc/apt/sources.list > /etc/apt/sources.list"</code> to switch to the Sarge/testing branch, or with <code>"sed s/unstable/testing/g /etc/apt/sources.list > /etc/apt/sources.list"</code> or <code>"sed s/woody/sid/g /etc/apt/sources.list > /etc/apt/sources.list"</code> to switch to the Sid/unstable branch.</i><br>
+
<i>But Woody users might not be interested in switching to Sarge. Such users will have to download Woody-backported debian packages by adding the following line to /etc/apt/sources.list (remember to <code>"apt-get update"</code> after adding this line):</i><br>
+
<i><code>deb http://debian.thermoman.de/ woody wxwindows2.4</code></i><br>
+
<i><b>Note 3:</b> Sarge users won't be able yet to download some packages from the official repositories, so they'll need to update their sources.list file by adding the following line (remember to <code>"apt-get update"</code> after adding this line):</i><br>
+
<i><code>deb http://debian.thermoman.de/ woody libcrypto++</code></i><br>
+
<i><b>Note 4:</b> Sid users (that is, people holding the cutting-edge unstable Debian 3.0 branch) could suffer problems from packages not completely implemented or with broken dependencies (both are normal issues in the unstable branch). It is very important to keep this in mind since a compiler (g++) will be installed so it could also be broken and, with it, most applications compiled with it (once upgraded, of course). If a package was broken, to downgrade you can use the --force-downgrade switch with dpkg.</i><br>
+
<br>
+
If for whatever reason you think this is too much of a complication, you can just wait a few days until the aMule binary version comes out for your architecture (that is, a .deb file).<br>
+
<br>
+
<br>
+
  
== <h4><u>The fastest: Installing the necessary packages</u></h4> ==
+
= Are you sure you want to compile? =
Remember you need to be root to install applications using apt-get, since apt-get installs system-wide applications. So, log in as root, use "su" or add "sudo" before every command shown here.<br>
+
If not, (which is pretty common) decide if you want the [[aMule]] stable release or the [[aMule SVN]] release.
<br>
+
The following are the packages which must be installed:<br>
+
<br>
+
1) Install the latest stable g++ compiler and the C++ Standard Library<br>
+
<br>
+
<code>apt-get install g++</code><br>
+
<br>
+
the required libraries for compiling [[aMule]] (wxbase is not really a requiered packet to compile aMule but, unless you know what you're doing, be sure you install it. I won't show in this this guide how to force aMule's compilation without wxbase):<br>
+
<br>
+
<code>apt-get install libwxbase2.4-dev libcurl2-dev libgtk1.2-dev libwxgtk2.4-dev libcrypto++-dev libgd2-noxpm-dev</code><br>
+
<br>
+
and the required utilities for compiling [[aMule]], at the moment only gettext (necessary for internationalization support):<br>
+
<br>
+
<code>apt-get install gettext</code><br>
+
<br>
+
<i><b>Note 5:</b> This can all be done in a single command line, which might be more handy for users using <code>"sudo"</code> to gain root priviledges:  <code>apt-get install g++ libwxbase2.4-dev libcurl2-dev libgtk1.2-dev libcrypto++-dev libgd2-noxpm-dev gettext</code></i><br>
+
<i><b>Note 6:</b> As of aMule 2.0.0-rc6 the package ''libcrypto++-dev'' is no longer necessary for compiling aMule, so if you are compiling any version as of 2.0.0-rc6 or the CVS version, don't apt-get libcrypto++.<br>
+
In the same way, you don't need to install libgd2-noxpm-dev if you don't plan to compile CAS. Even if you plan to compile CAS, this library is only used by CAS for creating images (since v2-rc3) on the current aMule status (by running <code>cas -o</code>). If you don't plan to use this feature of CAS, then again, you don't need to install LibGD2. CAS will compile perfectly well, since it detects, on compilation time, if this library is installed.</i><br>
+
<i><b>Note 7:</b> Woody users will most probably be unable to get libgd2-xpm-dev  since that package isn't available for Woody. At the moment, there is no backport available but, since this library is only used by CAS, it won't give any problems on compilation time. Just be aware that <code>cas -o</code> won't work.</i><br>
+
<br>
+
2) Download the latest released [[aMule]] source code from http://download.berlios.de/amule (mirror at http://download.gna.org/amule/ )<br>
+
<br>
+
<i><b>Note 8:</b> From now on, I will suppose we are installing aMule 2.0.0-rc3</i><br>
+
<br>
+
3) Fix Crypto++ Library 5.1<br>
+
Since [[aMule]] 2.0.0 this library is required because [[aMule]] is now supporting SecureIdent, but the [[Libcrypto|Crypto++]] [[Debian]] package has had lots of compiling bugs and still has one (although the rest have been fixed after aMule team's reports). Remember you should have update and dist-upgraded apt-get before installing any [[Debian]] package in this HowTo, otherwise, you could be instaling (or already have installed) a buggy Crypto++ package and this fix will not suit your needs. To fix the latest [[Libcrypto|crypto++]] [[Debian]] package only a symbolic link is needed:<br>
+
<br>
+
<code>ln -s /usr/include/crypto++/cryptopp_config.h /usr/include/crypto++/config.h</code><br>
+
<br>
+
If you still can't compile crypto++, try compiling it after running the following command:<br>
+
<br>
+
<code>ls -s /usr/include/crypto++ /usr/include/cryptopp''</code><br>
+
<br>
+
<i><b>Note 9:</b> Since this link needs write permissions in /usr/lib, super-user (root) priviledges are needed. Again, this can be done easily with <code>"su"</code> or <code>"sudo"</code>.</i><br>
+
<br>
+
<br>
+
  
== <h4><u>The hardest: Compiling [[aMule]]</u></h4> ==
+
= Debian =
4) Extract the sources. The following will create a folder on your user's home directory where it will extract the sources with the -C switch into it (the following command understands that [[aMule]]'s sources are on the current directory):<br>
+
== Official way ==
<br>
+
=== Install packages ===
<code>mkdir ~/aMule-compilation/ && tar xzfv aMule-2.0.0rc3.tar.gz -C ~/aMule-compilation/ && cd ~/aMule-compilation/</code><br>
+
The latest stable versions of aMule are in the official [http://en.wikipedia.org/wiki/Software_repository Debian repositories].
<br>
+
 
<i><b>Note 10:</b> Remember I'm supposing you are extracting [[aMule]] 2.0.0-rc3. Change the file name if it doesn't correspond to the actual packed source code filename.</i><br>
+
You can use [http://en.wikipedia.org/wiki/Synaptic_Package_Manager Synaptic Package Manager] (if you use [http://en.wikipedia.org/wiki/GNOME GNOME]) or [http://en.wikipedia.org/wiki/Adept_Manager Adept] (if you use [http://en.wikipedia.org/wiki/KDE KDE]). Then you must search and install '''amule''' package.
<br>
+
 
5) Compile [[aMule]]! The following command will actually switch to the directory containing [[aMule]] 2.0.0rc3 and compile it:<br>
+
If you prefer to use the terminal, enter this command:
<br>
+
 
<code>cd ~/aMule-compilation/aMule-2.0.0rc3/ && ./configure && make</code><br>
+
sudo aptitude install amule
<br>
+
 
<i><b>Note 11:</b> You should check <code>"./configure --help | more"</code> to see if there is any configure switch which might be of your interest, such as --disable-debug --enable-optimise or --bindir= </i><br>
+
If you prefer to download the aMule can do it manually from [http://packages.debian.org/search?keywords=amule&searchon=names&suite=all&section=all this website]
<i><b>Note 12:</b> if you get an error message, while compiling, similar to: "In file included from /usr/include/wx/***:***, [...] /usr/include/wx/******:***: internal compiler error: Segmentation fault", then you most probably have problems with wxWidgets. Try with <code>"apt-get install --reinstall wxwin2.4-headers libwxbase2.4 libwxgtk2.4-dev"</code>, which will reinstall wxWidgets and will most probably fix the compilation error.</i>
+
 
<br>
+
== Unofficial way ==
<br>
+
[http://www.amule.org/amule/index.php?action=profile;u=2524 Vollstrecker] maintains an unofficial repository for Stable and Testing branchs of Debian GNU/Linux.
== <h4><u>Meeting satisfaction: Installing aMule!</u></h4> ==
+
 
8) What's left? Install aMule (remember you must be root, so log in as root or use <code>"su"</code> or <code>"sudo"</code>):<br>
+
Packages, of that repository, are GPG signed, so follow this step as root:
<br>
+
'''apt-key adv --recv-keys --keyserver wwwkeys.eu.pgp.net D63913EF50D0AE60'''
<code>make install</code><br>
+
 
<br>
+
=== [[aMule]] stable release ===
Now you can remove the sources so you free up space in your hard disk by running:<br>
+
You can just install latest stable [[aMule]] version adding the following lines into your ''/etc/apt/sources.list'' file:
<br>
+
 
<code>rm -rf ~/aMule-compilation/</code><br>
+
deb http://www.vollstreckernet.de/debian/ testing amule-stable wx
<br>
+
 
<br>
+
or
== <h4><u>The end: Final checks</u></h4> ==
+
 
If you have sometime installed aMule from the Debian packages (no matter if the package came from http://gunnm.org/~soda ), you will have aMule binaries installed in /usr/bin. But <code>"make install"</code> installs binnaries in /usr/local/bin (unless --prefix= is set in configure). This leads us to the point that when typing "amule" anyone of the two installed aMule versions might be invoked (which one is executed will depend on the $PATH environment variable. You can check it by typing <code>"type amule"</code>). The walk around is very easy: remove the aMule installed through [[Debian]] package. You can do this with the command "apt-get remove amule" (do not use <code>"apt-get remove --purge"</code> or you might loose your [[aMule]] settings) or with <code>"dpkg --remove amule"</code> (again, never ever use <code>"dpkg --purge"</code> or you might loose your [[aMule]] settings). apt-get will remove aMule-utils if you have them installed (only available as a separate package in Sid, in Sarge and Woody aMule utils are included in the base aMule package) while dpkg will leave aMule-utils installed on the system (which, in general, is a bad idea).<br>
+
deb http://www.vollstreckernet.de/debian/ stable amule-stable wx
Also, if you installed xmule sometime or you are planing to install it, have in mind that the file [[ed2k]] exists both in [[aMule]] and [[eMule]]. You might want to run `type ed2k` to see which [[ed2k]] command will be executed and rename the other so you make sure it's never executed by mistake.<br>
+
 
<br>
+
If you have wx from somewhere else, you can ommit it in theses lines, but don't cry if it won't work.
<br>
+
 
== <h4><u>You're done...</u></h4> ==
+
Now run <code>apt-get update && apt-get install amule</code>
That's it! Your own compiled [[aMule]] is installed on your system and ready to go.<br>
+
 
To run [[aMule]], just type <code>"amule"</code>. You can check if everything worked by typing <code>"amule -v"</code> and check if the displayed version corresponds with the one you were compiling/installing.<br>
+
For the packages in the repo and how to get the key, look into the next section.
If this HowTo didn't help, you have a rare problem on your system ;-) Take a look at http://www.amule.org ([http://www.amule.org/amule aMule Forums] at http://www.amule.org/amule/ ) or visit us in #amule on irc.freenode.net and (don't doubt) we'll try to do our best to help you.<br>
+
 
 +
=== [[aMule SVN]] release ===
 +
You can also get the latest [[aMule SVN]] through debs adding the following line into your ''/etc/apt/sources.list'' file:
 +
 
 +
deb http://www.vollstreckernet.de/debian/ testing amule
 +
 
 +
or
 +
 +
deb http://www.vollstreckernet.de/debian/ stable amule
 +
 
 +
If you need a recent Version of wx (2.8 atm), just append '''" wx"''' to the lines above. Be careful, between amule and wx is a space needed.
 +
If you only want wx binaries installed, replace amule with wx.
 +
 
 +
Now run ''aptitude update && aptitude install amule''
 +
 
 +
You might also want to take a look at the other available [[aMule]] utilities:
 +
 
 +
'''[[aMule SVN]]'''
 +
 
 +
* amule
 +
* amule-alc
 +
* amule-alcc
 +
* amule-alcc-dbg
 +
* amule-alc-dbg
 +
* amule-cas
 +
* amule-cas-dbg
 +
* amule-cmd
 +
* amule-cmd-dbg
 +
* amule-common
 +
* amule-daemon
 +
* amule-daemon-dbg
 +
* amule-dbg
 +
* amule-ed2k
 +
* amule-ed2k-dbg
 +
* amule-i18n-ar
 +
* amule-i18n-bg
 +
* amule-i18n-ca
 +
* amule-i18n-da
 +
* amule-i18n-de
 +
* amule-i18n-en-gb
 +
* amule-i18n-en-us
 +
* amule-i18n-es
 +
* amule-i18n-es-mx
 +
* amule-i18n-et-ee
 +
* amule-i18n-eu
 +
* amule-i18n-fi
 +
* amule-i18n-fr
 +
* amule-i18n-gl
 +
* amule-i18n-hr
 +
* amule-i18n-hu
 +
* amule-i18n-it
 +
* amule-i18n-it-ch
 +
* amule-i18n-ko-kr
 +
* amule-i18n-nl
 +
* amule-i18n-pl
 +
* amule-i18n-pt-br
 +
* amule-i18n-pt-pt
 +
* amule-i18n-ru
 +
* amule-i18n-sl
 +
* amule-i18n-sv
 +
* amule-i18n-tr
 +
* amule-i18n-zh-cn
 +
* amule-i18n-zh-tw
 +
* amule-remote-gui
 +
* amule-remote-gui-dbg
 +
* amule-skin-gnome
 +
* amule-skin-kde4
 +
* amule-skin-tango
 +
* amule-skin-xfce
 +
* amule-theme-default
 +
* amule-utils
 +
* amule-utils-gui
 +
* amuleweb
 +
* amuleweb-dbg
 +
* amule-wxcas
 +
* amule-wxcas-dbg
 +
* amule-xas
 +
 
 +
For example, if you think [[aMule]]'s [[AMuleWeb|Web interface]] rocks and you want to have it too, enter this line after the one above:
 +
 
 +
For [[aMule SVN]] and [[aMule]] stable: ''aptitude install amuleweb''
 +
 
 +
If you still want to compile [[aMule]] instead of just installing a binary, keep reading...
 +
 
 +
= Ubuntu =
 +
== Official way ==
 +
=== Install packages ===
 +
The latest stable versions of aMule are in the official [http://en.wikipedia.org/wiki/Software_repository Ubuntu repositories].
 +
 
 +
You can use [http://en.wikipedia.org/wiki/Synaptic_Package_Manager Synaptic Package Manager] (if you use [http://en.wikipedia.org/wiki/GNOME GNOME]) or [http://en.wikipedia.org/wiki/KPackageKit KPackageKit]/[http://en.wikipedia.org/wiki/Adept_Manager Adept] (if you use [http://en.wikipedia.org/wiki/KDE KDE]). Then you must search and install '''amule''' package.
 +
 
 +
If you prefer to use the terminal, enter this command:
 +
 
 +
sudo aptitude install amule
 +
 
 +
If you prefer to download the aMule can do it manually from [http://packages.ubuntu.com/search?keywords=amule&searchon=names&suite=all&section=all this website]
 +
 
 +
= Compile and install aMule =
 +
== Info: What aMule release needs what wxwidgets release? ==
 +
* Debian Lenny includes aMule 2.2.1 and wxwidgets 2.8.7
 +
 
 +
* aMule 2.1.x needs wxwidgets 2.6. You cannot compile it with newer versions of wxwidgets.
 +
* aMule 2.2.x needs wxwidgets 2.8. You cannot compile it with older versions of wxwidgets.
 +
 
 +
== What developement packages do I need for compiling? ==
 +
For compiling [[aMule SVN]] you need the following packages installed:
 +
 
 +
* libcrypto++-dev
 +
* libgd2-xpm-dev
 +
* libgeoip-dev
 +
* libglib2.0-dev
 +
* libpng12-dev
 +
* libreadline5-dev
 +
* libupnp3-dev
 +
* libwxgtk2.8-dev
 +
* wx2.8-i18n
 +
* zlib1g-dev
 +
* binutils-dev
 +
* gettext
 +
 
 +
'''Warning''': ''64 bit users need to install a libxcb >= 1.1.92 if they want long uptimes.''
 +
 
 +
== Preparing: Compiling and installing wxwidgets ==
 +
This algorithm works for all Debian flavours.
 +
 
 +
''Note: Recent versions of Ubuntu (Jaunty) have an (almost unpatched) libwxgtk good enough for use with aMule. Note that aMule developers require you compile your own wxWidgets.''
 +
 
 +
To compile aMule, You need to have a current version of [[wxWidgets]] installed. To achieve that:
 +
Uninstall every possibly previously installed wxwidgets stuff (see [[How to uninstall wxWidgets]]
 +
and [[Check if wx is installed twice]])
 +
You need the following packages installed:
 +
 
 +
* flex
 +
* bison
 +
* gettext
 +
* libgtk2.0-dev
 +
* python-all-dev (>= 2.4.3)
 +
* python-all-dbg
 +
* zlib1g-dev
 +
* libjpeg62-dev
 +
* libpng12-dev
 +
* libtiff4-dev
 +
* libsm-dev
 +
* libgl1-mesa-dev '''or''' libgl-dev
 +
* libglu1-mesa-dev '''or''' libglu-dev
 +
* libesd0-dev
 +
* libgnomeprintui2.2-dev
 +
* libgconf2-dev
 +
* libgstreamer0.10-dev
 +
* libgstreamer-plugins-base0.10-dev
 +
* bc
 +
 
 +
# Download current wxwidgets wxGTK stable release source code tar ball from <tt>http://www.wxwidgets.org/downloads/</tt>
 +
# <tt>$ tar xvzf wxgtk-''version''.tar.gz</tt>
 +
# <tt>$ cd wxGTK-''version''</tt>
 +
# <tt>$ ./configure --prefix=/usr --with-gtk --enable-unicode --disable-compat24 --enable-optimise</tt>
 +
# <tt>$ make</tt>
 +
# <tt># make install</tt>
 +
# <tt># ldconfig</tt>
 +
 
 +
$ = command executed with normal user account<br>
 +
<nowiki>#</nowiki> = command executed with root account
 +
 
 +
== Compiling and installing aMule ==
 +
Now that You have installed current wxGTK, go on to compile aMule:
 +
# Install the needed packages mentioned in '''"What developement packages do I need for compiling?"'''
 +
# Download aMule source code tar ball from <tt>http://www.amule.org</tt> (note: For compiling aMule 2.1.3 you'll need a patch aviable [http://cvs.pld-linux.org/cgi-bin/cvsweb/SOURCES/aMule-wx.patch?rev=1.2 HERE]
 +
# <tt>$ tar xvjf aMule-''version''.tar.bz2</tt>
 +
# <tt>$ cd aMule-''version''</tt>
 +
# To have a look what features of aMule You can enable or disable: <tt>$ ./configure --help</tt>
 +
# You should be right with <tt>$ ./configure --disable-debug --enable-optimize</tt>
 +
# <tt>$ make</tt>
 +
# <tt># make install</tt>
 +
 
 +
$ = command executed with normal user account<br>
 +
<nowiki>#</nowiki> = command executed with root account
 +
 
 +
That's it! Now You can start aMule with command "amule".
 +
 
 +
== Building your own debian packages ==
 +
First you have to get a source tarball. Note, that only [[aMule SVN]] and Releases of aMule 2.2.1 or later are able to build debain-packages directly.
 +
 
 +
First install all needed tools:
 +
 
 +
* build-essential
 +
* debhelper
 +
* libglib2.0-dev
 +
* libgtk2.0-dev
 +
* zlib1g-dev
 +
* libwxgtk2.8-dev
 +
* libgd2-xpm-dev
 +
* bison
 +
* flex
 +
* libcrypto++-dev
 +
* libreadline5-dev
 +
* libgeoip-dev
 +
* libupnp-dev
 +
* devscripts
 +
 
 +
'''All commands after here are entered in the top-dir of the extracted aMule-source-tarball (usually .../amule-cvs or .../aMule-<version>)'''
 +
 
 +
Create a new changelog Entry with (the version in the changelog indicates the version your packages will get):
 +
dch -v `date +%Y%m%d` New Upstream CVS Release
 +
Now start the packages creation with:
 +
dpkg-buildpackage -uc -b -rfakeroot
 +
Now you have all created debian-packages in the parent dir of you source-dir and can install them with:
 +
dpkg -i <package>
 +
or build your own repository.
 +
 
 +
If you want to build just a few packages instead of all, you can obtain information about how this works with:
 +
debian/rules help
 +
 
 +
== You're done... ==
 +
That's it! Your own compiled [[aMule]] is installed on your system and ready to go.
 +
 
 +
To run [[aMule]], just type <code>"amule"</code>. You can check if everything worked by typing <code>"amule -v"</code> and check if the displayed version corresponds with the one you were compiling/installing.
 +
 
 +
If this HowTo didn't help, you have a rare problem on your system ;-) Take a look at http://www.amule.org (aMule Forums at http://forum.amule.org ) or visit us in #amule on irc.freenode.net and (don't doubt) we'll try to do our best to help you.
 +
 
 +
== Final notes ==
 +
If you are in one of those rare cases when you wish to compile [[aMule]] statically, install also ''libtiff4-dev'' (through ''apt-get install libtiff4-dev''). Anyway, this is '''NOT''' recommended and, in fact, will probably not do any better or even, not work at all.

Latest revision as of 02:33, 9 January 2010

English | Deutsch | Español | Français

See also general Compilation Installation

Are you sure you want to compile?

If not, (which is pretty common) decide if you want the aMule stable release or the aMule SVN release.

Debian

Official way

Install packages

The latest stable versions of aMule are in the official Debian repositories.

You can use Synaptic Package Manager (if you use GNOME) or Adept (if you use KDE). Then you must search and install amule package.

If you prefer to use the terminal, enter this command:

sudo aptitude install amule

If you prefer to download the aMule can do it manually from this website

Unofficial way

Vollstrecker maintains an unofficial repository for Stable and Testing branchs of Debian GNU/Linux.

Packages, of that repository, are GPG signed, so follow this step as root:

apt-key adv --recv-keys --keyserver wwwkeys.eu.pgp.net D63913EF50D0AE60

aMule stable release

You can just install latest stable aMule version adding the following lines into your /etc/apt/sources.list file:

deb http://www.vollstreckernet.de/debian/ testing amule-stable wx

or

deb http://www.vollstreckernet.de/debian/ stable amule-stable wx

If you have wx from somewhere else, you can ommit it in theses lines, but don't cry if it won't work.

Now run apt-get update && apt-get install amule

For the packages in the repo and how to get the key, look into the next section.

aMule SVN release

You can also get the latest aMule SVN through debs adding the following line into your /etc/apt/sources.list file:

deb http://www.vollstreckernet.de/debian/ testing amule

or

deb http://www.vollstreckernet.de/debian/ stable amule

If you need a recent Version of wx (2.8 atm), just append " wx" to the lines above. Be careful, between amule and wx is a space needed. If you only want wx binaries installed, replace amule with wx.

Now run aptitude update && aptitude install amule

You might also want to take a look at the other available aMule utilities:

aMule SVN

  • amule
  • amule-alc
  • amule-alcc
  • amule-alcc-dbg
  • amule-alc-dbg
  • amule-cas
  • amule-cas-dbg
  • amule-cmd
  • amule-cmd-dbg
  • amule-common
  • amule-daemon
  • amule-daemon-dbg
  • amule-dbg
  • amule-ed2k
  • amule-ed2k-dbg
  • amule-i18n-ar
  • amule-i18n-bg
  • amule-i18n-ca
  • amule-i18n-da
  • amule-i18n-de
  • amule-i18n-en-gb
  • amule-i18n-en-us
  • amule-i18n-es
  • amule-i18n-es-mx
  • amule-i18n-et-ee
  • amule-i18n-eu
  • amule-i18n-fi
  • amule-i18n-fr
  • amule-i18n-gl
  • amule-i18n-hr
  • amule-i18n-hu
  • amule-i18n-it
  • amule-i18n-it-ch
  • amule-i18n-ko-kr
  • amule-i18n-nl
  • amule-i18n-pl
  • amule-i18n-pt-br
  • amule-i18n-pt-pt
  • amule-i18n-ru
  • amule-i18n-sl
  • amule-i18n-sv
  • amule-i18n-tr
  • amule-i18n-zh-cn
  • amule-i18n-zh-tw
  • amule-remote-gui
  • amule-remote-gui-dbg
  • amule-skin-gnome
  • amule-skin-kde4
  • amule-skin-tango
  • amule-skin-xfce
  • amule-theme-default
  • amule-utils
  • amule-utils-gui
  • amuleweb
  • amuleweb-dbg
  • amule-wxcas
  • amule-wxcas-dbg
  • amule-xas

For example, if you think aMule's Web interface rocks and you want to have it too, enter this line after the one above:

For aMule SVN and aMule stable: aptitude install amuleweb

If you still want to compile aMule instead of just installing a binary, keep reading...

Ubuntu

Official way

Install packages

The latest stable versions of aMule are in the official Ubuntu repositories.

You can use Synaptic Package Manager (if you use GNOME) or KPackageKit/Adept (if you use KDE). Then you must search and install amule package.

If you prefer to use the terminal, enter this command:

sudo aptitude install amule

If you prefer to download the aMule can do it manually from this website

Compile and install aMule

Info: What aMule release needs what wxwidgets release?

  • Debian Lenny includes aMule 2.2.1 and wxwidgets 2.8.7
  • aMule 2.1.x needs wxwidgets 2.6. You cannot compile it with newer versions of wxwidgets.
  • aMule 2.2.x needs wxwidgets 2.8. You cannot compile it with older versions of wxwidgets.

What developement packages do I need for compiling?

For compiling aMule SVN you need the following packages installed:

  • libcrypto++-dev
  • libgd2-xpm-dev
  • libgeoip-dev
  • libglib2.0-dev
  • libpng12-dev
  • libreadline5-dev
  • libupnp3-dev
  • libwxgtk2.8-dev
  • wx2.8-i18n
  • zlib1g-dev
  • binutils-dev
  • gettext

Warning: 64 bit users need to install a libxcb >= 1.1.92 if they want long uptimes.

Preparing: Compiling and installing wxwidgets

This algorithm works for all Debian flavours.

Note: Recent versions of Ubuntu (Jaunty) have an (almost unpatched) libwxgtk good enough for use with aMule. Note that aMule developers require you compile your own wxWidgets.

To compile aMule, You need to have a current version of wxWidgets installed. To achieve that: Uninstall every possibly previously installed wxwidgets stuff (see How to uninstall wxWidgets and Check if wx is installed twice) You need the following packages installed:

  • flex
  • bison
  • gettext
  • libgtk2.0-dev
  • python-all-dev (>= 2.4.3)
  • python-all-dbg
  • zlib1g-dev
  • libjpeg62-dev
  • libpng12-dev
  • libtiff4-dev
  • libsm-dev
  • libgl1-mesa-dev or libgl-dev
  • libglu1-mesa-dev or libglu-dev
  • libesd0-dev
  • libgnomeprintui2.2-dev
  • libgconf2-dev
  • libgstreamer0.10-dev
  • libgstreamer-plugins-base0.10-dev
  • bc
  1. Download current wxwidgets wxGTK stable release source code tar ball from http://www.wxwidgets.org/downloads/
  2. $ tar xvzf wxgtk-version.tar.gz
  3. $ cd wxGTK-version
  4. $ ./configure --prefix=/usr --with-gtk --enable-unicode --disable-compat24 --enable-optimise
  5. $ make
  6. # make install
  7. # ldconfig

$ = command executed with normal user account
# = command executed with root account

Compiling and installing aMule

Now that You have installed current wxGTK, go on to compile aMule:

  1. Install the needed packages mentioned in "What developement packages do I need for compiling?"
  2. Download aMule source code tar ball from http://www.amule.org (note: For compiling aMule 2.1.3 you'll need a patch aviable HERE
  3. $ tar xvjf aMule-version.tar.bz2
  4. $ cd aMule-version
  5. To have a look what features of aMule You can enable or disable: $ ./configure --help
  6. You should be right with $ ./configure --disable-debug --enable-optimize
  7. $ make
  8. # make install

$ = command executed with normal user account
# = command executed with root account

That's it! Now You can start aMule with command "amule".

Building your own debian packages

First you have to get a source tarball. Note, that only aMule SVN and Releases of aMule 2.2.1 or later are able to build debain-packages directly.

First install all needed tools:

  • build-essential
  • debhelper
  • libglib2.0-dev
  • libgtk2.0-dev
  • zlib1g-dev
  • libwxgtk2.8-dev
  • libgd2-xpm-dev
  • bison
  • flex
  • libcrypto++-dev
  • libreadline5-dev
  • libgeoip-dev
  • libupnp-dev
  • devscripts

All commands after here are entered in the top-dir of the extracted aMule-source-tarball (usually .../amule-cvs or .../aMule-<version>)

Create a new changelog Entry with (the version in the changelog indicates the version your packages will get):

dch -v `date +%Y%m%d` New Upstream CVS Release

Now start the packages creation with:

dpkg-buildpackage -uc -b -rfakeroot

Now you have all created debian-packages in the parent dir of you source-dir and can install them with:

dpkg -i <package>

or build your own repository.

If you want to build just a few packages instead of all, you can obtain information about how this works with:

debian/rules help

You're done...

That's it! Your own compiled aMule is installed on your system and ready to go.

To run aMule, just type "amule". You can check if everything worked by typing "amule -v" and check if the displayed version corresponds with the one you were compiling/installing.

If this HowTo didn't help, you have a rare problem on your system ;-) Take a look at http://www.amule.org (aMule Forums at http://forum.amule.org ) or visit us in #amule on irc.freenode.net and (don't doubt) we'll try to do our best to help you.

Final notes

If you are in one of those rare cases when you wish to compile aMule statically, install also libtiff4-dev (through apt-get install libtiff4-dev). Anyway, this is NOT recommended and, in fact, will probably not do any better or even, not work at all.