Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to compile mpdas on OSMC #47

Closed
massdosage opened this issue Sep 28, 2017 · 3 comments
Closed

Unable to compile mpdas on OSMC #47

massdosage opened this issue Sep 28, 2017 · 3 comments

Comments

@massdosage
Copy link
Contributor

I'm trying to set up mpdas on OSMC on a Raspberry Pi to scrobble songs from MPD installed locally. I've downloaded the 0.4.4 source code and tried to run "make" on it. After installing various missing libraries it's now failing compilation with the following error:

osmc@osmc:~/temp/mpdas-0.4.4$ make
g++ pkg-config --cflags libmpdclient libcurl -DCONFDIR=""/usr/local/etc"" -DVERSION=""0.4.4"" -c -o main.o main.cpp
g++ pkg-config --cflags libmpdclient libcurl -DCONFDIR=""/usr/local/etc"" -DVERSION=""0.4.4"" -c -o md5.o md5.cpp
g++ pkg-config --cflags libmpdclient libcurl -DCONFDIR=""/usr/local/etc"" -DVERSION=""0.4.4"" -c -o utils.o utils.cpp
g++ pkg-config --cflags libmpdclient libcurl -DCONFDIR=""/usr/local/etc"" -DVERSION=""0.4.4"" -c -o mpd.o mpd.cpp
g++ pkg-config --cflags libmpdclient libcurl -DCONFDIR=""/usr/local/etc"" -DVERSION=""0.4.4"" -c -o audioscrobbler.o audioscrobbler.cpp
g++ pkg-config --cflags libmpdclient libcurl -DCONFDIR=""/usr/local/etc"" -DVERSION=""0.4.4"" -c -o cache.o cache.cpp
g++ pkg-config --cflags libmpdclient libcurl -DCONFDIR=""/usr/local/etc"" -DVERSION=""0.4.4"" -c -o config.o config.cpp
config.cpp: In function ‘int IniHandler(void*, const char*, const char*, const char*)’:
config.cpp:11:33: error: ‘std::string’ has no member named ‘front’
if(val.length() >= 2 && val.front() == '"' && val.back() == '"') {
^
config.cpp:11:56: error: ‘std::string’ has no member named ‘back’
if(val.length() >= 2 && val.front() == '"' && val.back() == '"') {
^
Makefile:19: recipe for target 'config.o' failed

Any ideas? Hopefully I'm missing something simple.

@massdosage
Copy link
Contributor Author

I tried again using the code from master and this compiles fine. Perhaps time to cut a new release?

@hrkfdn
Copy link
Owner

hrkfdn commented Sep 29, 2017

Try the master branch. It has one more commit (compared to the latest release), which makes the codebase more compatible with older compilers.

@massdosage
Copy link
Contributor Author

Yeah, master works, thanks. Was just suggesting maybe doing a 0.4.5 release with this, but not too bothered as I'm fine working against master for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants