Difference between revisions of "BuildingFreeBSD"

From Mumble Wiki
Jump to: navigation, search
(Mumble: added note about installing client form ports. haven't tried it myself.)
(bunch of formatting changes, and added a few notes re security/openssl port, building client from ports, etc)
Line 1: Line 1:
== FreeBSD Releases ==
+
== Compatible FreeBSD Releases ==
 
I can only confirm that Murmur runs on the following FreeBSD releases. However, it should build and run on others just fine. Feel free to edit this to add more versions that you've had success with.
 
I can only confirm that Murmur runs on the following FreeBSD releases. However, it should build and run on others just fine. Feel free to edit this to add more versions that you've had success with.
  
 
*FreeBSD 7.1
 
*FreeBSD 7.1
 
*FreeBSD 7.2
 
*FreeBSD 7.2
 +
*FreeBSD 8.0
  
== Install the dependencies ==
+
== Mumble Client ==
 
+
This is a placeholder. This guide is targeted towards Murmur from git at the moment. You should be able to install the Mumble client from ports relatively pain-free:
=== Mumble ===
 
This is a placeholder. This guide is targed towards Murmur at the moment.
 
 
 
You should be able to build Mumble from ports relatively pain-free:
 
  
 
  cd /usr/ports/audio/mumble
 
  cd /usr/ports/audio/mumble
 
  make install clean
 
  make install clean
  
=== Murmur ===
+
== Murmur from git ==
The following are the main dependencies required for building 1.2.x from git.
+
=== Install the dependencies ===
 +
 
 +
The following are the main dependencies required for building Murmur 1.2.x from git.
  
 
*devel/boost (devel/boost_libs on 8.0+)
 
*devel/boost (devel/boost_libs on 8.0+)
 
*devel/ice
 
*devel/ice
*security/openssl (Not necessary on at least 7.1+)
+
*security/openssl (See notes below)
 
*devel/protobuf
 
*devel/protobuf
 
*devel/qt4-corelib
 
*devel/qt4-corelib
Line 35: Line 34:
 
*net/avahi-qt4
 
*net/avahi-qt4
  
== Compilation ==
+
'''security/openssl port''': The port isn't required, however at the time of writing there's a rather nasty DoS in QSslSocket which is fixed by upgrading to OpenSSL 0.9.8o or 1.0.0a, the latter of which is in security/openssl port at the time of writing. However, if you install this port, you'll need to rename /usr/lib/libssl.so to something else, because QT's runtime loader will grab the non-ports libssl and cause you all manner of grief.
 +
 
 +
=== Compilation ===
  
 
Note: As of current git (2010-07-03), you must edit src/murmur/murmur.pro and add another include path (/usr/local/share/Ice) to the slice2cpp line (#72 at time of writing), like so:
 
Note: As of current git (2010-07-03), you must edit src/murmur/murmur.pro and add another include path (/usr/local/share/Ice) to the slice2cpp line (#72 at time of writing), like so:
Line 41: Line 42:
 
  slice2cpp --checksum -I/usr/local/share/Ice ....
 
  slice2cpp --checksum -I/usr/local/share/Ice ....
  
... or you could just symlink that directory to one of the directories the Makefile searches already.
+
... or you could just symlink that directory to one of the directories the Makefile searches already, or use patch [http://sourceforge.net/tracker/?func=detail&aid=3026518&group_id=147372&atid=768007 #3026518].
  
 
To build the server, Murmur:
 
To build the server, Murmur:
Line 47: Line 48:
 
  qmake-qt4 CONFIG+=no-client CONFIG+=no-dbus CONFIG+=no-bonjour main.pro
 
  qmake-qt4 CONFIG+=no-client CONFIG+=no-dbus CONFIG+=no-bonjour main.pro
 
  make release
 
  make release
 +
 +
At the time of writing, if you want to use root certs other than those included with Murmur itself (StartSSL and a couple of others), you'll want to use this qmake line instead of the one above:
 +
 +
qmake-qt4 CONFIG+=no-client CONFIG+=no-dbus CONFIG+=no-bonjour \
 +
DEFINES+="SYSTEM_CA_BUNDLE=/usr/local/share/certs/ca-root-nss.crt" main.pro
  
 
Note, I currently don't use '''CONFIG+=optimize''' because I'm building on 7.2 and running the binary on 7.1.
 
Note, I currently don't use '''CONFIG+=optimize''' because I'm building on 7.2 and running the binary on 7.1.
 
I have no idea what possible consequences could come of that. I would not expect anything, but I'm just being on the safe side.
 
I have no idea what possible consequences could come of that. I would not expect anything, but I'm just being on the safe side.
  
== Run Murmur ==
+
=== Run Murmur ===
  
 
I actually prefer to build Murmur in a VM and send builds up to the production server. In case you're wondering, here are the run deps (without Bonjour support):
 
I actually prefer to build Murmur in a VM and send builds up to the production server. In case you're wondering, here are the run deps (without Bonjour support):
 
  
 
         libprotobuf.so.3 => /usr/local/lib/libprotobuf.so.3 (0x28205000)
 
         libprotobuf.so.3 => /usr/local/lib/libprotobuf.so.3 (0x28205000)
Line 76: Line 81:
 
         libintl.so.8 => /usr/local/lib/libintl.so.8 (0x28e73000)
 
         libintl.so.8 => /usr/local/lib/libintl.so.8 (0x28e73000)
 
         libpcre.so.0 => /usr/local/lib/libpcre.so.0 (0x28e7c000)
 
         libpcre.so.0 => /usr/local/lib/libpcre.so.0 (0x28e7c000)
 
  
 
* see [[Running Murmur]] for information on how to start the server.
 
* see [[Running Murmur]] for information on how to start the server.

Revision as of 18:29, 9 July 2010

Compatible FreeBSD Releases

I can only confirm that Murmur runs on the following FreeBSD releases. However, it should build and run on others just fine. Feel free to edit this to add more versions that you've had success with.

  • FreeBSD 7.1
  • FreeBSD 7.2
  • FreeBSD 8.0

Mumble Client

This is a placeholder. This guide is targeted towards Murmur from git at the moment. You should be able to install the Mumble client from ports relatively pain-free:

cd /usr/ports/audio/mumble
make install clean

Murmur from git

Install the dependencies

The following are the main dependencies required for building Murmur 1.2.x from git.

  • devel/boost (devel/boost_libs on 8.0+)
  • devel/ice
  • security/openssl (See notes below)
  • devel/protobuf
  • devel/qt4-corelib
  • devel/qt4-moc
  • net/qt4-network
  • devel/qt4-qmake
  • devel/qt4-rcc
  • databases/qt4-sql
  • databases/qt4-sqlite-plugin
  • textproc/qt4-xml

If you want to include Bonjour support, include these deps as well:

  • net/avahi
  • net/avahi-qt4

security/openssl port: The port isn't required, however at the time of writing there's a rather nasty DoS in QSslSocket which is fixed by upgrading to OpenSSL 0.9.8o or 1.0.0a, the latter of which is in security/openssl port at the time of writing. However, if you install this port, you'll need to rename /usr/lib/libssl.so to something else, because QT's runtime loader will grab the non-ports libssl and cause you all manner of grief.

Compilation

Note: As of current git (2010-07-03), you must edit src/murmur/murmur.pro and add another include path (/usr/local/share/Ice) to the slice2cpp line (#72 at time of writing), like so:

slice2cpp --checksum -I/usr/local/share/Ice ....

... or you could just symlink that directory to one of the directories the Makefile searches already, or use patch #3026518.

To build the server, Murmur:

qmake-qt4 CONFIG+=no-client CONFIG+=no-dbus CONFIG+=no-bonjour main.pro
make release

At the time of writing, if you want to use root certs other than those included with Murmur itself (StartSSL and a couple of others), you'll want to use this qmake line instead of the one above:

qmake-qt4 CONFIG+=no-client CONFIG+=no-dbus CONFIG+=no-bonjour \
DEFINES+="SYSTEM_CA_BUNDLE=/usr/local/share/certs/ca-root-nss.crt" main.pro

Note, I currently don't use CONFIG+=optimize because I'm building on 7.2 and running the binary on 7.1. I have no idea what possible consequences could come of that. I would not expect anything, but I'm just being on the safe side.

Run Murmur

I actually prefer to build Murmur in a VM and send builds up to the production server. In case you're wondering, here are the run deps (without Bonjour support):

       libprotobuf.so.3 => /usr/local/lib/libprotobuf.so.3 (0x28205000)
       libcrypto.so.5 => /lib/libcrypto.so.5 (0x282fb000)
       libIce.so.33 => /usr/local/lib/libIce.so.33 (0x28454000)
       libIceUtil.so.33 => /usr/local/lib/libIceUtil.so.33 (0x286f9000)
       libQtSql.so.4 => /usr/local/lib/qt4/libQtSql.so.4 (0x28738000)
       libQtXml.so.4 => /usr/local/lib/qt4/libQtXml.so.4 (0x28769000)
       libQtNetwork.so.4 => /usr/local/lib/qt4/libQtNetwork.so.4 (0x287a8000)
       libQtCore.so.4 => /usr/local/lib/qt4/libQtCore.so.4 (0x28890000)
       libz.so.4 => /lib/libz.so.4 (0x28a71000)
       libgthread-2.0.so.0 => /usr/local/lib/libgthread-2.0.so.0 (0x28a83000)
       libglib-2.0.so.0 => /usr/local/lib/libglib-2.0.so.0 (0x28a88000)
       libiconv.so.3 => /usr/local/lib/libiconv.so.3 (0x28b38000)
       libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x28c2d000)
       libm.so.5 => /lib/libm.so.5 (0x28d22000)
       libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x28d37000)
       libthr.so.3 => /lib/libthr.so.3 (0x28d42000)
       libc.so.7 => /lib/libc.so.7 (0x28d60000)
       libbz2.so.3 => /usr/lib/libbz2.so.3 (0x28e62000)
       libintl.so.8 => /usr/local/lib/libintl.so.8 (0x28e73000)
       libpcre.so.0 => /usr/local/lib/libpcre.so.0 (0x28e7c000)

Caveats and Historical problems

alloca.h missing

When building 1.1.8 or earlier, build fails because of a missing alloca.h header. On FreeBSD, alloca() is declared in [stdlib.h], so it's safe to comment the line out (in src/murmur/murmur_pch.h). This has been fixed in git for quite some time, and is apparently fixed in the port of 1.1.8.

Requesting crypt-nonce resync

On 64-bit FreeBSD installations, Murmur 1.1.x and early 1.2 builds would fail, spamming "Requesting crypt-nonce resync" messages in the log, as reported [here] and [here].

Crypto was broken on amd64 (and presumably others), however it's fixed in git. If you're trying to build a 1.1.8 server from source, [this patch] might help.

This was fixed in ports ([ports/139384]), so if you're building from ports, make sure your ports tree is up to date.