RaspberryPi compiling suggestions?

Need help with MPD?
Post Reply
marmitesandwich
Posts: 5
Joined: February 18th, 2019, 11:16 pm

RaspberryPi compiling suggestions?

Post by marmitesandwich » February 19th, 2019, 12:13 am

I have been trying mpd as a part of turnkey music playing packages such as RuneAudio and PiMusic Box, but I have come across problems which I have been advised are due to the old versions of mpd. Now I am trying to create a dedicated UPnP renderer, by installing a clean new version of Raspbian (or alternative distro) and then install only the latest versions of mpd and upmpdcli.

Raspbian currently includes an old version of mpd, and so I want to update to 0.21.x, and this is where I start to have problems. I have worked out that I need to download and compile the tar.gz file, but the user manual is losing me. I am comfortable with WinSCP and PuTTy, and working my way around the Linux directories. I have got as far as issuing the tar command and changing directory to the newly created /mpd-0.21.4. My knowledge of Linux is insufficient to understand whether I have the correct compiler, versions of Ninja, Meson, Boost etc.; codec libraries and build dependencies. Attempting to "configure the source tree" gave me errors, and then I decided there must be an easier way to get a default configuration of the latest version of mpd running. I am happy to mess with the contents of the config file after mpd is installed, but getting to that point seems to require a more intimate knowledge of Linux than I have.

So the question is, does somebody have a simple way for a computer literate, but Linux illiterate, music fan to turn Raspbian (or other RPi distro) into a dedicated mpd platform, running the latest version? The only other software I actually want to install is upmpdcli, but I can probably use the repository. I am only interested in mp3 and m4a formats, so I am guessing they are included in the standard codecs. Is it possible to list the Linux commands which will turn the downloaded tar.gz file into an installed and working mpd service in a clean Raspbian (or other Raspberry) environment? A script even?

Yours hopefully,
Marmite

max
Forum team
Posts: 900
Joined: January 15th, 2013, 3:43 pm

Re: RaspberryPi compiling suggestions?

Post by max » February 19th, 2019, 9:22 am

The manual lists exactly those commands you are now asking for. https://www.musicpd.org/doc/html/user.h ... rom-source

You wrote "the user manual is losing me" and "gave me errors", but that's not something anybody can help you with, as long as you keep details of your problems secret.

marmitesandwich
Posts: 5
Joined: February 18th, 2019, 11:16 pm

Re: RaspberryPi compiling suggestions?

Post by marmitesandwich » February 19th, 2019, 7:14 pm

Hi Max and thanks for your prompt response. Sorry about the secrets, but I was trying to avoid being too critical about the user manual, which I am sure someone has spent a lot of time creating, and I was hoping to find some more specific instructions for the Raspberry Pi, which I imagine is a common platform, for users who are not so familiar with Linux conventions. Maybe if I am more specific we can work out a sequence which I can post up for potential Raspberry Pi users wanting to use mpd to make a basic (but high quality) UPnP renderer.

So,
Download the source tarball from the MPD home page and unpack it:

tar xf mpd-version.tar.xz
cd mpd-version
I did this, and got what looked like a directory containing some decompressed directories and files. So far so good.
In any case, you need:

a C++14 compiler (e.g. gcc 6.0 or clang 3.9)
Meson 0.47.2 and Ninja
Boost 1.58
pkg-config
First hurdle. How would I know whether standard Raspbian has these or not? Maybe someone already knows. If not, how would I go about "getting" them?
Each plugin usually needs a codec library, which you also need to install. Check the Plugin reference for details about required libraries
If I want to use mpd as a dedicated UPnP renderer on a Raspberry Pi for commonly found formats (e.g. wav, flac, mp3, m4a), do I need any plugins at all?
For example, the following installs a fairly complete list of build dependencies on Debian Jessie:

apt install g++ \
...
Does this mean I should issue this command for Raspbian, which I believe is related to Debian?

Then this happened (the error):
root@raspberrypi:/guytemp/mpd-0.21.4# meson . output/release --buildtype=debugoptimized -Db_ndebug=true
-bash: meson: command not found
Maybe the answer is contained in the answer to the question above concerning what I "need".
The following command shows a list of compile-time options:

meson configure output/release
This looks like it will produce some more questions - which of these options do I want?
When everything is ready and configured, compile:
How do I know when everything is ready and configured?
And install:

ninja -C output/release install
This looks like my kind of command. I am looking forward to issuing it!

Again, I hope I don't appear to be too picky. If I am being unrealistic about trying to install mpd without sufficient understanding of Linux, please say so and I won't bother you. I hope to be able to post a tutorial of how I did it for other inexperienced Raspberry Pi users, which might be useful.
Regards,
Marmite

max
Forum team
Posts: 900
Joined: January 15th, 2013, 3:43 pm

Re: RaspberryPi compiling suggestions?

Post by max » February 20th, 2019, 9:14 am

You didn't install Meson, and now you wonder why the "meson" command was not found?

marmitesandwich
Posts: 5
Joined: February 18th, 2019, 11:16 pm

Re: RaspberryPi compiling suggestions?

Post by marmitesandwich » February 20th, 2019, 9:27 am

Thanks for your help. Good luck with your project.
Marmite.

skidoo
Posts: 165
Joined: April 28th, 2013, 10:06 pm
Location: Western Germany

Re: RaspberryPi compiling suggestions?

Post by skidoo » February 20th, 2019, 1:15 pm

@marmite> convince Volumio, RuneAudio or PiMusic Box maintainers to update MPD component or use Raspian testing.

max
Forum team
Posts: 900
Joined: January 15th, 2013, 3:43 pm

Re: RaspberryPi compiling suggestions?

Post by max » February 20th, 2019, 8:04 pm

I wish somebody could improve the documentation in a way that users like this guy understand it. I don't know how - I cannot even remotely imagine why anybody would ever read "you need Meson" and then proceed without having Meson. From my point of view, it can't be any clearer than "you need Meson".

marmitesandwich
Posts: 5
Joined: February 18th, 2019, 11:16 pm

Re: RaspberryPi compiling suggestions?

Post by marmitesandwich » February 28th, 2019, 5:43 pm

@skidoo many thanks for your constructive suggestion to try the testing repository. The latest version of mpd was in there, which solved the problem I previously had with google play music streaming. When I have figured out how to get the USB Infra Red Remote Control to work, and maybe investigated Bluetooth options with the Raspberry Pi, I will create a post from my experiences, so other RPi music fans can benefit from that. This probably isn't the right forum for that, however.

@max I can suggest 2 ways to handle questions like you got from "this guy". The first is to put up some kind of advisory which says that you need to be fluent in Linux before you attempt to compile mpd from source, and don't ask for help if you aren't. Then use generic descriptions of what to do which will be understood by Linux developers. Don't draw people in with detailed instructions which only tell half the story.

The other approach is to be a bit more tolerant of people who don't understand the instructions, but who could get there with a little help. Some people who might be able to use mpd, and promote it, don't know what Meson is, whether it is the same as meson, whether they have it, what version they have and how to go about "getting" it. Entering a command which uses the word meson is a logical way of finding out whether you "have" it or not, but it doesn't get you much further if you find you haven't. So you should expect questions like you got which you could answer in a way that educates and encourages users.

It's a great product, guys, and keep up the good work. It has got me out of a problem and made my listening experience more satisfying.
Regards,
Marmite Sandwich

Post Reply