Compiling SqueezePlay on linux (Ubuntu AMD64)

Standard

Logitech Squeezeboxes are great little network audio streamers — I have a squeezebox Duet, which is much cooler (IMO) than an Apple TV + iPod.

Squeezeplay is the Squeezebox controller / squeezebox touch user interface, and it can run on any computer. You can use that computer as a controller for your squeezebox receiver, or as a complete squeezebox, playing music. If you can get it running on a portable device, you effectively get a new Squeezebox Controller for free.

Unfortunately, even though the Squeezeboxes are based on a GNU/Linux foundation, Linux users don’t get much love when it comes to releases of SqueezePlay… so we have to compile it ourselves.

Here is how to get SqueezePlay working on Ubuntu karmic amd64, but the instructions should apply to other distros. I’ve also tested it on Karmic 32 bit.

In order to run SqueezePlay, we need to compile the latest development code for SqueezePlay 7.5 that Logitech have available online on their SVN server. This guide is correct as at 21 Nov 2009, but as the Logitech devs work on the code, things will change, and they might introduce new bugs. For now, this is the procedure — and it works nicely with my SqueezeCentre 7.4.1.

First of all, we need to install the required dependencies. This may not be a complete list, as I may have had things installed already — if you get errors with ld towards the end of the process, you may be missing some.

Install the below packages with the following command in a terminal:

sudo apt-get install build-essential flex bison subversion automake libtool libpng12-dev libjpeg62-dev libexpat1-dev libreadline5-dev xorg-dev libflac++-dev libvorbis-dev libvorbisidec-dev libasound-dev

Next, we need to grab the SVN source code. Create a directory somewhere, open a terminal, and cd into the directory. Then do:
svn co http://svn.slimdevices.com/repos/jive/7.5/trunk/squeezeplay

Wait while the source is downloaded.

Now, we need to fix a couple of bugs to ensure it compiles smoothly. I’ve reported these to the dev team, so if you can’t find the parts to change — or it looks like they are fixed already, then don’t worry :-)

The first two bugs are in <your-folder>/squeezeplay/src/Makefile.linux, so open up the file in a text editor, and make the following changes:

  • On line 10, change ${PWD} to $(shell pwd) . After the change, line 10 will look thus:
    SRC_DIR = $(realpath $(shell pwd)) .
  • Change line 146 from: cd luaprofiler-2.0 && make -f Makefile.linux install to: cd luaprofiler-2.0 && LD="gcc -shared" make -f Makefile.linux install

The third bug: browse to <your-folder>/squeezeplay/src/squeezeplay/src/audio/decode, and open decode.c. Find the printf statement on line 434, and change %llu to %"PRIu64". After this, line 434 will look like this:
printf("elapsed:%"PRIu64" buffers: %0.1f%%/%0.1f%%\n", elapsed, dbuf, obuf);

Finally, we need to replace one of the static libraries that squeezeplay is using — the version of portaudio that is included is out of date, and prevents sound from playing. So, download the latest portaudio here, put it in your squeezeplay/src directory, and double-click it to extract it there. Then rename Logitech’s portaudio_v19_1360 directory to portaudio_v19_1360-old, and rename your new portaudio directory to portaudio_v19_1360.

Now, it’s time to compile the code. Switch to the <your-folder>squeezeplay/src directory in your terminal (e.g. cd squeezeplay/src), and run the compile as follows:

sudo make -f Makefile.linux

This will take a while. Once done, you will have a tarball in the ../build directory. To install squeezeplay, you just need to extract the contents of this to /opt/squeezeplay:


cd ../build/
sudo mkdir /opt/squeezeplay
tar -C /opt/squeezeplay -xvf sq<TAB>

(the exact name of the squeezeplay tarball will vary — just hit tab to have it auto-complete).

then, to start squeezeplay, the command is:
/opt/squeezeplay/bin/squeezeplay.sh

to uninstall, just delete it from /opt.

Some potential hiccups:

  • Makefile.linux has a “-deb” option that is supposed to build a .deb package for installation. However, it doesn’t seem to work. Furthermore, if you try it, you’ll need to clear out your working folder and start again — even with ‘make clean’, you’ll never be able to build a package until you start over, for some reason.

 

Squeezeplay on Ubuntu

Squeezeplay on Ubuntu

My next step is to get it running on an old iPaq PDA I have lying around… watch this space!

55 thoughts on “Compiling SqueezePlay on linux (Ubuntu AMD64)

  1. Would you mind enabling rss feeds, because this page is difficult to read on my phone. Don’t mean to be a complainer, but I figure if it would help me it would probably help others as well. Thanks :)

  2. David

    I had this compiled on Ubuntu 10.10 and it worked. I have since upgraded to 12.04 64 bit which is the new Long Term Release. Will there be an update for the instructions as they no longer seem to work with 12.04?

  3. Magnificent beat ! I would like to apprentice even as you amend your web site, how can i subscribe for a blog web site? The account aided me a acceptable deal. I have been tiny bit familiar of this your broadcast offered shiny transparent concept

  4. PeM

    Hello!
    Thanks for this tutoriel the compilation works well and squeezeplay is running but there is no output sound..
    I have no problem when I use it with raspberry pi.
    Is there something to modify for specify the sound card?
    thanks in advance for your answers!

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>