Home of the Squeezebox™ & Transporter® network music players.
Page 1 of 2 12 LastLast
Results 1 to 10 of 13
  1. #1

    Build Squeezelite

    Hi all,

    I've started a home audio system, including :
    - 3 RPI with piCorePlayer (one PI B, 2 PI zero),
    - a controller software (Squeezer running on my Android phone).

    This works fine.

    Now I'd like to add some features, including remotelly controlling (from Squeezer) some I/O on the RPIs.
    I guess I can do this by changing the Squeezelite software.

    So I've created a virtual machine under Linux (Mint 18.2), and installed the Squeezelite project and the necessary libraries.

    When I build the project on this virtual machine, I'm facing 2 issues (maybe linked) :
    - I had to change the makefile, because some compiler options were not accepted : -march=armv6 -mfloat-abi=hard -mfpu=vfp (I've removed these options),
    - without these options the program is built, but fails to start when installed on the RPI; error is "Linux syntax error ( unexpected".

    Any help about how to build (locally or by cross-compile) and run the Squeezelite software on a RPI, will be greatly appreciated.

    Thanks,
    Claude

  2. #2
    Senior Member
    Join Date
    Oct 2005
    Location
    Ireland
    Posts
    18,876
    Quote Originally Posted by ClaudeBoulard View Post
    Now I'd like to add some features, including remotelly controlling (from Squeezer) some I/O on the RPIs.
    I guess I can do this by changing the Squeezelite software.
    Personally, unless you're doing something really unusual, I'd avoid changing squeezelite and use a small program probably in Python to do the GPIO stuff.

    There have been very many projects using squeezelite, RPIs and custom control using GPIO - if you describe your final goal - somebody may be able to point you at something useful.

  3. #3
    Senior Member
    Join Date
    Sep 2005
    Posts
    2,848
    Quote Originally Posted by ClaudeBoulard View Post
    Now I'd like to add some features, including remotelly controlling (from Squeezer) some I/O on the RPIs.
    I guess I can do this by changing the Squeezelite software.
    You can but you shouldnt

    A dedicatec small Software like eg squeezelite is for a single purpose.
    Another little Software for Controlling RPI GPIO is the better solution.
    Same to adding some addons to something like squeezer is IMHO the same.

  4. #4
    Senior Member paul-'s Avatar
    Join Date
    Jan 2013
    Posts
    3,186
    The most common use of GPIO is to toggle an amp on and off based on the player status, that is already built into squeezelite. For other buttons, I would recommend using this to read from GPIO and issue commands to the LMS server.

    https://forums.slimdevices.com/showt...oders-on-a-RPi
    piCorePlayer a small player for the Raspberry Pi in RAM.
    Homepage: https://www.picoreplayer.org

    Please donate if you like the piCorePlayer

  5. #5
    Senior Member
    Join Date
    May 2008
    Location
    Canada
    Posts
    5,834
    Quote Originally Posted by ClaudeBoulard View Post
    Hi all,

    I've started a home audio system, including :
    - 3 RPI with piCorePlayer (one PI B, 2 PI zero),
    - a controller software (Squeezer running on my Android phone).

    This works fine.

    Now I'd like to add some features, including remotelly controlling (from Squeezer) some I/O on the RPIs.
    I guess I can do this by changing the Squeezelite software.

    So I've created a virtual machine under Linux (Mint 18.2), and installed the Squeezelite project and the necessary libraries.

    When I build the project on this virtual machine, I'm facing 2 issues (maybe linked) :
    - I had to change the makefile, because some compiler options were not accepted : -march=armv6 -mfloat-abi=hard -mfpu=vfp (I've removed these options),
    - without these options the program is built, but fails to start when installed on the RPI; error is "Linux syntax error ( unexpected".

    Any help about how to build (locally or by cross-compile) and run the Squeezelite software on a RPI, will be greatly appreciated.

    Thanks,
    Claude
    You're trying to do cross-compiling: your target is a pi but your build machine is a (I guess) a x86 processor. So this can't work unless you install a cross-compiler on the x86 and this explains why it can't start on the pi (it's x86 binary machine code that of course can't be understood by an arm cpu) and why the arm compiler options fails on the x86 machine. It's a bit tricky to do cross-compiling, so if you really want to modify squeezelite and re-compile it, I suggest you do that directly on the pi. All build tools are available on raspian or I assume on most other pi distro (I just use Debian)
    LMS 7.7, 7.8 and 7.9 - 5xRadio, 3xBoom, 4xDuet, 1xTouch, 1 SB2. Sonos PLAY:3, PLAY:5, Marantz NR1603, JBL OnBeat, XBoxOne, XBMC, Foobar2000, ShairPortW, JRiver 21, 2xChromecast Audio, Chromecast v1 and v2, , Pi B3, B2, Pi B+, 2xPi A+, Odroid-C1, Odroid-C2, Cubie2, Yamaha WX-010, AppleTV 4, Airport Express, GGMM E5

  6. #6
    Senior Member Jeff07971's Avatar
    Join Date
    Aug 2011
    Location
    London, England
    Posts
    1,502
    Quote Originally Posted by philippe_44 View Post
    You're trying to do cross-compiling: your target is a pi but your build machine is a (I guess) a x86 processor. So this can't work unless you install a cross-compiler on the x86 and this explains why it can't start on the pi (it's x86 binary machine code that of course can't be understood by an arm cpu) and why the arm compiler options fails on the x86 machine. It's a bit tricky to do cross-compiling, so if you really want to modify squeezelite and re-compile it, I suggest you do that directly on the pi. All build tools are available on raspian or I assume on most other pi distro (I just use Debian)
    Compiling SL on raspian is quite simple but there are quite a few dependencies. Heres how I do it.

    Code:
    sudo apt -y update && sudo apt -y install git libasound2-dev libflac-dev libmad0-dev libvorbis-dev libmpg123-dev libfaad-dev libsox-dev libsoxr-dev libavformat-dev liblirc-dev wiringpi
    git clone https://github.com/ralph-irving/squeezelite.git
    cd squeezelite/
    make clean && make --makefile=Makefile.rpi

    Want a webapp ? Get SqueezeLite-X ! https://forums.slimdevices.com/showt...l=1#post903953

  7. #7
    Junior Member
    Join Date
    May 2020
    Posts
    2

    Errors compiling Squeezelite on Raspberry Pi OS

    Bringing back an old thread because it has helped me a great deal but I seem to be missing something.

    I am trying to compile Squeezelite (cloaned from https:// github.com / ralph-irving/squeezelite.git (sorry first post can't post a link)) on a Raspberry Pi 2b. I have installed the development libraries below and am able to call the Makefile.rpi file.

    Code:
    sudo apt -y update && sudo apt -y install git libasound2-dev libflac-dev libmad0-dev libvorbis-dev libmpg123-dev libfaad-dev libsox-dev libsoxr-dev libavformat-dev liblirc-dev wiringpi
    git clone https://github.com/ralph-irving/squeezelite.git
    cd squeezelite/
    make clean && make --makefile=Makefile.rpi
    I'm getting stuck with errors where the compiler is unable to find many of the references in output_alsa.c. I've extracted a section of the errors
    Code:
    cc -Wall -fPIC -O2 -fcommon  -DOPUS -DALAC -DRESAMPLE -DVISEXPORT -DDSD -DIR -DGPIO -DRPI -DUSE_SSL -DLINKALL -I./include -I./include/opus -I./include/alac -I/usr/local/include -I/usr/include/ -s -march=armv6 -mfloat-abi=hard -mfpu=vfp mpg.c -c -o mpg.o
    cc -Wall -fPIC -O2 -fcommon  -DOPUS -DALAC -DRESAMPLE -DVISEXPORT -DDSD -DIR -DGPIO -DRPI -DUSE_SSL -DLINKALL -I./include -I./include/opus -I./include/alac -I/usr/local/include -I/usr/include/ -s -march=armv6 -mfloat-abi=hard -mfpu=vfp faad.c -c -o faad.o
    g++ main.o slimproto.o buffer.o stream.o utils.o output.o output_alsa.o output_pa.o output_stdout.o output_pack.o output_pulse.o decode.o flac.o pcm.o mad.o vorbis.o mpg.o dsd.o dop.o dsd2pcm/dsd2pcm.o alac.o alac_wrapper.o opus.o process.o resample.o output_vis.o ir.o gpio.o minimal_gpio.o faad.o sslsym.o -L./lib -L/usr/local/lib -s -lgomp -lpthread -lm -lrt -lmad -lmpg123 -lFLAC -lvorbisfile -lvorbis -logg -lopusfile -lopus -lsoxr -llirc_client -lfaad -lssl -lcrypto -lalac -o squeezelite
    /usr/bin/ld: output_alsa.o: in function `alsa_close':
    output_alsa.c:(.text+0xa8): undefined reference to `snd_pcm_close'
    /usr/bin/ld: output_alsa.c:(.text+0xd4): undefined reference to `snd_strerror'
    /usr/bin/ld: output_alsa.o: in function `alsa_open':
    output_alsa.c:(.text+0x124): undefined reference to `snd_pcm_hw_params_sizeof'
    /usr/bin/ld: output_alsa.c:(.text+0x140): undefined reference to `snd_pcm_hw_params_sizeof'
    /usr/bin/ld: output_alsa.c:(.text+0x244): undefined reference to `snd_pcm_close'
    /usr/bin/ld: output_alsa.c:(.text+0x258): undefined reference to `snd_pcm_open'
    /usr/bin/ld: output_alsa.c:(.text+0x264): undefined reference to `snd_pcm_hw_params_sizeof'
    /usr/bin/ld: output_alsa.c:(.text+0x280): undefined reference to `snd_pcm_hw_params_any'
    /usr/bin/ld: output_alsa.c:(.text+0x2b0): undefined reference to `snd_pcm_hw_params_set_rate_resample'
    /usr/bin/ld: output_alsa.c:(.text+0x2cc): undefined reference to `snd_pcm_hw_params_set_rate'
    /usr/bin/ld: output_alsa.c:(.text+0x304): undefined reference to `snd_pcm_hw_params_set_access'
    /usr/bin/ld: output_alsa.c:(.text+0x360): undefined reference to `snd_strerror'
    /usr/bin/ld: output_alsa.c:(.text+0x3a4): undefined reference to `snd_strerror'
    ...
    I know i have installed libasound2-dev and can see the alsa header files in /usr/include/alsa/

    Any suggestions for next steps to be able to compile Squeezelite?
    Last edited by Matt4; 2020-05-28 at 11:06. Reason: added additional error output showing build progress

  8. #8
    Senior Member ralphy's Avatar
    Join Date
    Jan 2006
    Location
    Canada
    Posts
    2,499
    The Makefile was broken yesterday after I merged a pull request. I fixed it later in the day run git pull from the squeezelite folder and run the make again.
    Ralphy

    1-Touch, 5-Classics, 3-Booms, 1-UE Radio
    Squeezebox client builds donations always appreciated.

  9. #9
    Junior Member
    Join Date
    May 2020
    Posts
    2
    Quote Originally Posted by ralphy View Post
    The Makefile was broken yesterday after I merged a pull request. I fixed it later in the day run git pull from the squeezelite folder and run the make again.
    Thank you, I may have been dealing with 2 failures at once, the bug you mention and building in an environment that wasn't compatible. I found another post that mentioned Raspbian has a few old libraries that prevent this from working. After moving back to Tiny Core and finding https://soundcheck-audio.blogspot.co...ne-part-5.html all of my build issues are solved and I was able to build successfully.

    Thanks for the fantastic project.

  10. #10

    Compilation error

    Hello,

    I have three questions:
    I use a RPI 3B+ along with a nos DAC (TDA1543)

    1/ I want to try to upsample with Squeezelite.
    It looks like the standard version of Squeezelite doesn't allow that feature.

    So I tried to compile from source, however, I don't know what flag to add in order to allow resampling.

    2/ When trying to compile I get Error related to missing libraries

    3/ I can compile Squeezelite-R2 without error, And I see that it has a 64bit version, what about Squeezelite ?

    Thank you for the excellent work.
    Jean

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
  •