Difference between revisions of "BuildingLinux"

From Mumble Wiki
Jump to: navigation, search
(Add info about the INSTALL file)
 
(86 intermediate revisions by 25 users not shown)
Line 1: Line 1:
This guide is based (but not only) on this article [http://www.linux-gamers.net/modules/newbb/viewtopic.php?topic_id=2896&forum=6] found at www.linux-gamers.net.
+
{{Building}}
  
== Install the dependencies ==
+
'''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.'''
  
For Mumble/Murmur 1.1.0 and greater (including SVN), Qt 4.3 is required. For the 1.0.0 release, Qt 4.2 is sufficient.
+
= Install the dependencies =
  
=== For Gentoo ===
+
Mumble 1.2.3 or newer requires at least Qt 4.6.
  
Qt4 needs to be built with certain use flags: sqlite3, ssl. If your Qt4 is not built with those flags yet, then re-install Qt4 like that:
+
== Debian or Ubuntu ==
echo x11-libs/qt ssl dbus sqlite3 >> /etc/portage/package.use
+
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.
emerge -av ">=x11-libs/qt-4.3"
 
  
Get the other dependencies together:
+
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:
emerge -av --oneshot ">=media-libs/speex-1.2_beta3_p2" media-libs/alsa-lib dev-libs/boost x11-libs/libXevie app-accessibility/speech-dispatcher
 
Now stop being root and get and compile the mumble tarball as written in the section "Installing from source".
 
  
=== For Debian / Ubuntu ===
+
=== 1.2.x ===
  
  apt-get install qt4-dev-tools libqt4-dev libqt-opengl-dev libspeex1 libspeex-dev libboost-dev libasound2-dev libxevie-dev libxevie1 libssl-dev g++ libspeechd-dev
+
If your distribution provides packages of the 1.2.x versions, it is sufficient to just run:
 +
  apt-get build-dep mumble
  
It's recommended to remove the package qt3-dev-tools if installed.
+
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
  
If you want to use versions of Mumble greater greater than 1.0, you'll need to use Debian lenny or Ubuntu Gutsy, as they are the only versions supporting Qt 4.3.
+
It is recommended to remove the package qt3-dev-tools if installed.<br>
  
== Installing from source ==
+
{{Warning
The most generic approach to install mumble under any Linux is to install from source.
+
|message=For ''Ice-3.4.1'' you will need ''libexpat1-dev'' and ''libdb4.6++-dev'', which conflicts with newer packages.
Either get the current mumble source over svn or get the latest tarball release from sourceforge.net.
+
}}
 +
=== 1.3.x ===
  
=== SVN ===
+
Since Mumble Snapshots aren't available in the repository, you need to install development packages manually:
If compiling from svn you're also going to need git to download speex.
+
apt-get install build-essential pkg-config qt5-default libqt5svg5-dev \
 +
                libboost-dev libasound2-dev libssl-dev \
 +
                libspeechd-dev libzeroc-ice-dev libpulse-dev \
 +
                libcap-dev libprotobuf-dev protobuf-compiler \
 +
                libogg-dev libavahi-compat-libdnssd-dev libsndfile1-dev \
 +
                libg15daemon-client-dev libxi-dev
  
svn co https://mumble.svn.sourceforge.net/svnroot/mumble/trunk mumble
+
Now go on to the section [[#Getting_the_source|Getting the source]].
cd mumble/
 
git-clone http://git.xiph.org/speex.git/ speex
 
  
=== tarball release ===
+
== Fedora ==
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)
+
=== 1.2.x ===
cd mumble-x.x.x
 
  
=== Compile Mumble and Murmur (Mumble server) ===
+
dnf builddep mumble
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 main.pro
+
=== 1.3.x ===
  make
+
 
 +
{{Warning
 +
|message=The build has been tested on a Docker builder using the official Fedora image. You may need to [[BuildingLinux#Finding_missing_dependencies|install more dependencies]] on a standard installation.
 +
}}
 +
  dnf install make gcc gcc-c++ which qt5* protobuf-compiler protobuf-devel openssl-devel \
 +
            libsndfile-devel alsa-lib-devel avahi-compat-libdns_sd-devel libXi-devel \
 +
            speech-dispatcher-devel flac-devel libogg-devel libvorbis-devel libcap-devel
 +
 
 +
=== 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 <tt>dnf provides</tt> 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 no-ice -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. <tt>yum provides</tt> lets us search for packages that provide a specified file. In this case, we'll look for packages that give us <tt>dns_sd.h</tt>
 +
 
 +
  $ dnf 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 <tt>avahi-compat-libdns_sd-devel</tt> provides the needed header, so now we can install that package
 +
 
 +
  $ dnf install avahi-compat-libdns_sd-devel
 +
  .. lots of installation ..
 +
 
 +
And now we can try building Mumble again using <tt>make</tt>. 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 <tt>CONFIG+=no-*</tt> option. You can look at INSTALL for details on what features can be toggled off. For example. <tt>qmake CONFIG+=no-server -recursive</tt> will omit the server component of Mumble.
 +
 
 +
=== ICE Support ===
 +
 
 +
The package libICE-devel isn't available in the Fedora repositories anymore.
 +
You need to compile Ice from source or build Mumble without Ice support using "CONFIG+=no-ice".
 +
 
 +
=== 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 <tt>qmake CONFIG+=no-g15</tt>. 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:
 +
 
 +
  $ dnf 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 <tt>yum provides</tt> 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
 +
  $ dnf 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
 +
  $ make install
 +
 
 +
At this point, if all other dependencies are met, you should be able to build Mumble with G15 support.
 +
 
 +
== 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 [http://wiki.archlinux.org/index.php/Arch_Build_System#Walkthrough Arch Build System], which is outside the scope of this document.
 +
 
 +
Next, I grabbed the [http://aur.archlinux.org/packages.php?ID=13951 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 [http://aur.archlinux.org/packages.php?ID=19980 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|Installing from Source]].
 +
 
 +
= Getting the source =
 +
 
 +
The best way to get Mumble's source is using Git.
 +
You can also download the latest ZIP package from GitHub.
 +
 
 +
== 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, 2016, November 4th, the size is 43.39 MiB):
 +
git clone git://github.com/mumble-voip/mumble.git mumble
 +
cd mumble
 +
git submodule init
 +
git submodule update
 +
 
 +
To use the current (development) branch, which you most likely do:
 +
git checkout --track -b master origin/master
 +
 
 +
To use the 1.2.x (stable) branch:
 +
git checkout --track -b 1.2.x origin/v1.2.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
 +
 
 +
== Zip package ==
 +
Download the latest zip archive from [https://github.com/mumble-voip/mumble/archive/master.zip GitHub], extract it and fetch the submodules:
 +
 
 +
unzip mumble-master.zip -d mumble
 +
cd mumble
 +
git submodule init
 +
  git submodule update
 +
 
 +
= Compiling Mumble and Murmur =
 +
 
 +
== From Qt Creator ==
  
Alternatively, if you are using Debian:
+
=== Installing Qt Creator ===
 +
On Debian or Ubuntu:
 +
apt-get install qtcreator
 +
On Fedora:
 +
dnf install qt-creator
 +
On Arch Linux:
 +
pacman -S qtcreator
  
qmake-qt4 main.pro
+
=== Building and running Mumble ===
make
+
Open the project file '''main.pro''' located in the main directory, choose the build preset you want to use and press on the green arrow that seems like a play button.
 +
Mumble will start automatically once it's ready.
  
==Push to talk==
+
== From the terminal ==
  
For using push to talk, edit /etc/X11/xorg.conf:
+
For more configuration options on the qmake command read the supplied INSTALL file.
  
Section "Extensions"
+
Be sure to have the pre-requisites installed and in place for your linux distribution (see the sections above) before you begin compiling it.
    Option "XEVIE" "Enable"
 
EndSection
 
  
Restart the Xserver.
+
=== Building Mumble ===
  
'''Note''': If you use Mumble 1.1.0 or newer, you don't need to enable Xevie, if you run mumble as an user with read access to /dev/input
+
qmake -recursive main.pro
 +
make
  
'''Note''': If you use Mumble 1.1.4 or newer, you don't need to enable Xevie or allow access to /dev/input. PushToTalk will work out of the box.
+
If you want to compile Murmur (Mumble server) only, then type:
  
==Text to Speech==
+
qmake -recursive main.pro CONFIG+=no-client
 +
make
  
For text-to-speech voices you will need to install festival and at least a voice. Most distros ship packages for that in their repositories.
+
{{Iconbox begin|type=info}}The available CONFIG options are explained in [https://github.com/mumble-voip/mumble/blob/master/INSTALL INSTALL].{{Iconbox end}}
[[Link title]]
 
  
== Run Mumble ==
+
=== Running Mumble ===
  
 
  cd release
 
  cd release
 
  ./mumble
 
  ./mumble
  
== Run Murmur ==
+
= Running Murmur =
  
* see [[Running Murmur]]
+
See the dedicated page: [[Running Murmur]]
  
 
[[Category:Development]]
 
[[Category:Development]]
 +
 +
= 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.

Latest revision as of 18:54, 30 June 2018

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.

Debian or 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:

1.2.x

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.

Icons oxygen 48x48 status task-attention.png
Warning: For Ice-3.4.1 you will need libexpat1-dev and libdb4.6++-dev, which conflicts with newer packages.

1.3.x

Since Mumble Snapshots aren't available in the repository, you need to install development packages manually:

apt-get install build-essential pkg-config qt5-default libqt5svg5-dev \
                libboost-dev libasound2-dev libssl-dev \
                libspeechd-dev libzeroc-ice-dev libpulse-dev \
                libcap-dev libprotobuf-dev protobuf-compiler \
                libogg-dev libavahi-compat-libdnssd-dev libsndfile1-dev \
                libg15daemon-client-dev libxi-dev 

Now go on to the section Getting the source.

Fedora

1.2.x

dnf builddep mumble

1.3.x

Icons oxygen 48x48 status task-attention.png
Warning: The build has been tested on a Docker builder using the official Fedora image. You may need to install more dependencies on a standard installation.
dnf install make gcc gcc-c++ which qt5* protobuf-compiler protobuf-devel openssl-devel \
            libsndfile-devel alsa-lib-devel avahi-compat-libdns_sd-devel libXi-devel \
            speech-dispatcher-devel flac-devel libogg-devel libvorbis-devel libcap-devel

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 dnf 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 no-ice -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

 $ dnf 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

 $ dnf 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.

ICE Support

The package libICE-devel isn't available in the Fedora repositories anymore. You need to compile Ice from source or build Mumble without Ice support using "CONFIG+=no-ice".

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:

 $ dnf 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
 $ dnf 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
 $ make install

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

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.

Getting the source

The best way to get Mumble's source is using Git. You can also download the latest ZIP package from GitHub.

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, 2016, November 4th, the size is 43.39 MiB):

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

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

git checkout --track -b master origin/master

To use the 1.2.x (stable) branch:

git checkout --track -b 1.2.x origin/v1.2.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

Zip package

Download the latest zip archive from GitHub, extract it and fetch the submodules:

unzip mumble-master.zip -d mumble
cd mumble
git submodule init
git submodule update

Compiling Mumble and Murmur

From Qt Creator

Installing Qt Creator

On Debian or Ubuntu:

apt-get install qtcreator

On Fedora:

dnf install qt-creator

On Arch Linux:

pacman -S qtcreator

Building and running Mumble

Open the project file main.pro located in the main directory, choose the build preset you want to use and press on the green arrow that seems like a play button. Mumble will start automatically once it's ready.

From the terminal

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.

Building Mumble

qmake -recursive main.pro
make

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

qmake -recursive main.pro CONFIG+=no-client
make
Icons oxygen 48x48 actions view-pim-notes.png
The available CONFIG options are explained in INSTALL.

Running Mumble

cd release
./mumble

Running Murmur

See the dedicated page: Running Murmur

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.