Home of the Squeezebox™ & Transporter® network music players.
Results 1 to 7 of 7
  1. #1
    Junior Member
    Join Date
    Jun 2011
    Posts
    12

    Building & running Squeezeplay v7.8 trunk on Ubuntu 12.04

    The subject of building Squeezeplay on Linux comes up occasionally but the most popular Googled guides are also a bit out of date, so here's what I just pulled off on my i386 Xubuntu box.

    1. Set up your environment:

    I'm not sure if this dependency list is up to date since I know I've had to update these libraries for other projects from time to time. Therefore I simply copied this list from the excellent though old http://www.jfwhome.com/2009/11/22/co...-ubuntu-amd64/ . If you're doing this from scratch you may find that you have to update the library list, but this will at least get you moving in the right direction.

    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

    2. Pull a Squeezeplay v7.8 snapshot:

    cd <builddir>
    svn co http://svn.slimdevices.com/repos/jiv...nk/squeezeplay

    3. Tweak <builddir>/squeezeplay/src/Makefile.linux:

    On line 10, change ${PWD} to $(shell pwd) . After the change, line 10 will look like this:

    SRC_DIR = $(realpath $(shell pwd)) .

    Search for 'luaprofiler-2.0', change line from:
    cd luaprofiler-2.0 && make -f Makefile.linux install
    to:
    cd luaprofiler-2.0 && LD="gcc -shared" make -f Makefile.linux install

    4. Tweak <builddir>/squeezeplay/src/squeezeplay/src/audio/decode/decode.c:

    Search for 'elapsed:%llu' , change printf line from '%llu' to '%"PRIu64"' . After the change, the line will look something like this:

    printf("elapsed:%"PRIu64" buffers: %0.1f%%/%0.1f%%\n", elapsed, dbuf, obuf);

    5. Kludge the Squeezeplay PulseAudio library by downloading the latest library snapshot:

    http://www.portaudio.com/archives/pa_snapshot.tgz

    Delete all contents in <builddir>/squeezeplay/src/portaudio_v19_1360, then expand the library snapshot in this directory.

    6. Kludge the Squeezeplay SDL library by downloading 1.2.15 source from:

    http://www.libsdl.org/download-1.2.php

    Delete all contents in <builddir>/squeezeplay/src/SDL-1.2.13 then expand the latest source in this directory.

    7. cd <builddir>/squeezeplay/src/, execute "sudo make -f Makefile.linux" . If the build succeeds your results will be in <builddir>/squeezeplay/build (as directories you can copy to /opt/squeezeplay AND a tarball).

    This gets you a working build but there's some other stuff you'll have to tweak to get around PulseAudio.

    8. Modify your ALSA configuration:

    a. Copy /usr/share/alsa/alsa.conf to /usr/share/alsa/alsa-nopulse.conf.
    b. Comment OUT any Pulse invocation in also-nopulse.conf. In my case I commented every alsa.conf.d invocation within the @hooks/files section of this file, leaving "/etc/asound.conf" and "~/.asoundrc" in place, e.g.:

    @hooks [
    {
    func load
    files [
    # {
    # @func concat
    # strings [
    # { @func datadir }
    # "/alsa.conf.d/"
    # ]
    # }
    "/etc/asound.conf"
    "~/.asoundrc"
    ]
    errors false
    }
    ]

    9. Modify the squeezeplay.sh script you just built (<builddir>/squeezeplay/bin/squeezeplay.sh) to bypass PulseAudio using your new script:

    Change "./jive" to:

    ALSA_CONFIG_PATH=/usr/share/alsa/alsa-nopulse.conf ./jive

    10. My system has some remaining permissions issues so I have to run /opt/squeezeplay/bin/squeezeplay.sh with root privilege. I got tired of tracking problems down so if anyone knows how to get it running as a normal user, please add to the thread.

  2. #2
    Senior Member
    Join Date
    Sep 2005
    Location
    Germany
    Posts
    594
    Quote Originally Posted by Braklet View Post
    10. My system has some remaining permissions issues so I have to run /opt/squeezeplay/bin/squeezeplay.sh with root privilege.
    I got tired of tracking problems down so if anyone knows how to get it running as a normal user, please add to the thread.
    Hi does it not run or do you hear no sound?

    if you dont hear sound you maybe not in the audio group take a look @:
    Code:
    grep ^audio /etc/group
    if your username isnt isted there add it to the gruop audio

    Code:
    sudo usermod -G audio -a username
    cheers
    Gruss

    Jan

  3. #3
    Junior Member
    Join Date
    Jun 2011
    Posts
    12
    Quote Originally Posted by DJanGo View Post
    if you dont hear sound you maybe not in the audio group
    Hi Jan, that's a good guess but isn't the case on my system. Normal user is part of all the audio related system groups:

    Code:
    groups rlr
    rlr : rlr adm dialout cdrom audio plugdev lpadmin admin sambashare mythtv vboxusers pulse pulse-access
    Squeezeplay-as-user-rlr runs, does not play any sound, and generates the following errors:

    Code:
    Squeezeplay 7.8.0 r9704M
    20130119 13:40:22.564 INFO   squeezeplay - JiveMain.lua:265 SqueezePlay version 7.8.0 r9704M
    
    20130119 13:54:48.841 ERROR  audio.codec - decode_alsa_init:210 shmget error Permission denied
    
    20130119 13:40:24.965 ERROR  squeezeplay.applets - AppletManager.lua:371 Error configuring meta for SetupAppletInstaller:/opt/squeezeplay/share/jive/jive/AppletManager.lua:710: fopen: Permission denied
    stack traceback:
    	/opt/squeezeplay/share/jive/jive/AppletManager.lua:371: in function '_evalMetas'
    	/opt/squeezeplay/share/jive/jive/AppletManager.lua:403: in function 'discover'
    	/opt/squeezeplay/share/jive/jive/JiveMain.lua:516: in function 'reload'
    	/opt/squeezeplay/share/jive/jive/JiveMain.lua:378: in function </opt/squeezeplay/share/jive/jive/JiveMain.l
    
    20130119 13:40:26.222 ERROR  net.thread - NetworkThread.lua:264 Error running notify_playerAlarmState:/opt/squeezeplay/share/jive/jive/AppletManager.lua:710: fopen: Permission denied
    stack traceback:
    	...pt/squeezeplay/share/jive/jive/net/NetworkThread.lua:264: in function 'notify'
    	/opt/squeezeplay/share/jive/jive/slim/Player.lua:1251: in function '?'
    	/opt/squeezeplay/share/jive/jive/slim/Player.lua:236: in function 'func'
    	/opt/squeezeplay/share/jive/jive/net/Comet.lua:952: in function '_response'
    	/opt/squeezeplay/share/jive/jive/net/Comet.lua
    Squeezeplay works great via "sudo /opt/squeezeplay/bin/squeezeplay.sh" so I haven't tracked down the source of these errors.

    Thanks for your input!
    Last edited by Braklet; 2013-01-19 at 06:56. Reason: Forgot to include decode_alsa_init error

  4. #4
    Junior Member
    Join Date
    Jun 2011
    Posts
    12
    Quote Originally Posted by Braklet View Post
    Squeezeplay-as-user-rlr runs, does not play any sound, and generates the following errors:
    Well, after replying, I started playing around with Squeezeplay and permissions.

    Running Squeezeplay seems to leave detritus scattered about the filesystem. If you run anything with root privilege, you will only be successful running with root privilege from that point on. The only way to eliminate this restriction is to power cycle.

    I was able to successfully run Squeezeplay under normal user privilege after cycling power.

    Now I have to go change all my menu scripts...

    In any case, thanks for inducing me to take another look.

  5. #5
    Junior Member
    Join Date
    Apr 2013
    Posts
    1

    Thanks and addition

    Hi,

    Great post. It helped me a great deal.
    I had to make 1 additional adjustment before building.

    I had to comment out line 371 to 376 in <builddir>/squeezeplay/src/squeezeplay/src/ui/jive_framework.c

    After my tweak it looks like:

    /* check queue size */
    /* if (perfwarn.queue) {
    if (SDL_EventQueueLength() > perfwarn.queue) {
    printf("SDL_event_queue > %2d : %3d\n", perfwarn.queue, SDL_EventQueueLength());
    }
    }*/

    If I don't do that it keeps complaining that the SDL_EventQueueLength is an unknown function.

    Regards,

    Martijn
    Last edited by mvheezik; 2013-04-09 at 09:32.

  6. #6
    Junior Member
    Join Date
    Apr 2013
    Posts
    3
    I had to do a few extra steps...unfortunatly, i cant make a post with a link in it till i have more than 1 post...sooo...see next post.

  7. #7
    Junior Member
    Join Date
    Apr 2013
    Posts
    3
    Quote Originally Posted by Braklet View Post
    The subject of building Squeezeplay on Linux comes up occasionally but the most popular Googled guides are also a bit out of date, so here's what I just pulled off on my i386 Xubuntu box.

    1. Set up your environment:

    I'm not sure if this dependency list is up to date since I know I've had to update these libraries for other projects from time to time. Therefore I simply copied this list from the excellent though old http://www.jfwhome.com/2009/11/22/co...-ubuntu-amd64/ . If you're doing this from scratch you may find that you have to update the library list, but this will at least get you moving in the right direction.

    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

    2. Pull a Squeezeplay v7.8 snapshot:

    cd <builddir>
    svn co http://svn.slimdevices.com/repos/jiv...nk/squeezeplay

    3. Tweak <builddir>/squeezeplay/src/Makefile.linux:

    On line 10, change ${PWD} to $(shell pwd) . After the change, line 10 will look like this:

    SRC_DIR = $(realpath $(shell pwd)) .

    Search for 'luaprofiler-2.0', change line from:
    cd luaprofiler-2.0 && make -f Makefile.linux install
    to:
    cd luaprofiler-2.0 && LD="gcc -shared" make -f Makefile.linux install

    4. Tweak <builddir>/squeezeplay/src/squeezeplay/src/audio/decode/decode.c:

    Search for 'elapsed:%llu' , change printf line from '%llu' to '%"PRIu64"' . After the change, the line will look something like this:

    printf("elapsed:%"PRIu64" buffers: %0.1f%%/%0.1f%%\n", elapsed, dbuf, obuf);

    5. Kludge the Squeezeplay PulseAudio library by downloading the latest library snapshot:

    http://www.portaudio.com/archives/pa_snapshot.tgz

    Delete all contents in <builddir>/squeezeplay/src/portaudio_v19_1360, then expand the library snapshot in this directory.

    6. Kludge the Squeezeplay SDL library by downloading 1.2.15 source from:

    http://www.libsdl.org/download-1.2.php

    Delete all contents in <builddir>/squeezeplay/src/SDL-1.2.13 then expand the latest source in this directory.

    7. cd <builddir>/squeezeplay/src/, execute "sudo make -f Makefile.linux" . If the build succeeds your results will be in <builddir>/squeezeplay/build (as directories you can copy to /opt/squeezeplay AND a tarball).

    This gets you a working build but there's some other stuff you'll have to tweak to get around PulseAudio.

    8. Modify your ALSA configuration:

    a. Copy /usr/share/alsa/alsa.conf to /usr/share/alsa/alsa-nopulse.conf.
    b. Comment OUT any Pulse invocation in also-nopulse.conf. In my case I commented every alsa.conf.d invocation within the @hooks/files section of this file, leaving "/etc/asound.conf" and "~/.asoundrc" in place, e.g.:

    @hooks [
    {
    func load
    files [
    # {
    # @func concat
    # strings [
    # { @func datadir }
    # "/alsa.conf.d/"
    # ]
    # }
    "/etc/asound.conf"
    "~/.asoundrc"
    ]
    errors false
    }
    ]

    9. Modify the squeezeplay.sh script you just built (<builddir>/squeezeplay/bin/squeezeplay.sh) to bypass PulseAudio using your new script:

    Change "./jive" to:

    ALSA_CONFIG_PATH=/usr/share/alsa/alsa-nopulse.conf ./jive

    10. My system has some remaining permissions issues so I have to run /opt/squeezeplay/bin/squeezeplay.sh with root privilege. I got tired of tracking problems down so if anyone knows how to get it running as a normal user, please add to the thread.
    I needed some extra steps for my system: Ubuntu 12.10, intel i5 64bit

    libreadline5-dev doesnt seem to be available for my system via apt-get, but libreadline6-dev is:
    Sudo apt-get install libreadline6-dev

    ncurses was also needed but not installed:
    sudo apt-get install ncurses-dev

    From here i had to download replace 4 files from the tarball linked
    files to be replaced are in the <build>/squeezeplay/src/SDL-1.2.13 dir *after* you download and expand the latest version (1.2.15 as of today)

    After that, i got a successful make.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •