[Solved] update & compile MPD problem

Get help for Volumio here!

Ads helps Volumio remain Free and Open Source. Please consider donating to help us continue to serve you.

[Solved] update & compile MPD problem

Postby fortunia » Sun Jan 18 2015 09:29

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:
Code: Select all
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:
Code: Select all
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.
Last edited by fortunia on Sat Jan 31 2015 16:16, edited 1 time in total.
Random avatar
fortunia
Sunday DIYer
Sunday DIYer
 
Posts: 15
Joined: Wed Dec 24 2014 21:49

Ads helps Volumio remain Free and Open Source. Please consider donating to help us continue to serve you.


update & compile MPD problem

Postby lelama » Mon Jan 26 2015 11:35

Same problem for me. Thus I disabled spotifiy in the compilation options. Then the compilation succeeded.
Random avatar
lelama
Sunday DIYer
Sunday DIYer
 
Posts: 19
Joined: Thu Jan 08 2015 20:36


update & compile MPD problem

Postby fortunia » Mon Jan 26 2015 21:16

hi, lelama.
thx for your reply. but, i'm not familiar with linux. would you tell me how to do this, please?
lelama wrote:Same problem for me. Thus I disabled spotifiy in the compilation options. Then the compilation succeeded.
Random avatar
fortunia
Sunday DIYer
Sunday DIYer
 
Posts: 15
Joined: Wed Dec 24 2014 21:49


update & compile MPD problem

Postby lelama » Wed Jan 28 2015 10:13

Hi fortunia,

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

To look at all the possible options:
./configure --help
Random avatar
lelama
Sunday DIYer
Sunday DIYer
 
Posts: 19
Joined: Thu Jan 08 2015 20:36


update & compile MPD problem

Postby Buckler » Wed Jan 28 2015 16:33

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

THX

Harry
User avatar
Buckler
Serious Listener
Serious Listener
 
Posts: 64
Joined: Sun Sep 14 2014 08:34
Location: The Netherlands


update & compile MPD problem

Postby fortunia » Thu Jan 29 2015 19:31

thx a lot!
i tried to input the command as: "./configure --disable-despotiy", and the linux didn't recognize to that... :oops:
the information you gave really gonna help.
i'll try it, thx again. :D

lelama wrote:Hi fortunia,

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

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


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

THX

Harry


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. :lol:
Random avatar
fortunia
Sunday DIYer
Sunday DIYer
 
Posts: 15
Joined: Wed Dec 24 2014 21:49


update & compile MPD problem

Postby fortunia » Sat Jan 31 2015 15:53

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. :?
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:
https://dl.dropboxusercontent.com/u/10787749/software/Multi%20Media/mpd_with_soxr.7z
after downloaded, put the mpd to "/usr/bin", and put the two lib files to "/usr/lib".
chage the access levels of the mpd, libsoxr.so.0 and libgomp.so.1 :
Code: Select all
chmod +X "/usr/bin/mpd" "/usr/lib/libgomp.so.1" "/usr/lib/libsoxr.so.0"

then we have to edit the mpd.conf:
replace these lines:
Code: Select all
audio_output_format     "*:*:*"
samplerate_converter    "Best Sinc Interpolator/Medium Sinc Interpolator/Fastest Sinc Interpolator"

with these lines:
Code: Select all
audio_output_format     "192000:24:2" <= as your dac support.
samplerate_converter    "soxr"

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.
1. tweak the system.
Code: Select all
sudo raspi-config

choose option 3 to set the time zone.
setting the over-clock option if you need it. (recommand to set turbo during compiling)

2. update rpi:
Code: Select all
nano /etc/apt/sources.list

delete the first line:
Code: Select all
deb http://repo.volumio.org/apt/ jessie main contrib

do update:
Code: Select all
apt-get update
sudo rpi-update
sync
sudo reboot


3. change your partition size to install libraries:
Code: Select all
sudo fdisk /dev/mmcblk0
Command : d  (delete the partition won't delete the content, it's just a partition table update)
Partition number : 3
Command : n
Select : default
Partition number :  3
Partition start : default
Partition end : 5411967

the original partition end at the sector: 3411967. total size about 1.5GB. i give it 2GB more.
then active this setting:
Code: Select all
Command : w
sudo reboot
sudo resize2fs /dev/root


4. get the libraries to get ready for compiling (this will take a long while.) :
Code: Select all
sudo apt-get install build-essential automake autoconf libtool pkg-config libcurl4-openssl-dev intltool libxml2-dev libgtk2.0-dev libboost-all-dev flex bison gdb gcc git g++ bzip2  liblzma-dev cmake


5. to improve the mpd more effective, add the soxr resampler works with it:
http://sourceforge.net/projects/soxr/
upload it the root folder: "/root/", and extract it:
Code: Select all
http://sourceforge.net/projects/soxr/files/soxr-0.1.1-Source.tar.xz/stats/timeline

now let's install the soxr resampler:
Code: Select all
cd soxr-0.1.1-Source
./go
cd Release
sudo make install
sudo cp /usr/local/lib/libsoxr.so.0 /usr/lib


6. let's update the mpd:
Code: Select all
git clone git://git.musicpd.org/master/mpd.git
cd mpd
./autogen.sh
./configure ./configure --enable-despotify=no

at the end of this step, it will show all the function of new mpd supports like this:
Code: Select all
########### 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) (-Last.FM) (+Soundcloud)
        (+MMS)
##########################################

now let's compile it (this is another step to take a long time):
Code: Select all
make
sudo service mpd stop
make install

move the new mpd to the right place:
Code: Select all
sudo mv /usr/bin/mpd /usr/bin/mpd.old
sudo cp /usr/local/bin/mpd /usr/bin/mpd

check if the mpd is at the newest version
Code: Select all
mpd -V

now we have the mpd with newest version that we compiled.

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.
Random avatar
fortunia
Sunday DIYer
Sunday DIYer
 
Posts: 15
Joined: Wed Dec 24 2014 21:49


[Solved] update & compile MPD problem

Postby fortunia » Mon Feb 02 2015 18:47

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

Code: Select all
sudo cp /usr/local/bin/mpd /usr/bin/mpd
Random avatar
fortunia
Sunday DIYer
Sunday DIYer
 
Posts: 15
Joined: Wed Dec 24 2014 21:49


[Solved] update & compile MPD problem

Postby fortunia » Mon Feb 02 2015 19:07

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:

https://www.hifiberry.com/guides/config ... ux-3-18-x/
Random avatar
fortunia
Sunday DIYer
Sunday DIYer
 
Posts: 15
Joined: Wed Dec 24 2014 21:49


Return to Help

Who is online

Users browsing this forum: Google [Bot] and 2 guests