1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530
|
Csound Build Instructions
=========================
Build instructions for building Csound from the source packages for the
following operating systems
- Debian/Ubuntu Linux
- Mac OS X using Homebrew
- General Instructions for Linux without Root access
- Raspberry PI standard OS
- Fedora 18
Instructions for Windows can be found in their own document at the link below
[Csound Windows Build Doc][1]
[1]: <https://github.com/csound/csound/blob/develop/How_to_Build_Csound_on_Windows.doc>
Instructions compiled by Dominic Melville contact via dcamelville at gmail.com
for amendments and updates
Debian/Ubuntu
--------------
The following instructions will explain how to configure, compile, and install
Csound 6 on Debian and Ubuntu systems.
### Requirements
You will need root access, primarily to allow installation of dependencies
required for building Csound, as well as for installing into /usr/local.
### Building Csound 6
The first thing to do is get a copy of the Csound 6 sources. The following
instructions are written for those getting a copy of the source code from Git.
You will need to adjust the steps accordingly when using the source tarball from
the files section.
The first thing to do is make sure you have all of the required dependencies for
building Csound. In a terminal, do the following:
1. `sudo apt-get build-dep csound`
2. `sudo apt-get install cmake`
3. `sudo apt-get install git `
The following numbered steps are to be done in a terminal for building and
installing Csound:
1. `cd ~ `
2. `mkdir csound`
3. `cd csound`
4. `git clone https://github.com/csound/csound.git csound`
5. `mkdir cs6make `
6. `cd cs6make `
7. `cmake ../csound`
8. `make -j6 `
9. `sudo make install `
10. `sudo ldconfig `
At this point, Csound 6 should now be compiled and installed into the /usr/local
set of folders.
Mac OS X using Homebrew
-----------------------
### Introduction
Homebrew is a package manager for OSX. It is able to download, build, and
install applications, including their dependencies. The following sections will
describe what you will need to do to use Homebrew to install Csound 6.
Note: At this time, this method of installing Csound is currently being tested.
It is considered beta, and users should be aware that there may be some issues
that will be required to be worked through.
### Requirements
- Xcode
- Xcode Command-Line Tools
- Homebrew - [http://www.brew.sh][2]
[2]: <http://www.brew.sh>
Installing Homebrew You will first need to have a working Homebrew setup. This
requires installing Xcode and the Xcode Command-Line tools. More information on
installing Homebrew is available on the Homebrew website as well as their wiki.
In particular, you will need to be mindful to enable user read/write for three
directories: "/usr/local", "/Library/Python/2.7/site-packages", and
"/Library/Java/Extensions". These need to be writable by the user as Csound will
need to install packages into each of those folders. Running the following
commands at a Terminal prompt should allow you to do this:
`sudo chmod +a 'user:YOUR_NAME_HERE allow
add_subdirectory,add_file,delete_child,directory_inherit'
/Library/Python/2.7/site-packages `
`sudo chmod +a 'user:YOUR_NAME_HERE allow
add_subdirectory,add_file,delete_child,directory_inherit'
/Library/Java/Extensions `
where YOUR_NAME_HERE refers to your system username.
### Adding the Csound Tap
Homebrew has a central repository, but it also allows for adding "taps", which
are additional repositories. A Csound tap has been setup at
https://github.com/kunstmusik/homebrew-csound. You can tap into it by using the
following command:
`brew tap kunstmusik/csound`
### Installing Csound
Once Homebrew is setup and the csound tap has been tapped, run the following
command at the commandline to install Csound:
`brew install --HEAD csound `
### Known Issues
There is currently a warning issued when Csound installs:
`Warning: Could not fix CsoundLib64.framework/Versions/6.0/CsoundLib64 in
/usr/local/Cellar/csound/HEAD/bin/srconv `
`Warning: Could not fix CsoundLib64.framework/Versions/6.0/CsoundLib64 in
/usr/local/Cellar/csound/HEAD/bin/sndinfo `
`Warning: Could not fix CsoundLib64.framework/Versions/6.0/CsoundLib64 in
/usr/local/Cellar/csound/HEAD/bin/scsort `
`Warning: Could not fix CsoundLib64.framework/Versions/6.0/CsoundLib64 in
/usr/local/Cellar/csound/HEAD/bin/scope `
....
This is due to how the CsoundLib64.framework is installed into
~/Library/Frameworks and bypasses Homebrew's installation path for Frameworks.
This is a known issue and will be looked into.
General Linux without Root access
---------------------------------
These are generic instructions to build on any Linux system with no root access.
These instructions require a full development system (compilers, flex, bison,
cmake). For RT audio you need to make sure you have the alsa headers / lib
installed.
### 1) set up your local directory
This creates three directories in your HOME directory and adds your local lib
directory to dynamic library path. Note that this last step needs to be
performed every time you open a new terminal, otherwise the installed Csound
will not find its dynamic library dependencies. If you add that line to your
HOME/.profile script, it will be run automatically when you start a new
terminal. $ $
- `cd `
- `mkdir include `
- `mkdir lib `
- `mkdir bin `
- `mkdir src`
- `export LD_LIBRARY_PATH=HOME/lib:LD_LIBRARY_PATH `
(this last command can be added to your HOME/.profile file for convenience)
### 2) get and install libsndfile
Libsndfile is the only required dependency for a basic Csound build.
Ubuntu users: it appears the libsndfile binaries come as default in your
installation, so this step might not be required. However, there is no harm in
doing it.
- `cd src `
- `wget http://www.mega-nerd.com/libsndfile/files/libsndfile-1.0.25.tar.gz `
- `tar xf libsndfile-1.0.25.tar.gz`
- `cd libsndfile-1.0.25 `
- `./configure --prefix=HOME`
- `make install `
### 3) get Csound (latest from git)
The latest Csound sources are kept in the develop branch. For the latest
released sources, you do not need to change branches.
- `cd ..`
- `git clone https://github.com/csound/csound.git csound `
- `cd csound`
- `git checkout develop`
- `mv Custom.cmake.ex Custom.cmake `
### 4) set the include path for the build
Cmake needs to find your locally-installed headers in HOME/bin. You can add
custom commands to Cmake by using a Custom.cmake file, which Cmake will read if
it exists.
Open or create the Custom.cmake file in the top level Csound sources directory
and add the following line: `include_directories("ENV{HOME}/include") `
### 5) build and install Csound
The recommended method is to create a separate build directory and run cmake
there.
- `mkdir build`
- `cd build `
- `cmake -DCMAKE_INSTALL_PREFIX=HOME ..`
- `make install `
### Notes
This builds a basic system. If you add dependencies to your HOME directories,
then you can run make again to build them. The csound command-line frontend will
be installed in HOME/bin, the libraries in HOME/lib and the include files in
HOME/include. The plugin dir is in \$HOME/lib/csound/plugins64-6.0.
### Dependencies List
If the dependency you are adding uses ./configure, you can the same parameters to it as explained in step 2. If it uses cmake, you can use the same parameters as in step 5. After adding dependencies to your $HOME directories, you can run cmake again to re-build Csound. Check the printed output to see if the added dependency has switched on the build of the desired component.
#### OSC opcodes
liblo - http://liblo.sourceforge.net/ NB: the build for version 0.28 seems to be broken.
#### Fluid opcodes
Fluidsynth - http://sourceforge.net/apps/trac/fluidsynth/ NB: cmake might need to be coerced into finding the fluidsynth headers once it is built. For that, you can use the following cmake command (see step 5):
cmake -DCMAKE_INSTALL_PREFIX=$HOME -DFLUIDSYNTH_H=$HOME/include ..
#### Widget opcodes
FLTK - http://www.fltk.org/index.php NB: make sure you configure the FLTK build with --enable-shared, otherwise there could be problems linking to libfltk on 64bit linux.
#### Faust opcodes
libfaust - use faust2 branch of Faust git sources:
$ git clone git://git.code.sf.net/p/faudiostream/code faust
$ cd faust
$ git checkout faust2
NB: libfaust also requires LLVM 3.0, 3.1, 3.2, 3.3 or 3.4 - http://llvm.org/ LLVM can be built with CMake (as in step 5 above). To build faust, use the following make command (replacing LLVM_32 for LLVM_3* depending on the version you are using, if it is not 3.2)
$ make LLVM_VERSION=LLVM_32 LLVM_CONFIG=llvm-config LLVM_CLANG=g++ CXX=g++ ARCHFLAGS=-fPIC
To install it, you should run
$make PREFIX=$HOME
To switch the faust opcodes build on and coerce cmake into finding the faust library use:
cmake -DCMAKE_INSTALL_PREFIX=$HOME -DBUILD_FAUST_OPCODES=1 -DFAUST_LIBRARY=$HOME/lib/faust/libfaust.a ..
#### Portaudio module
portaudio - http://www.portaudio.com/
#### Portmidi module
portmidi - http://portmedia.sourceforge.net/portmidi/
#### JACK module
Jack connection kit - http://jackaudio.org/
#### Python bindings
swig - http://www.swig.org/ Python headers / library - http://www.python.org
#### Java bindings
swig - http://www.swig.org/ Java SDK - http://www.oracle.com/technetwork/java/javase/downloads/index.html
Raspberry Pi Standard Distro
-----------------------------
### (Raspian Wheezy)
Preliminary step:
`sudo apt-get build-dep csound `
If you get the following error:
`E: You must put some 'source' URIs in your sources.list `
then add the following line to /etc/apt/sources.list:
`deb-src http://mirrordirector.raspbian.org/raspbian/ wheezy main contrib
non-free rpi `
(This can be done with nano)
After adding that to the sources.list, you should run `sudo apt-get update ` and retry the `sudo apt-get build-dep csound` command.
1. `cd ~ `
2. `mkdir csound`
3. `cd csound`
4. `git clone https://github.com/csound/csound.git csound`
5. `mkdir cs6make`
6. `cd cs6make`
7. `cmake ../csound -DBUILD_CSOUND_AC=OFF` (this will not build CsoundAC, that
gives errors)
8. `make -j6`
9. `sudo make install`
10. `sudo ldconfig `
If you want to use the csnd6 Python library, add the following line to .bashrc:
`export PYTHONPATH=/usr/local/lib`
Fedora 18
---------
### Introduction
This shows how to download the source code from Sourceforge, and build Csound 6
from sources.
### Requirements
For some steps, you'll need root access. You may need to install additional
packages - the example shows installing a number of additional packages, but the
exact requirements depend on your system.
You'll need to make sure Cmake, flex, bison, and libsndfile are installed. If
you're logged in as a non-root user, you can execute root commands using su -c.
So here's how to make sure the basic required packages for building are
installed:
`su -c "yum install cmake libsndfile libsndfile-devel flex bison" `
You'll be prompted for your root password.
### Downloading
Download the latest Csound 6 sources from
[https://sourceforge.net/projects/csound/files/csound6/ ][3]
[3]: <https://sourceforge.net/projects/csound/files/csound6/ >
At the time this was written, the downloaded file was Csound6.00.1.tar.gz
### Compiling
First uncompress and untar the source code:
`gunzip Csound6.00.1.tar.gz `
`tar xf Csound6.00.1.tar.gz `
Change into the source directory
`cd Csound6.00.1`
In the source directory what gets compiled is controlled by the file
CMakeLists.txt. By default lots of stuff will get built, as long as you have the
required dependencies installed.
The following commands will add most required packages (but note that lua
interfaces and faust opcodes may still not work):
`su - `
`yum install ladspa ladspa-devel `
`yum install fluidsynth fluidsynth-devel `
`yum install boost boost-devel java-devel `
`yum install jack-audio-connection-kit-devel `
`yum install fltk fltk-devel `
`yum install swig swig-devel `
`yum install pulseaudio-libs-devel `
`yum install portaudio portmidi portaudio-devel portmidi-devel `
`yum install fltk-fluid `
`yum install stk stk-devel `
`yum install python-libs `
`yum install python-devel `
`yum install liblo liblo-devel `
`yum install lua lua-devel `
`yum install eigen3-devel eigen3 `
`yum install gmm-devel `
`yum install wiiuse wiiuse-devel `
`yum install bluez-libs-devel `
yum install llvm-devel
`yum install faust faust-tools`
`exit `
The building process takes two steps
1. use cmake to create a Makefile
2. use make to build Csound 6
To create the Makefile:
`cmake ./ `
At this point you may see messages saying that something can't be built - in
that case use your skill and judgement to work out which packages are missing.
For instance if you get a message saying fltk cannot be built, you could install
the fltk-devel package.
If you install a new package, you'll need to run cmake again:
`rm CMakeCache.txt `
`cmake ./ `
When you're happy, run make
`make `
This builds the csound library.
### Installing
By default, Csound 6 will install in /usr/local, so you'll need root
permissions:
`su -c "make install" `
Finally you need to make sure the library can be found by the linker
`su - `
`cd /etc/ld.so.conf.d `
`touch csound6.conf `
`gedit csound6.conf `
In the editor, add one line
`/usr/local/lib `
and close the file.
Finally update the linker search path
`ldconfig `
and log out of root
`exit `
Testing As a basic test, just try typing csound at a command prompt, and you
should get the help message.
|