Skip to content

Instantly share code, notes, and snippets.

@Sciss
Created April 2, 2015 21:23
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Sciss/0567b4236a1a9450265b to your computer and use it in GitHub Desktop.
Save Sciss/0567b4236a1a9450265b to your computer and use it in GitHub Desktop.

In order to build SuperCollider 3.6.5 from source on Linux (Debian), the following steps were necessary on a fresh system:

sudo apt-get install build-essential
sudo apt-get install cmake
sudo apt-get install libfftw3-dev
sudo apt-get install libqt4-dev
sudo apt-get install libqtwebkit-dev
sudo apt-get install libjack-jackd2-dev
sudo apt-get install libsndfile1-dev
sudo apt-get install libasound2-dev
sudo apt-get install libavahi-client-dev
sudo apt-get install libicu-dev
sudo apt-get install libreadline6-dev
sudo apt-get install libxt-dev
sudo apt-get install pkg-config
git clone https://github.com/supercollider/supercollider.git
cd supercollider
git checkout -b v3.6.5 Version-3.6.5
git submodule init && git submodule update

Then we need to apply a change to one file that doesn't compile any longer with the latest GCC:

diff --git a/server/supernova/utilities/malloc_aligned.hpp b/server/supernova/utilities/malloc_aligned.hpp
index e572dcb..8f2f8e4 100644
--- a/server/supernova/utilities/malloc_aligned.hpp
+++ b/server/supernova/utilities/malloc_aligned.hpp
@@ -243,7 +243,7 @@ public:
     template< class U, class... Args >
     void construct(U * p, Args&& ... args)
     {
-        ::new(p) T(std::forward<Args>(args)...);
+        ::new((void*)p) U(std::forward<Args>(args)...);
     }
 #endif

After that we can perform the actual build:

mkdir build
cd build
cmake -DSC_WII=no -DSC_EL=no ..
make
sudo make install
@Sciss
Copy link
Author

Sciss commented Mar 6, 2017

Also add this (3.8.0): -DCMAKE_BUILD_TYPE="Release"

@Sciss
Copy link
Author

Sciss commented Mar 7, 2017

sudo apt install build-essential libjack-jackd2-dev libsndfile1-dev libasound2-dev libavahi-client-dev libicu-dev libreadline6-dev libfftw3-dev libxt-dev libudev-dev pkg-config cmake qt5-default qt5-qmake qttools5-dev qttools5-dev-tools qtdeclarative5-dev libqt5webkit5-dev qtpositioning5-dev libqt5sensors5-dev libqt5opengl5-dev

@Sciss
Copy link
Author

Sciss commented Mar 23, 2017

sc3 plugins (3.8.0 Debian Stretch). Assumes we have installed SuperCollider as above, which will go into /usr/local now.

$ git clone git@github.com:supercollider/sc3-plugins.git
$ cd sc3-plugins
$ git checkout -b 3.8.0 Version-3.8.0
$ git submodule init && git submodule update
$ mkdir build
$ cd build
$ cmake -DSC_PATH=/usr/local/include/SuperCollider/ -DCMAKE_BUILD_TYPE="Release" ..
$ make
$ sudo make install

@Sciss
Copy link
Author

Sciss commented Aug 13, 2017

SuperCollider 3.8.0 on latest Debian Stretch is retroactively broken in supernova; needs

cmake -DSC_WII=no -DSC_EL=no -DSUPERNOVA=no -DCMAKE_BUILD_TYPE="Release" .. 

@Sciss
Copy link
Author

Sciss commented Feb 6, 2018

Uninstallation:

cd build
sudo make uninstall

It seems that some directories remain (empty?), perhaps because of forgetting to uninstall plugins first? So to finish:

sudo rm -r /usr/local/include/SuperCollider/
sudo rm -r /usr/local/share/SuperCollider/
sudo rm -r /usr/local/lib/SuperCollider/
sudo rm -r /usr/local/share/doc/SuperCollider/

@Sciss
Copy link
Author

Sciss commented Jul 9, 2019

sc 3.10.2 needs qt5 webengine

sudo apt install qt5-default qt5-qmake qttools5-dev qttools5-dev-tools qtdeclarative5-dev qtwebengine5-dev libqt5svg5-dev libqt5websockets5-dev

@Sciss
Copy link
Author

Sciss commented Sep 27, 2021

For SC 3.12.1: cmake -DSC_EL=no -DSUPERNOVA=no -DCMAKE_BUILD_TYPE="Release" ..

@Sciss
Copy link
Author

Sciss commented Nov 22, 2021

For Debian 11:

First, as before

$ sudo apt install build-essential cmake libjack-jackd2-dev libsndfile1-dev libfftw3-dev libxt-dev libavahi-client-dev
$ sudo apt install git libasound2-dev libicu-dev libreadline6-dev libudev-dev pkg-config libncurses5-dev

Now, there is no qt5-default package, but a dummy can be built following these instructions: https://www.projectguideline.com/faking-qt5-default-package-on-debian-11-for-installing-netsimulyzer-3d-visualization-tool/

$ sudo apt install equivs
$ cat <<EOF > qt5-default-control
Package: qt5-default
Source: qtbase-opensource-src
Version: 5.99.99+fake-debian11
Architecture: all
Depends: qtbase5-dev, qtchooser
Suggests: qt5-qmake, qtbase5-dev-tools
Conflicts: qt4-default
Section: libdevel
Priority: optional
Homepage: http://qt-project.org/
Description: Qt 5 development defaults fake package
EOF
$ equivs-build qt5-default-control
$ sudo apt install ./qt5-default_5.99.99+fake-debian11_all.deb

Then one can proceed with

$ sudo apt install qt5-qmake qttools5-dev qttools5-dev-tools qtdeclarative5-dev qtwebengine5-dev libqt5svg5-dev libqt5websockets5-dev
$ git submodule update --init --recursive
$ mkdir build
$ cd build
$ cmake -DNATIVE=ON -DSC_EL=no -DCMAKE_BUILD_TYPE=Release ..
$ make
$ sudo make install

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment