Skip to main content

Compilation

aMule uses CMake (minimum version 3.10) as its build system. This page covers the complete build, install, and uninstall workflow. Platform-specific dependency installation commands are in the sub-pages for Windows, macOS, Linux, and BSD.

Dependencies

Required

PackageMinimum versionNotes
CMake3.10Build system
zlib1.2.3Compression
wxWidgets3.2.0GUI toolkit (3.2 branch or newer)
Crypto++5.6Cryptographic functions
Boost1.70Headers only; only asio is used

wxWidgets must be built with Unicode support (the default since wx 3.0). aMule is Unicode-only.

Optional

PackageWhat it enables
libgd ≥ 2.0.0Statistics images in cas
libupnp ≥ 1.6.6UPnP port forwarding
libmaxminddb ≥ 1.0Country flags and IP→country mapping
gettext ≥ 0.11.5Native-language support (NLS)
libayatana-appindicator3Linux only. StatusNotifierItem (SNI) tray-icon backend; see Building on Linux.
glib-2.0 dev headerswxGTK builds (Linux / BSD). Required for the g_set_prgname() desktop-entry binding when building amule, amuled, or amulegui. No-op on macOS.
readlineLine editing in amulecmd and amuleweb
binutils-dev / libbfdBFD-based crash handler
libpngPNG support in amuleweb

Quick Start

# Clone the repository
git clone https://github.com/amule-org/amule.git
cd amule

# Install platform-specific dependencies first (see sub-pages)

# Configure — build the all-in-one GUI + daemon
cmake -B build \
-DBUILD_MONOLITHIC=YES \
-DBUILD_DAEMON=YES

# Build
cmake --build build -j"$(nproc)"

# Install (default prefix: /usr/local)
sudo cmake --install build

Build Options

All options are passed as -DOPTION=YES or -DOPTION=NO to the initial cmake -B build command.

OptionDefaultBuilds
BUILD_MONOLITHICYESamule — all-in-one GUI client
BUILD_DAEMONNOamuled — headless daemon
BUILD_REMOTEGUINOamulegui — remote control GUI
BUILD_WEBSERVERNOamuleweb — HTTP web interface
BUILD_AMULECMDNOamulecmd — CLI client for the daemon
BUILD_ED2KYESed2k — eD2k link handler helper
BUILD_ALCNOalc — aMuleLinkCreator GUI
BUILD_ALCCNOalcc — aMuleLinkCreator console
BUILD_CASNOcas — C statistics tool (Unix only)
BUILD_WXCASNOwxcas — GUI statistics tool
BUILD_FILEVIEWNOfileview — console file viewer (experimental)
BUILD_TESTINGYESUnit test suite
ENABLE_NLSYESNative-language support (gettext)
ENABLE_UPNPYESUPnP port forwarding
ENABLE_IP2COUNTRYNOIP→country mapping (libmaxminddb)
ENABLE_MMAPNOUse memory-mapped file I/O where supported
DOWNLOAD_AND_BUILD_DEPSNOWhen an optional dependency is missing, let CMake download and build it from source instead of failing (requires Git)

To list all available options with descriptions:

cmake -LAH -B build | less

Building Everything

cmake -B build \
-DBUILD_MONOLITHIC=YES \
-DBUILD_DAEMON=YES \
-DBUILD_REMOTEGUI=YES \
-DBUILD_WEBSERVER=YES \
-DBUILD_AMULECMD=YES \
-DBUILD_ED2K=YES \
-DBUILD_ALC=YES \
-DBUILD_ALCC=YES \
-DBUILD_CAS=YES \
-DBUILD_WXCAS=YES \
-DBUILD_TESTING=YES \
-DENABLE_NLS=YES \
-DENABLE_UPNP=YES \
-DENABLE_IP2COUNTRY=YES

Or, using the BUILD_EVERYTHING shorthand:

cmake -B build -DBUILD_EVERYTHING=YES

BUILD_EVERYTHING turns on every build target (BUILD_*), but it does not enable ENABLE_IP2COUNTRY (which is NO by default). Pass -DENABLE_IP2COUNTRY=YES alongside it if you want IP→country mapping. ENABLE_NLS and ENABLE_UPNP are already YES by default.

Debug Build

cmake -B build -DCMAKE_BUILD_TYPE=Debug -DBUILD_MONOLITHIC=YES
cmake --build build -j"$(nproc)"

The Debug type enables compiler optimisation flags for debugging and retains full symbol information. See Debugging for how to use it with GDB and Valgrind.

Installing

sudo cmake --install build

Default installation layout under /usr/local:

WhatWhere
Binaries/usr/local/bin/
Translation catalogs/usr/local/share/locale/<lang>/LC_MESSAGES/amule.mo
Data files (skins, webserver)/usr/local/share/amule/
Documentation/usr/local/share/doc/amule/
License/usr/local/share/LICENSE.md
Desktop entries/usr/local/share/applications/
Icon/usr/local/share/icons/hicolor/128x128/apps/
AppStream metadata/usr/local/share/metainfo/

Custom Install Prefix

Override the prefix with -DCMAKE_INSTALL_PREFIX:

cmake -B build -DCMAKE_INSTALL_PREFIX=/opt/amule -DBUILD_MONOLITHIC=YES
cmake --build build -j"$(nproc)"
sudo cmake --install build

Developer Install (No sudo)

Install to $HOME/.local during development. No root required, and easy to undo:

cmake --install build --prefix=$HOME/.local

Binaries land in ~/.local/bin/ (make sure it is in your $PATH).

On Linux, after a raw cmake --install you may need to refresh the icon cache and ensure the SNI tray-icon backend is present — see Desktop Integration.

Uninstalling

CMake records every installed file in build/install_manifest.txt. Use it to remove them:

# System install
sudo xargs rm -f < build/install_manifest.txt

# Local install (no sudo needed)
xargs rm -f < build/install_manifest.txt

Refreshing Translated Man Pages

The translated *.LANG.1 man pages under docs/man/ are committed pre-generated artifacts. They are refreshed from docs/man/po/manpages-LANG.po using po4a. See Man Page Translations for the full translation workflow. The refresh CMake target is available only when po4a is found at configure time:

cmake --build build --target po4a-update

This rewrites docs/man/po/manpages.pot, syncs each manpages-LANG.po, and regenerates the translated man pages in place. Commit the resulting changes.

Running Without Installing

All built binaries are placed in build/ and can be run directly:

./build/amule
./build/amuled
./build/amulecmd

This is the recommended workflow during development — no need to install after every build.

Speeding Up Builds with ccache

If ccache is installed, CMake detects it automatically and uses it as a compiler launcher. Incremental rebuilds are significantly faster when switching between branches or performing git bisect sessions:

# Debian / Ubuntu
sudo apt install ccache

# Fedora / RHEL
sudo dnf install ccache

Running the Unit Tests

cmake -B build -DBUILD_TESTING=YES -DBUILD_MONOLITHIC=YES
cmake --build build -j"$(nproc)"
ctest --test-dir build --output-on-failure

See Testing for the full test suite documentation.