[Solved] update & compile MPD problem

when i want to compile a newer version of mpd with soxr support, i bumped into a problem, the situation like this:
passed step:

  1. installed soxr, ecasound, cmt, swh-plugins and ladspa-sdk.
  2. downloaded the newest mpd and ready to compile:

git clone git://git.musicpd.org/master/mpd.git cd mpd ./autogen.sh ./configure --enable-pipe-output
3. input “make” to compile, and got error message:

src/lib/despotify/DespotifyUtils.cxx: In function ‘Tag mpd_despotify_tag_from_track(const ds_track&)’: src/lib/despotify/DespotifyUtils.cxx:86:12: error: invalid use of incomplete type ‘const struct ds_track’ if (!track.has_meta_data) ^ In file included from src/lib/despotify/DespotifyUtils.cxx:20:0: src/lib/despotify/DespotifyUtils.hxx:25:8: error: forward declaration of ‘const struct ds_track’ struct ds_track; ^ src/lib/despotify/DespotifyUtils.cxx:93:51: error: invalid use of incomplete type ‘const struct ds_track’ snprintf(tracknum, sizeof(tracknum), "%d", track.tracknumber); ^ In file included from src/lib/despotify/DespotifyUtils.cxx:20:0: src/lib/despotify/DespotifyUtils.hxx:25:8: error: forward declaration of ‘const struct ds_track’ struct ds_track; ^ src/lib/despotify/DespotifyUtils.cxx:99:43: error: invalid use of incomplete type ‘const struct ds_track’ snprintf(date, sizeof(date), "%d", track.year); ^ In file included from src/lib/despotify/DespotifyUtils.cxx:20:0: src/lib/despotify/DespotifyUtils.hxx:25:8: error: forward declaration of ‘const struct ds_track’ struct ds_track; ^ src/lib/despotify/DespotifyUtils.cxx:107:10: error: invalid use of incomplete type ‘const struct ds_track’ track.file_bitrate / 1000, ^ In file included from src/lib/despotify/DespotifyUtils.cxx:20:0: src/lib/despotify/DespotifyUtils.hxx:25:8: error: forward declaration of ‘const struct ds_track’ struct ds_track; ^ src/lib/despotify/DespotifyUtils.cxx:108:10: error: invalid use of incomplete type ‘const struct ds_track’ track.geo_restricted ? "" : "not "); ^ In file included from src/lib/despotify/DespotifyUtils.cxx:20:0: src/lib/despotify/DespotifyUtils.hxx:25:8: error: forward declaration of ‘const struct ds_track’ struct ds_track; ^ src/lib/despotify/DespotifyUtils.cxx:112:30: error: invalid use of incomplete type ‘const struct ds_track’ tag.AddItem(TAG_TITLE, track.title); ^ In file included from src/lib/despotify/DespotifyUtils.cxx:20:0: src/lib/despotify/DespotifyUtils.hxx:25:8: error: forward declaration of ‘const struct ds_track’ struct ds_track; ^ src/lib/despotify/DespotifyUtils.cxx:113:31: error: invalid use of incomplete type ‘const struct ds_track’ tag.AddItem(TAG_ARTIST, track.artist->name); ^ In file included from src/lib/despotify/DespotifyUtils.cxx:20:0: src/lib/despotify/DespotifyUtils.hxx:25:8: error: forward declaration of ‘const struct ds_track’ struct ds_track; ^ src/lib/despotify/DespotifyUtils.cxx:114:30: error: invalid use of incomplete type ‘const struct ds_track’ tag.AddItem(TAG_ALBUM, track.album); ^ In file included from src/lib/despotify/DespotifyUtils.cxx:20:0: src/lib/despotify/DespotifyUtils.hxx:25:8: error: forward declaration of ‘const struct ds_track’ struct ds_track; ^ src/lib/despotify/DespotifyUtils.cxx:115:46: error: invalid use of incomplete type ‘const struct ds_track’ tag.SetDuration(SignedSongTime::FromMS(track.length)); ^ In file included from src/lib/despotify/DespotifyUtils.cxx:20:0: src/lib/despotify/DespotifyUtils.hxx:25:8: error: forward declaration of ‘const struct ds_track’ struct ds_track; ^ make[1]: *** [src/lib/despotify/libinput_a-DespotifyUtils.o] Error 1 make[1]: Leaving directory `/root/mpd' make: *** [all] Error 2
could somebody help me solve this situation? thx a lot.

Same problem for me. Thus I disabled spotifiy in the compilation options. Then the compilation succeeded.

hi, lelama.
thx for your reply. but, i’m not familiar with linux. would you tell me how to do this, please?

Hi fortunia,

To disable spotify:
./configure --enable-despotify=no

To look at all the possible options:
./configure --help

I would be nice if someone could write a complete and actual step-by-step tutorial on how to update MPD!

THX

Harry

thx a lot!
i tried to input the command as: “./configure --disable-despotiy”, and the linux didn’t recognize to that… :blush:
the information you gave really gonna help.
i’ll try it, thx again. :smiley:

i’ll try to disable the despotify function to compile the mpd with the newest version in a few days.
if i succeed, i’ll post how i have done it here.
so, wish me luck. :laughing:

ok, i succeeded to compile the mpd with a new version on volumio.
…but, i failed to run it on the current machine with volumio web UI. :confused:
i’ll try it again to figure out the problem.
however, i copy the new mpd file that i compiled to another copy of volumio in the different SD card, and it works fine.
here is my compiled mpd with soxr resampler lib, if you don’t want to compile the mpd yourself, you can use mine:

soxr can make volumio more effective on output hi-res music.
i don’t know why, but it also let volumio support playing ape file over upnp network.

however, if you want to compile mpd yourself, here is my record with updating the MPD of volumio.
i know nothing about programming, so it may not be a correct manual.
just take it for a reference.
i would appreciate if someone can fix it to let me know where i did it wrong or a better way on any step of this process.

if you had a problem to get the mpd start with error message like this: “bind to ‘0.0.0.0:6600’ failed: Address already in use”
you can change the bind_to_address in /etc/mpd.conf to “127.0.0.1” to fix it.

i lost to post a line at the last step, nobody failed to get start mpd after compiling? :blush:

sudo cp /usr/local/bin/mpd /usr/bin/mpd

i also find the problem why the mpd that i compiled could not get start on the current machine. because i’m using hifiberry digi+ for outputting the digital signal. but, the hifiberry product have to fix settings of “/boot/config.txt” while updating to the linux kernel 3.18.x. here is the information:

hifiberry.com/guides/config … ux-3-18-x/