BUILDING CSOUND
Currently (April 2012) a collection of build instructions has been started at the Csound Media Wiki at Sourceforge. Please have a look there if you have problems in building Csound.
Linux
Debian
On Wheezy with an amd64 architecture.
Download a copy of the Csound sources from the Sourceforge. To do so, in the terminal type:
git clone --depth 1 git://csound.git.sourceforge.net/gitroot/csound/csound5
Use aptitude to get (at least) the dependencies for a basic build, which are: libsndfile1-dev, python2.6-dev, scons. To do so, use the following command (with sudo or as root):
aptitude install libsndfile1-dev python2.6-dev scons
There are many more optional dependencies, which are recommended to get in most cases (some are already part of Debian), and which are documented here. I built with the following libraries installed: libportaudiocpp0, alsa, libportmidi0, libfltk1.1, swig2.0, libfluidsynth1 and liblo7. To install them (some might already be in your sistem), type:
aptitude install libportaudiocpp0 alsa libportmidi0 libfltk1.1 swig2.0 libfluidsynth1 liblo7
Go inside the csound5/ folder you downloaded from sourceforge, and edit build-linux-double.sh in order to meet your building needs, once again, read about the options in the Build Csound section of the manual.
On amd64 architectures, it is IMPORTANT to change gcc4opt=atom to gcc4opt=generic (otherwise it will build for single processor). I also used buildNewParser=0, since I could not get to compile with the new parser. To finally build, run the script:
./build-linux-double.sh
If the installation was successful, use the following command to install:
./install.py
Make sure that the following environment
variables are set:
OPCODEDIR64=/usr/local/lib/csound/plugins64
CSSTRNGS=/usr/local/share/locale
If you built the python interface, move the csnd.py and -csnd.so from /usr/lib/python2.6/site-packages/ to /usr/lib/python2.6/dist-packages/ (the standard place for external Python modules since version 2.6). You can do so with the following commands:
/usr/lib/python2.6/site-packages/csnd.py /usr/lib/python2.6/dist-packages/
/usr/lib/python2.6/site-packages/_csnd.so /usr/lib/python2.6/dist-packages/
If you want to un-install, you can do so by running the following command:
/usr/local/bin/uninstall-csound5
Good luck!
Ubuntu
1. Download the sources. Either the last stable release from http://sourceforge.net/projects/csound/files/csound5/ or the latest (possible unstable) sources from git (running the command git clone git://csound.git.sourceforge.net/gitroot/csound/csound5).
2. Open a Terminal window and run the command
sudo apt-get install csound
This should install all the dependencies which are needed to build Csound.
3. Change the directory to the folder you have downloaded in step 1, using the command cd.
4. Run the command scons. You can start with
scons -h
to check the configuration and choose your options. See the Build Csound section of the manual for more information about the options. If you want to build the standard configuration, just run scons without any options.
If you get an error, these are possible reasons:
- You must install bison and flex to use the new parser.
- If there is a complaint about not finding a file called custom.py, copy the file custom-linux-jpff.py and rename it as custom.py.
There is also a detailed instruction by Menno Knevel at csounds.com which may help.
5. Run
sudo python install.py
You should now be able to run csound by the command /usr/local/bin/csound, or simply by the command csound.
OSX
As mentioned above, have a look at http://sourceforge.net/apps/mediawiki/csound/index.php?title=Main_Page.
Windows
There is a detailed set of instructions by Michael Gogins, entitled How to Build Csound on Windows in the Csound Sources. The instructions are kept more or less up to date for each release of the Windows installer. You can either download the Csound Sources at http://sourceforge.net/projects/csound/files/csound5 or get the latest version at the Csound Git Repository.
Any chance of instructions on how to build csound6 with cmake?