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

From AMule Project FAQ
Jump to: navigation, search
(=Preparing: Compiling and installing wxwidgets=)
(What developement packages do I need for compiling?)
 
(77 intermediate revisions by 13 users not shown)
Line 1: Line 1:
<center>'''English''' | [[HowTo_Compile_In_Debian-es|Español]]</center>
+
<center>
 +
'''English''' |  
 +
[[HowTo_Compile_In_Debian-de|Deutsch]] |
 +
[[HowTo_Compile_In_Debian-es|Espa&ntilde;ol]] |
 +
[[HowTo_Compile_In_Debian-fr|Fran&ccedil;ais]]
 +
</center>
  
HowTo compile [[aMule]] in [[Debian]] or [http://www.ubuntulinux.org Ubuntu] by ''[[User:Jacobo221|Jacobo221]]'' and [http://www.gnu.org GNU] [http://www.kernel.org Linux] helpers
+
See also general [[Compilation Installation]]
  
Very special thanks to ''darknox'', ''Arathornz'', ''guest234'', ''parasito'', ''maya'' and ''klando'' for their tests!
+
= 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.
  
'''NOTE:''' This howto will also work for [http://www.ubuntulinux.com Ubuntu Linux].
+
= Debian =
 +
== Official way ==
 +
=== Install packages ===
 +
The latest stable versions of aMule are in the official [http://en.wikipedia.org/wiki/Software_repository Debian repositories].
  
See also general [[Compilation Installation]]
+
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.
  
== Are you sure you want to compile? ==
+
If you prefer to use the terminal, enter this command:
  
If not, (which is pretty common) decide if you want the [[aMule]] stable release or the [[aMule CVS]] release.
+
sudo aptitude install amule
  
=== [[aMule]] stable release ===
+
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]
  
'''These packages are for Debian 3.1 Sarge only!'''
+
== Unofficial way ==
 +
[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.  
  
You can just install latest stable [[aMule]] version through [http://packages.debian.org deb]s adding the following lines into your ''/etc/apt/sources.list'' file:
+
Packages, of that repository, are GPG signed, so follow this step as root:
 +
'''apt-key adv --recv-keys --keyserver wwwkeys.eu.pgp.net D63913EF50D0AE60'''
  
deb http://amule-debian.dyndns.org/ debian/
+
=== [[aMule]] stable release ===
 +
You can just install latest stable [[aMule]] version adding the following lines into your ''/etc/apt/sources.list'' file:
  
Now run <code>apt-get update && apt-get install amule</code>
+
deb http://www.vollstreckernet.de/debian/ testing amule-stable wx
  
Packages in this repository:
+
or
*amule
+
*amule-daemon
+
*amule-remote-gui
+
*amule-gui-utils (alc, wxcas)
+
*amule-console-utils (amuleweb, alcc, cas)
+
*amule-utils (metapackage for amule-gui-utils and amule-console-utils)
+
  
'''NOTES:'''
+
deb http://www.vollstreckernet.de/debian/ stable amule-stable wx
* If [[aMule]] exits with error message complaining about being unable to open libbfd-2.15.so this usually means you are NOT running Debian Sarge. Don't start making symlinks or doing other workarounds, they can quite easily bork your whole system.
+
  
* http://dude.gemil.de is deprecated. http://amule-debian.dyndns.org is (for now) just a redirect, but this might change in the future (if the repository has to move due to traffic limitations).
+
If you have wx from somewhere else, you can ommit it in theses lines, but don't cry if it won't work.
  
=== [[aMule CVS]] release ===
+
Now run <code>apt-get update && apt-get install amule</code>
  
'''These packages are for Debian testing aka Etch only!'''
+
For the packages in the repo and how to get the key, look into the next section.
  
You can also get the latest [[aMule CVS]] through debs adding the following line into your ''/etc/apt/sources.list'' file:
+
=== [[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
 
  deb http://www.vollstreckernet.de/debian/ testing amule
  
packages are GPG sighned, so follow this steps:
+
or
  ''gpg --keyserver wwwkeys.eu.pgp.net --recv 50D0AE60''
+
   
  ''gpg -a --export 50D0AE60 > /tmp/key''
+
  deb http://www.vollstreckernet.de/debian/ stable amule
''apt-key add /tmp/key'' (requires superuser privileges)
+
  
Now run ''apt-get update && apt-get install 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:
 
You might also want to take a look at the other available [[aMule]] utilities:
  
'''[[aMule CVS]]'''
+
'''[[aMule SVN]]'''
*amule
+
*amule-utils
+
*amule-utils-gui
+
*amule-ed2k
+
*amule-cas
+
*amule-wxcas
+
*amule-xas
+
*amule-common
+
*amule-theme-default
+
*amule-theme-php-default
+
*amule-theme-chicane
+
*amuleweb
+
*amule-remote-gui
+
*amule-daemon
+
*amule-alc
+
*amule-alcc
+
*amule-cmd
+
*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-ch
+
*amule-i18n-it
+
*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-zh-cn
+
*amule-i18n-zh-tw
+
  
For example, if you think [[aMule]]'s [[Webserver|Web interface]] rocks and you want to have it too, enter this line after the one above:
+
* 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 [[aMule CVS]]: ''apt-get install amuleweb''
+
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]] stable: ''apt-get install amule-console-utils''
+
For [[aMule SVN]] and [[aMule]] stable: ''aptitude install amuleweb''
  
 
If you still want to compile [[aMule]] instead of just installing a binary, keep reading...
 
If you still want to compile [[aMule]] instead of just installing a binary, keep reading...
  
==Preparing: Compiling and installing wxwidgets==
+
= Ubuntu =
This algorithm works for Debian Sarge and Etch.
+
== 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:
 
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]])
+
Uninstall every possibly previously installed wxwidgets stuff (see [[How to uninstall wxWidgets]]
# On Debian Etch: <tt># apt-get install flex bison gettext libgtk2.0-dev python-all-dev zlib1g-dev libjpeg62-dev libpng12-dev libtiff4-dev libgl-dev libglu-dev libesd0-dev libgnomeprintui2.2-dev python-central</tt>
+
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>
 
# 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>$ tar xvzf wxgtk-''version''.tar.gz</tt>
Line 121: Line 204:
 
# <tt># ldconfig</tt>
 
# <tt># ldconfig</tt>
  
<nowiki>
+
$ = command executed with normal user account<br>
$ = command for a normal user
+
<nowiki>#</nowiki> = command executed with root account
# = command for root
+
</nowiki>
+
  
==Compiling and installing aMule==
+
== Compiling and installing aMule ==
 
Now that You have installed current wxGTK, go on to compile aMule:
 
Now that You have installed current wxGTK, go on to compile aMule:
# On Debian Etch: <tt># apt-get install autotools-dev quilt libglib2.0-dev zlib1g-dev libgd2-xpm-dev libreadline5-dev libcrypto++-dev</tt>
+
# Install the needed packages mentioned in '''"What developement packages do I need for compiling?"'''
# Download current aMule stable release source code tar ball from <tt>http://www.amule.org</tt> (note: aMule 2.1.3 can only be compiled with wxwidgets 2.6. If You have wxwidgets 2.8 installed, You have to use a newer version of aMule (if there is no newer release, use aMule SVN).
+
# 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>$ tar xvjf aMule-''version''.tar.bz2</tt>
 
# <tt>$ cd aMule-''version''</tt>
 
# <tt>$ cd aMule-''version''</tt>
Line 137: Line 218:
 
# <tt># make install</tt>
 
# <tt># make install</tt>
  
That's it! Now You can start aMule with commando "amule".
+
$ = command executed with normal user account<br>
 +
<nowiki>#</nowiki> = command executed with root account
  
==  Compiling on Debian 3.0 aka Woody ==
+
That's it! Now You can start aMule with command "amule".
  
'''Important:''' Have in mind that this HowTo was done having in mind aMule 2.0.0 or greater in [[Debian]] 3.0 (Woody/Sarge/Sid).
+
== 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.
  
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;
+
First install all needed tools:
  
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.
+
* 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
  
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 break if the package being installed is a base package (although this is not the case).
+
'''All commands after here are entered in the top-dir of the extracted aMule-source-tarball (usually .../amule-cvs or .../aMule-<version>)'''
  
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
+
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 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.
+
If you want to build just a few packages instead of all, you can obtain information about how this works with:
 
+
  debian/rules help
== The easiest: Preparing the system ==
+
 
+
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 issuing:
+
 
+
apt-get update && apt-get dist-upgrade
+
 
+
'''''Note 1:''' You must be root user to do this. Log in as root or <code>"su"</code> or use <code>"sudo"</code>. NB: <code>"sudo"</code> must be specified on both apt-get commands, that is:''
+
 
+
sudo apt-get update && sudo apt-get dist-upgrade
+
 
+
''<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 root priviledges when necessary.''
+
 
+
'''''Note 2:''' Woody users (that is, people stuck in the stable Debian 3.0 branch) will be updated to Sarge doing apt-get dist-upgrade.
+
 
+
'''''Note 3:''' 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.''
+
 
+
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).
+
 
+
== The fastest: Installing the necessary packages ==
+
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.
+
 
+
The following are the packages which must be installed:
+
 
+
1) Install the latest stable g++ compiler and the C++ Standard Library
+
 
+
apt-get install g++
+
 
+
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):
+
 
+
apt-get install libwxbase2.4-dev libcurl3-dev libgtk1.2-dev libwxgtk2.4-dev
+
 
+
Alternatively you can use <code>apt-get build-dep amule</code> to get all the required depencies for compilation. Anyway, this last method is not sure to work, since it will depend on the latest version on the Debian repository and later versions or CVS versions might have different dependencies.
+
And the required utilities for compiling [[aMule]]:
+
 
+
  apt-get install gettext make
+
 
+
'''''Note 5:''' 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:''
+
 
+
apt-get install g++ libwxbase2.4-dev libcurl3-dev libgtk1.2-dev libwxgtk2.4-dev gettext make
+
 
+
'''''Note 6:''' From aMule 2.0.0-rc1 to aMule 2.0.0-rc5 (inclusive) the package ''libcrypto++-dev'' was necessary for compiling aMule, so if you are compiling any of such versions, apt-get libcrypto++-dev too.
+
 
+
Also, you might be interested in installing libgd2-noxpm-dev if you plan to compile CAS. It is not a required library for compiling CAS, this library is only used by CAS for creating images (since v2.0.0-rc3) on the current aMule status (by running <code>cas -o</code>). If you plan to use this feature of CAS, you need to install LibGD2. Anyway, CAS will compile perfectly well even if LibGD2 isn't installed, since it detects, on compilation time, if this library is installed.''
+
 
+
2) Download the latest released [[aMule]] source code from [http://www.amule.org/files/files.php?cat=6 here] (or look [[AMule_CVS|here]] for an up-to-date link).
+
 
+
'''''Note 7:''' From now on, I will suppose we are installing aMule 2.0.0-rc3''
+
 
+
3) Fix Crypto++ Library 5.1 if using it.
+
 
+
From [[aMule]] 2.0.0-rc1 to a aMule 2.0.0-rc5 (inclusive) this library is required because [[aMule]] is now supporting SecureIdent (remember, since aMule 2.0.0-rc6, libcrypto++ is optional and not needed by default), 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 installing (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:''
+
 
+
ln -s /usr/include/crypto++/cryptopp_config.h /usr/include/crypto++/config.h
+
 
+
''If you still can't compile crypto++, try compiling it after running the following command:''
+
 
+
ln -s /usr/include/crypto++ /usr/include/cryptopp
+
 
+
'''''Note 8:''' 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>.''
+
 
+
=== Using [[wxWidgets]] 2.6 ===
+
 
+
[[Debian|Etch]] and [[Debian|Sid]] users can use wxWidgets 2.6 instead of wxWidgets 2.4 (Woody and Sarge users, forget about it. Go straight to the next chapter of this article).
+
 
+
To use wxWidgets 2.6 instead of 2.4, just replace in all the above commands the terms ''libwxbase2.4-dev'' and ''libwxgtk2.4-dev'' with ''libwxbase2.6-dev'' and libwxgtk2.6-dev'' respectively.
+
 
+
Whether or not you should use wx 2.6 insetad of wx 2.4 is up to you. It has both advantages and disadvantages. Anyway, in most cases, you will be grateful to use wx 2.6, so it is recommended.
+
 
+
== The hardest: Compiling [[aMule]] ==
+
 
+
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):
+
 
+
  mkdir ~/aMule-compilation/ && tar xzfv aMule-2.0.0rc3.tar.gz -C ~/aMule-compilation/ && cd ~/aMule-compilation/
+
 
+
'''''Note 9:''' 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.''
+
 
+
5) Compile [[aMule]]! The following command will actually switch to the directory containing [[aMule]] 2.0.0rc3 and compile it:
+
 
+
cd ~/aMule-compilation/aMule-2.0.0rc3/ && ./configure && make
+
 
+
'''''Note 10:''' Please take a look at the [[configure|configure article]].''
+
 
+
'''''Note 11:''' You should check the output of
+
./configure --help | more
+
to see if there is any configure switch which might be of your interest, such as --disable-debug --enable-optimise or --bindir= ''
+
 
+
'''''Note 12:''' 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''
+
 
+
apt-get install --reinstall wxwin2.4-headers libwxbase2.4 libwxgtk2.4-dev
+
 
+
''which will reinstall wxWidgets and will most probably fix the compilation error.''
+
 
+
== Meeting satisfaction: Installing aMule! ==
+
 
+
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>):
+
 
+
make install
+
 
+
Now you can remove the sources so you free up space in your hard disk by running:
+
 
+
rm -rf ~/aMule-compilation/
+
 
+
== The end: Final checks ==
+
 
+
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).
+
 
+
Also, if you installed xmule sometime or you are planing to install it, have in mind that the [[ed2k command]] exists both in [[aMule]] and [[xMule]]. 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.
+
  
 
== You're done... ==
 
== You're done... ==
 
 
That's it! Your own compiled [[aMule]] is installed on your system and ready to go.
 
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.
 
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 ([http://www.amule.org/amule 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.
+
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 ==
 
== 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.
 
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 01: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.