BuildingLinux

From Mumble Wiki
Revision as of 18:29, 9 February 2015 by Dennisschagt (talk | contribs) (Added note about compiling on a system which contains both Qt4 and Qt5)
Jump to: navigation, search

Building Guides

This page is one of a set of Building pages/guides for the different OSes with information on building Mumble/Murmur.

BuildingLinux BuildingFreeBSD BuildingOpenBSD BuildingMacOSX BuildingWindows


Please edit this page if you find a feature or step you think should be included; it's a wiki for a reason! Note you must register and wait about 3 days in order to be able to edit.

Install the dependencies

Mumble 1.2.3 or newer requires at least Qt 4.6.

For Debian / Ubuntu

We do not recommend building Mumble on Debian 5 ("Lenny") or older. Please update to Debian 6 ("Squeeze") or newer. You may still be able to build it by playing with package sources to include only required packages from Squeeze, but that is not a supported solution.

You need to make sure you have the needed libraries and dependencies installed to build Mumble and Murmur from source. This can be done in one of those ways:

If your distribution provides packages of the 1.2.x versions, it is sufficient to just run:

apt-get build-dep mumble

Otherwise, you need to install some development packages manually:

apt-get install build-essential pkg-config qt4-dev-tools libqt4-dev libspeex1 \
                libspeex-dev libboost-dev libasound2-dev libssl-dev g++ \
                libspeechd-dev libzeroc-ice-dev ice-slice libpulse-dev slice2cpp \
                libcap-dev libspeexdsp-dev libprotobuf-dev protobuf-compiler \
                libogg-dev libavahi-compat-libdnssd-dev libsndfile1-dev \
                libg15daemon-client-dev libxi-dev 


It is recommended to remove the package qt3-dev-tools if installed. Notice, for Ice-3.4.1 you will need libexpat1-dev and libdb4.6++-dev, which conflicts with newer packages

Now go on to the section Installing from Source.

Arch Linux

At the time of writing, Murmur is in pacman's repositories, but doesn't support Ice because the zeroc-ice component isn't in the repositories. To build an Ice-capable Murmur, you'll need to setup and be familiar with the Arch Build System, which is outside the scope of this document.

Next, I grabbed the zeroc-ice tarball, and extracted it into my ABS directory. I edited the PKGCONFIG to remove all the Java bindings for Ice - because I won't be needing them and didn't want to wait for the Java stuff to install as a dependency, if you feel you might want/need Java/Ice later on, then leave it in - then built and installed the package as per the instructions in the ABS walkthrough.

Grab the Murmur-ice tarball and extract it in your ABS directory. Build, and if you want the stable release, install the resulting package with pacman.

If you want to build from git, you should have most of the required runtime dependencies, but you'll also want these for building:

pacman -S base-devel git

At this point you should be able to continue on to Installing from Source.

Fedora

This is the set of packages that I used to build Mumble on Fedora:

 $ su -c 'yum install openssl-devel libsndfile-devel alsa-lib-devel protobuf-compiler protobuf-devel boost-devel \
                avahi-compat-libdns_sd-devel speech-dispatcher-devel libdaemon-devel libusb-devel ice-3.4 ice-devel \
                libcap-devel'

Fedora doesn't package G15 support (as of Fedora 16), so you'll need to omit that package when building:

 $ cd $YOUR_MUMBLE_REPO
 $ qmake CONFIG+=no-g15 -recursive # you can also add CONFIG=no-server to avoid building murmur
 $ make
 $ cd release
 $ ./mumble # run mumble!

Finding missing dependencies

If the build fails even after installing the dependencies listed above, you'll need to find out that package name on your own. I use yum provides to hunt these things down. This command is best learned through a demonstration, so here's an example Mumble build that's missing a dependency:

 $ cd $YOUR_MUMBLE_REPO
 $ qmake CONFIG+=no-g15 -recursive
 $ make
 ... omitted lots of build info ....
 mumble_pch.hpp:117:20: fatal error: dns_sd.h: No such file or directory
 compilation terminated.
 make[2]: *** [release/mumble.gch/c++] Error 1
 make[2]: Leaving directory `/home/dafrito/src/mumble/src/mumble'
 make[1]: *** [release] Error 2
 make[1]: Leaving directory `/home/dafrito/src/mumble/src/mumble'
 make: *** [sub-src-mumble-make_default-ordered] Error 2
 $

The key line in the above is the "fatal error: dns_sd.h: No such file or directory" This will always be very close to the bottom of make's output. We'll need to install that header file somehow, so we'll try looking in Fedora's repos first. yum provides lets us search for packages that provide a specified file. In this case, we'll look for packages that give us dns_sd.h

 $ yum provides '*/dns_sd.h' # be careful not to forget the quotes or the wildcard here
 avahi-compat-libdns_sd-devel-0.6.30-4.fc16.i686 : Header files for the Apple Bonjour mDNSResponder compatibility libraries
 Repo        : fedora
 Matched from:
 Filename    : /usr/include/avahi-compat-libdns_sd/dns_sd.h
 Filename    : /usr/include/dns_sd.h

This lets us know that avahi-compat-libdns_sd-devel provides the needed header, so now we can install that package

 $ yum install avahi-compat-libdns_sd-devel
 .. lots of installation ..

And now we can try building Mumble again using make. If you're missing multiple packages, then you'll probably need to repeat the above process to satisfy any missing dependencies. If Mumble still doesn't build, you may be able to discern which feature is causing problems and avoid building it entirely using a CONFIG+=no-* option. You can look at INSTALL for details on what features can be toggled off. For example. qmake CONFIG+=no-server -recursive will omit the server component of Mumble.

G15 Support

Fedora doesn't yet package G15 support. The build will fail with a missing "g15daemon_client.h" header file. There's currently work being done to package it: https://bugzilla.redhat.com/show_bug.cgi?id=789113

As mentioned above, you can avoid building G15 support using a qmake CONFIG+=no-g15. However, if you'd like to build this, it is possible to install it manually by building the G15 stuff from source. Be warned that this process can be a little tricky since you'll be building and installing RPMs manually, as well as building another component from source.

First, install some dependencies that you'll need later:

 $ su -c 'yum install libdaemon-devel libusb-devel libtool svn rpm-build autoconf automake libtool'

Then pick up the G15 library that's already been packaged (this was linked to in the Bugzilla ticket):

 $ wget http://zero456.fedorapeople.org/libg15-1.2.7-1.fc16.src.rpm
 $ rpmbuild --rebuild libg15-1.2.7-1.fc16.src.rpm

It's possible you'll run into missing dependencies at this point. Follow the yum provides process outlined above to find out what you'll need to install.

 $ cd ~/rpmbuild/RPMS
 $ ls
 noarch  x86_64 i686
 $ cd `uname -p` # equates to x86_64 on my system, may be i686 on yours
 $ su -c 'yum localinstall libg15*'


Finally, the G15 daemon will need to be built from scratch:

 $ svn co https://g15daemon.svn.sourceforge.net/svnroot/g15daemon/trunk/g15daemon g15daemon
 $ cd g15daemon
 $ autoreconf -i
 $ ./configure
 $ make
 $ su -c 'make install'

At this point, if all other dependencies are met, you should be able to build Mumble with G15 support.

Installing from source

The most generic approach to install mumble under any Linux is to install from source. Either get the current mumble source over git or get the latest tarball release from sourceforge.net.

GIT

For compiling from git make sure you've installed git:

apt-get install git

On older systems like Debian 5 Lenny or Ubuntu 10.04 Lucid Lynx, you have to install git-core instead of git:

apt-get install git-core

Next, download the Mumble source (this may take a minute. At this time of writing, 5th February, the size is 11.33 MiB):

git clone git://github.com/mumble-voip/mumble.git mumble
cd mumble
git submodule init
git submodule update

To use the current branch (which you most likely do):

git checkout --track -b master origin/master

Or to use the v1.1.x branch:

git checkout --track -b v1.1.x origin/v1.1.x

If you want to update your local branch, make sure you're still in the main git directory ('mumble' in the above example) and use this command:

git pull

tarball release

Download the latest tarball release from sf.net http://sourceforge.net/project/showfiles.php?group_id=147372 and extract it:

tar xzfv mumble-x.x.x.tar.gz       # (whereas the X are the version numbers of mumble)
cd mumble-x.x.x

Compile Mumble and Murmur

For more configuration options on the qmake command read the supplied INSTALL file.

Be sure to have the pre-requisites installed and in place for your linux distribution (see the sections above) before you begin compiling it.

qmake -recursive main.pro
make

If you want to compile Murmur (Mumble server) only, then type

qmake -recursive main.pro CONFIG+=no-client
make

Note: If you are using Debian/Ubuntu with both Qt3 and Qt4 installed (or Qt4 and Qt5) use the command "qmake-qt4" instead of "qmake"

Note: Currently, building on Debian Wheezy or Sid requires you to use GCC 4.6 instead of the default 4.7. To do that, run

qmake QMAKE_CXX=g++-4.6 QMAKE_CC=gcc-4.6 -recursive main.pro

instead of the command shown above.

Text to Speech

For text-to-speech voices you will need to install speech dispatcher and at least a voice. Most distros ship packages for that in their repositories.

Run Mumble

cd release
./mumble

Run Murmur