Last active
November 3, 2024 17:34
-
-
Save madskjeldgaard/10ab025993d5b77d235819d56c4cc908 to your computer and use it in GitHub Desktop.
Install SuperCollider and SC3-plugins headless on Raspberry Pi
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Taken from: https://github.com/lvm/build-supercollider | |
### | |
# | |
# Variables | |
# | |
INSTALL_DIR=/tmp | |
SUPERCOLLIDER_VER=main | |
SC3PLUGINS_DIR=$INSTALL_DIR/sc3-plugins | |
SC3PLUGINS_BUILD_DIR=$SC3PLUGINS_DIR/build | |
SC3_DIRECTORY=/usr/local/share/SuperCollider | |
SC3_EXT_DIRECTORY=/usr/local/share/SuperCollider/Extensions | |
### | |
# | |
# Update | |
# | |
sudo apt update | |
### | |
# | |
# Install building dependencies | |
# | |
sudo apt install -yq \ | |
build-essential pkg-config cmake subversion git \ | |
libjack-jackd2-dev libudev-dev libsndfile1-dev libasound2-dev \ | |
libavahi-client-dev libicu-dev libreadline6-dev libfftw3-dev \ | |
libxt-dev libcwiid-dev libqt5webkit5-dev libqt5sensors5-dev \ | |
qt5-default qt5-qmake qttools5-dev qttools5-dev-tools \ | |
qtdeclarative5-dev qtpositioning5-dev | |
### | |
# | |
# Download and build SC | |
# | |
mkdir -p $SC3PLUGINS_DIR | |
# Download SC3 Plugins Source | |
git clone --recursive --branch $SUPERCOLLIDER_VER \ | |
git@github.com:supercollider/sc3-plugins.git $SC3PLUGINS_DIR | |
# Create the the directory where SC3 Plugins will be built | |
mkdir -p $SC3PLUGINS_BUILD_DIR | |
sudo mkdir -p $SC3_EXT_DIRECTORY | |
# And build it. | |
cd $SC3PLUGINS_BUILD_DIR && \ | |
cmake -DCMAKE_PREFIX_PATH=/usr/lib/x86_64-linux-gnu/ \ | |
-DCMAKE_INSTALL_PREFIX=/usr/local \ | |
-DSC_PATH=/tmp/supercollider/ \ | |
-DBUILD_TESTING=OFF -DQUARKS=ON -DSUPERNOVA=ON .. && \ | |
make -j4 && \ | |
sudo make install && \ | |
sudo ldconfig && \ | |
sudo mv $SC3_DIRECTORY/SC3plugins $SC3_EXT_DIRECTORY/SC3plugins |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Modified version of this script: https://github.com/lvm/build-supercollider | |
# Inspired by this: git@github.com:supercollider/supercollider/blob/develop/README_RASPBERRY_PI.md | |
### | |
# | |
# Variables | |
# | |
INSTALL_DIR=/tmp | |
SUPERCOLLIDER_VER=develop | |
SUPERCOLLIDER_DIR=$INSTALL_DIR/supercollider | |
SUPERCOLLIDER_BUILD_DIR=$SUPERCOLLIDER_DIR/build | |
### | |
# | |
# Update | |
# | |
sudo apt update | |
### | |
# | |
# Install building dependencies | |
# | |
sudo apt-get install libsamplerate0-dev libsndfile1-dev libasound2-dev libavahi-client-dev \ | |
libreadline-dev libfftw3-dev libudev-dev cmake git libjack-jackd2-dev gcc build-essential make binutils ssh-client | |
### | |
# | |
# Download and build SC | |
# | |
mkdir -p $SUPERCOLLIDER_DIR | |
# Download SC Source | |
git clone --recursive --branch $SUPERCOLLIDER_VER \ | |
https://github.com/supercollider/supercollider.git $SUPERCOLLIDER_DIR | |
# Create the the directory where SC will be built | |
mkdir -p $SUPERCOLLIDER_BUILD_DIR | |
# And build it. | |
cd $SUPERCOLLIDER_BUILD_DIR && \ | |
git submodule update --init --recursive && \ | |
# For a GUI-less build: | |
cmake -DCMAKE_BUILD_TYPE=Release -DSUPERNOVA=ON -DSC_ED=OFF -DSC_EL=OFF -DSC_VIM=ON -DNATIVE=ON \ | |
-DSC_IDE=OFF -DNO_X11=ON -DSC_QT=OFF .. | |
make -j4 && \ | |
sudo make install && \ | |
sudo ldconfig |
A couple quick notes from having run this on my 3B just now:
- github changed some auth policy and now prevents cloning git:// URLs unauthenticated; this affects submodules in supercollider versions before 3.12.2 (more info, tldr: ppl should use the 3.12 branch, which has the fix)
- my Pi has only 1 Gb of RAM and the default 100Mb swap was not enough to compile sc; bumping it up to 512Mb worked (here's a guide for wayward travellers)
Thanks Dave!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
A couple quick notes from having run this on my 3B just now: