Skip to content
derselbst edited this page Dec 2, 2017 · 15 revisions

Note: Auto-tools build system is deprecated!

This page describes building FluidSynth using the deprecated Auto-tools build system and will be removed next major release. You perhaps want to consider building FluidSynth using CMake, as it is very likely that you will run into some issues, especially on Windows.


Tips on building FluidSynth

Here you will find some information on building FluidSynth on various platforms from the subversion repository.

Note: the auto-tools based build system described in this page is deprecated. The new build system is based on CMake, please turn to the new documentation page.

Linux packagers please also read the notes for packagers page.

Ubuntu Linux

These instructions are specifically for Ubuntu 7.10 (Gutsy) but also contains information applicable to other Linux distributions. In particular the package install commands are Ubuntu centric.

Install packages

If your system is not yet setup for building source code you'll want to run the following commands from a shell:

sudo apt-get install build-essential automake libtool 

sudo apt-get install subversion

Optional functionality can be obtained by installing additional development packages:

sudo apt-get install libasound2-dev               # For ALSA drivers (audio output and sequencer)

sudo apt-get install lib64asound2-dev             # Same as above but for 64 bit systems

sudo apt-get install libjack-dev                  # For Jack audio driver

sudo apt-get install lashd lash-bin liblash-dev   # For LASH audio application session management support

sudo apt-get install libreadline5-dev             # Readline command editing at the FluidSynth shell

sudo apt-get install lib64readline5-dev           # Same as above but for 64 bit systems

Tip: if you want all the development packages needed to build the latest released version of [FluidSynth], try:

sudo apt-get build-dep fluidsynth

Checking out from subversion

Run the following command to checkout FluidSynth into a sub directory called fluidsynth:

svn co https://fluidsynth.svn.sourceforge.net/svnroot/fluidsynth/trunk/fluidsynth

Building the code

Running the following commands will build and install FluidSynth.

cd fluidsynth

./autogen.sh

./configure

make

sudo make install

Windows

Checkout the source from subversion (as described in the Ubuntu Linux section) or get a source tarball and extract it somewhere.

FluidSynth can be built in Windows either by using Visual Studio, Cygwin or MinGW+MSYS. There are likely other methods as well. It can be cross compiled from Linux too!.

Cygwin

FIXME This needs to be better documented and tested.

Note: It seems that the configure stage of FluidSynth doesn't result in a successful build. This will be remedied in future versions when we switch to using glib as a portability library.

Install Cygwin with the following packages (possibly others as well?):

autoconf

automake

gcc-mingw-g++

libtool

pkg-config

readline

subversion

Checkout the source from subversion or get a source tarball and put it within the Cygwin environment. Run the same steps as described in the Building the code section of Ubuntu Linux.

Visual Studio

A Visual Studio project file is distributed in the FluidSynth source code.

  • Install the glib Dev package from http://www.gtk.org/download-windows.html.
  • Install the Microsoft DirectX SDK or alternatively some users have mentioned that the dsound.h header might work from Wine.
  • Checkout [FluidSynth] from subversion or get a source tarball.
  • Open the project file at the location: fluidsynth\winbuild\fluidsynth.sln
  • Add paths for Glib and dsound dependencies to the project build (includes and libraries)

Some temporary solutions, until properly addressed:

  • Edit src/fluid_aufile.c and change #include "config.h" to #include "config_win32. h"
  • For the release build: In Project Properties -> Linker -> Input -> Additional Dependencies copy the entry from Debug to Release builds. Do this for both Fluidsynth and Fluidsynth_dll projects.

Build it, at which point you should get a fluidsynth.exe command shell executable and shared FluidSynth library.

MinGW + MSYS

  • Install MinGW with g++ support (re-run installed C:\MinGW\MinGW-x.x.x.exe if g++ not installed initially)
  • Install MSYS shell environment
  • Extract the following packages to C:\MinGW\ from GTK+ Download For Windows:
  • pkg-config (Tool binaries)
  • glib (Binaries and Dev)
  • gettext (Binaries and Dev)
  • proxy-libintl
  • Obtain dsound.h and copy to C:\MinGW\include from:
  • DirectX SDK
  • Or try Google Code Search to locate a copy of dsound.h from the DirectX SDK
  • Optionally build and install libsndfile (from within MSYS shell):
  • Download and extract sources to ~/ for example (C:\MSYS\1.0\home\USER)
  • cd ~/libsndfile-x.x.x
  • ./configure && make
  • If build fails in examples/ do the following:
  • cd src && make install
  • mkdir /usr/local/lib/pkgconfig
  • cp sndfile.pc /usr/local/lib/pkgconfig
  • If build didn't fail in examples, just do:
  • make install
  • Download and extract [FluidSynth] tarball to ~/ and build (from within MSYS shell):
  • export PKG_CONFIG_PATH=/mingw/lib/pkgconfig:/usr/local/lib/pkgconfig
  • cd ~/fluidsynth-x.x.x
  • ./configure
  • make
  • make install

Mac OS X

Note: Extracted from the README-OSX supplied by Ebrahim Mayat and distributed with the source code.

Requirements

  1. Edit the "/usr/local/lib/pkgconfig/jack.pc" file using your favorite Unix editor and in the "Libs" line, replace "ljack" with "-framework Jack"
  2. cd to the fluidsynth directory and in the configure script, substitute "-lmidishare" with "-framework MidiShare".
  3. Run configure with the following options (all on one line in a text editor, then copy and paste into Terminal):
PKG_CONFIG_PATH=/usr/local/lib/pkgconfig ./configure --enable-midishare --disable-lash

This should result in

**************************************************************

Summary:

ALSA:                  no

OSS:                   no

MidiShare:             yes

JACK:                  yes

CoreAudio:             yes

LADSPA support:        no

LASH support:          no

LADCCA support:        no

Readline:              no

Debug:                 yes

Profiling:             no

**************************************************************
  1. As root run:
make && make install

Solaris / OpenSolaris?

This platform is not officially supported, but it seems like just a small patch is needed for [FluidSynth] 1.0.9 to build correctly on this platform. See #52 for a link to this patch. After the patch is applied, you should rund autogen.sh.