TUTORIAL - Update to MPD Version 0.18.9

“Why the hell we update the mpd?! The volumio-mpd runs very well.”
Answer: There have been 8-9 major releases since the version used in Volumio (0.7.14 ??) - a number of things have been improved and fixed, see this changelog. You’ll know linux a little bit better than before too.

Some quick notes on how I upgraded MPD version to 0.18.9… (thanks Melomane for additional writeup)

set the correct timezone if necessary:

sudo raspi-config

After reboot check date:

date So 16. Feb 20:11:22 CET 2014

Ok, all good, lets proceed…

Stop MPD

/etc/init.d/mpd stop

Make a temp dir in /root/temp

cd /root
mkdir temp
cd temp

Download the latest MPD Source code from musicpd.org/download/mpd/stable/

wget http://www.musicpd.org/download/mpd/stable/mpd-0.18.9.tar.xz
tar xvJf mpd-0.18.9.tar.xz
cd mpd-0.18.9

Install the tools to compile

apt-get update
apt-get install build-essential gcc automake1.9 libtool flex bison gdb

Compile from Source

sh autogen.sh
./configure
make
make install

WAIT… WAIT…WAIT…

Cut some fat and save some space

strip /usr/local/bin/mpd

Cleanup old version of MPD and Symlink the new one

mv /usr/bin/mpd /usr/bin/mpd_old
ln -s /usr/local/bin/mpd /usr/bin/mpd

Alternatively, instead of symlink, edit the start script and point to new MPD

nano /etc/init.d/mpd

Find and change this line as below

DAEMON=/usr/local/bin/mpd

Restart MPD

/etc/init.d/mpd start

Confirm if its the latest version (If all went well above)

root@volumio:~/temp# mpd -V
Music Player Daemon 0.18.8

Cleanup (optional)

cd ~
rm -rf /root/temp
reboot

Congrats :wink:

sources: a | b

What does say mpd -V after /etc/init.d/restart?
What which mpd
What ps fax|grep mpd

Sorry, but I’m a little bit curious, because make install without configure --prefix will install to /usr/local/bin while debian-mpd is in /usr/bin

But may be volumio-mpd is in /usr/local/bin?

root@volumio:~# mpd -V
Music Player Daemon 0.18.8

Copyright (C) 2003-2007 Warren Dukes <warren.dukes@gmail.com>
Copyright (C) 2008-2013 Max Kellermann <max@duempel.org>
This is free software; see the source for copying conditions.  There is NO
warranty; not even MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Decoders plugins:
 [mad] mp3 mp2
 [mpg123] mp3
 [vorbis] ogg oga
 [oggflac] ogg oga
 [flac] flac
 [sndfile] wav aiff aif au snd paf iff svx sf voc w64 pvf xi htk caf sd2
 [audiofile] wav au aiff aif
 [dsdiff] dff
 [dsf] dsf
 [faad] aac
 [mpcdec] mpc
 [wavpack] wv
 [modplug] 669 amf ams dbm dfm dsm far it med mdl mod mtm mt2 okt s3m stm ult umx xm
 [ffmpeg] 16sv 3g2 3gp 4xm 8svx aa3 aac ac3 afc aif aifc aiff al alaw amr anim apc ape asf atrac au aud avi avm2 avs bap bfi c93 cak cin cmv cpk daud dct divx dts dv dvd dxa eac3 film flac flc fli fll flx flv g726 gsm gxf iss m1v m2v m2t m2ts m4a m4b m4v mad mj2 mjpeg mjpg mka mkv mlp mm mmf mov mp+ mp1 mp2 mp3 mp4 mpc mpeg mpg mpga mpp mpu mve mvi mxf nc nsv nut nuv oga ogm ogv ogx oma ogg omg psp pva qcp qt r3d ra ram rl2 rm rmvb roq rpl rvc shn smk snd sol son spx str swf tgi tgq tgv thp ts tsp tta xa xvid uv uv2 vb vid vob voc vp6 vmd wav webm wma wmv wsaud wsvga wv wve
 [pcm]

Output plugins:
 shout null fifo alsa ao oss jack httpd recorder

Encoder plugins:
 null vorbis lame twolame wave flac

Input plugins:
 file curl ffmpeg mms

Playlist plugins:
 extm3u m3u xspf pls asx rss soundcloud cue cue

Protocols:
 file:// http:// https:// mms:// mmsh:// mmst:// mmsu:// gopher:// rtp:// rtsp:// rtmp:// rtmpt:// rtmps://
root@volumio:~# 
root@volumio:~# which mpd
/usr/local/bin/mpd
root@volumio:~# ps fax|grep mpd
 3236 pts/1    S+     0:00          \_ grep mpd
 2948 ?        Ssl    0:21 /usr/bin/mpd /etc/mpd.conf

You see: there’s running the old Version in /usr/bin.

Edit the start-script or /etc/default/mpd to start the mpd in /usr/local/bin.

Hi Melomane… Thank you… :slight_smile:
I hadnt even noticed that. I have updated the instructions to rename /usr/bin/mpd and symlink the new one in its place.

And if ls -la /usr/local/bin/mpd shows you a very large file do a strip /usr/local/bin/mpd

yea, the new MPD is a bit larger compared to the old… 9.1MB vs 2.1MB :wink:

root@volumio:/usr/bin# ls -lah /usr/local/bin/mpd
-rwxr-xr-x 1 root staff 9.1M Feb 15 14:42 /usr/local/bin/mpd
root@volumio:/usr/bin# ls -lah /usr/bin/mpd_old 
-rwxr-xr-x 1 root staff 2.1M May 17  2013 /usr/bin/mpd_old

375K after the STRIP :wink:

root@volumio:/usr/bin# strip /usr/local/bin/mpd
root@volumio:/usr/bin# ls -lah /usr/local/bin/mpd
-rwxr-xr-x 1 root staff 375K Feb 15 16:34 /usr/local/bin/mpd

Hi I try to update mpd, but when type ./configure i recive an error message like “newly created file is older than distribuite d files che i your system clock”
I verified that the version install ed is 0.17
Duo you have had the same problem?

Did you?

date So 16. Feb 09:20:03 CET 2014
Probably your rpi started without an active internet connection. Restart or wait until date gives the current time.

My date is always

Thu jan 1 utc 1970 :astonished:

The rpi has no hardwareclock and doesn’t save the valid time at shutdown. So it starts every time with that date. Did you configure the system time with raspi-config?

Hi, when I trying to install the MPD, the system said “make: command not found”…

Hm, without compilertools and lib-devs the tutorial is useless for beginners.
@dakku: Did you install them or are they present in volumio-distro?

I’ve udoo platform not rpi

Hmm, I didnt have to install them specifically for this update. I guess I might have installed them at some point in the past. I will update the instruction to be a little more “beginner friendly”. One automatically assumes that if you are messing around with Linux you may be familiar with the basics already. I guess I should remember that next time :wink:

Please try to install the tools to compile…

sudo apt-get install build-essential

Hi, Sadly I do not have the UDOO device and not really familiar with it either :open_mouth:

Ok, lets play around a little bit with a fresh installed volumio beta1.1. :wink:

Caveat: This post may be for rpi users only. I don’t know about other devices.

set the correct timezone if necessary:

sudo raspi-config

After reboot check date:

date So 16. Feb 20:11:22 CET 2014
Get rid of the damned sudo :wink:

sudo su -

Install the compiler and tools:

apt-get update apt-get install build-essential gcc automake1.9 libtool flex bison gdb
wget etc. the mpd source (see above post #1)

Let’s try

./configure

Looks good:
########### MPD CONFIGURATION ############

Archive support:
(-bzip2) (-ISO9660) (-ZIP)
Client support:
(+IPv6) (+TCP) (+UNIX Domain Sockets)
File format support:
(+AAC) (-AdPlug) (-C64 SID) (+FFMPEG) (+FLAC) (-FluidSynth) (-GME)
(+libsndfile) (-MikMod) (+MODPLUG) (+MAD) (+MPG123) (+Musepack)
(-Opus) (-OggTremor) (+OggVorbis) (+WAVE) (+WavPack) (-WildMidi)
Other features:
(+libsamplerate) (+libmpdclient) (+inotify) (-SQLite)
Metadata support:
(+ID3)
Playback support:
(+ALSA) (+FIFO) (+File Recorder) (+HTTP Daemon) (+JACK)
(+libao) (+OSS) (-OpenAL) (-OS X) (-Pipeline)
(-PulseAudio) (-ROAR) (+SHOUTcast) (-Solaris) (-WinMM)
Streaming encoder support:
(+FLAC) (+LAME) (+Ogg Vorbis) (-Opus) (+TwoLAME) (+WAVE)
Streaming support:
(-CDIO_PARANOIA) (+CURL) (-Despotify) (+Soundcloud)
(+MMS)

##########################################

make

Voila, brew a fresh cup of tea…

… for the question of the week: Why the hell we update the mpd?! The volumio-mpd runs very well.
Answer: You’ll know linux a little bit better than before. :wink:

After a while and a few more cups of tea: If make ends without errors do make install etc. pp. (see post #1)

Then edit:

sudo nano /etc/init.d/mpd

DAEMON=/usr/local/bin/mpd BTW: I prefer this, because you can faster change between the old an the new mpd. But working with symlinks (post #1) is also a nice way. :wink:

sudo reboot

ps fax|grep mpd| grep -v grep 2635 ? Ssl 0:00 /usr/local/bin/mpd /etc/mpd.conf

HTH and please excuse my poor english…

Nice! great to see tutorials like this. I think michelangelo configures the make with a lot of options stripped out, hence the smaller file size. Just out of interest, how long does it take to compile mpd on the Pi?

:slight_smile: :slight_smile:
On my 256mb version it took around 10-15min I think. I let it compiling and went to make a cup of tea, drank it and then went to the toilet :blush: