It was quite an ordeal, but I managed to build Pd-extended (Puredata with a bunch of externals) on my Raspberry Pi running Debian Squeeze. I also uploaded my finished package (.deb) to puredata.info, see below for details. Here’s what you need to do:
- Firstly, your SD card’s partition is probably not large enough to accomodate all the files we’ll need, so we have to expand it to fit your card first. From a terminal session on your Pi:
-
printf "d\n3\nd\n2\nn\np\n2\n157696\n\nw\n" | sudo fdisk -cu /dev/mmcblk0
-
sudo reboot
-
sudo resize2fs /dev/mmcblk0p2
-
- We need to add the repositories for the source to aptitude:
sudo nano /etc/apt/sources.list
Move to the bottom and paste this in and save (ctrl+o):
deb-src http://ftp.uk.debian.org/debian/ squeeze main deb http://backports.debian.org/debian-backports squeeze-backports main
- Update your aptitude cache:
sudo apt-get update
- We’ll need to install a whole bunch of dependencies for building Pd and all the various externals. This took like 4 days to manually figure out:
sudo apt-get install rsync autoconf libfftw3-dev liblua5.1-0-dev swig libvorbis-dev ladspa-sdk libspeex-dev libmp3lame-dev lua5.1
- Copy the source:
rsync -av --delete rsync://128.238.56.50/distros/pd-extended/ pd-extended/
- Since it will take a while, you may want to use this command to detach the process from your terminal session and log the output to a file:
nohup rsync -av --delete rsync://128.238.56.50/distros/pd-extended/ pd-extended/ > rsync.log &
- Build the main Pd dependencies:
sudo apt-get build-dep puredata gem pdp
- For some reason I had to change one of the externals’ makefile to get it to build correctly. Open /externals/OSCx/src/Makefile (I used nano), go to line 20 and remove “-lpd” so it looks like this:
LIBS = -L../../../pd/bin -lc -lm
- OK, we’re now ready to actually start building. This will take a long time, hours most likely. I did it piecemeal so I can’t say for sure how long it takes from start to finish.
-
cd pd-extended/packages/linux_make
-
nohup make install > makeinstall.log &
- While you’re still logged in, you can monitor that logfile by doing
tail -f makeinstall.log
- Once that finishes, you should see “linux_make install succeeded!” Yay! If you encounter any errors please post them here and we’ll see what I missed.
- Now we can make the actual Debian package that you can install like any other program:
nohup make package > makepackage.log &
- If you previously installed Puredata vanilla (as per my previous post), you’ll need to uninstall that first:
sudo apt-get --purge remove puredata
- For convenience I uploaded this package to puredata.info. All you have to do is download that file to your RPi:
wget -O Pd-0.43.1-extended-20120606.deb http://download.puredata.info/pd-extended-rpi/releases/1.0/Pd-0.43.1-extended-20120606.deb
- Finally, let’s install it:
sudo dpkg -i Pd-0.43.1-extended-20120606.deb
- If everything goes well, you now have Pd-extended on your Raspberry Pi! Here’s a new test patch that uses Freeverb~ for you to test, like so:
pd-extended -nogui -noadc -alsa testPatchExtended.pd
- Presently, I’m getting some serious noise and I think it has something to do with the ALSA driver still being in beta. Looking into it. If any other linux hackers have any ideas, please let me know!