1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

MPD 0.18.5 compilation error help...

Discussion in 'Tomato Firmware' started by leandroong, Dec 4, 2013.

  1. leandroong

    leandroong Addicted to LI Member

    I'm done with dependecies compilation. Got this error
    Any suggestion?
     
  2. leandroong

    leandroong Addicted to LI Member

    examing signalfd.h :91:19, reveal as follow:
    note: error: expected initializer before 'throw'
     
  3. leandroong

    leandroong Addicted to LI Member

  4. koitsu

    koitsu Network Guru Member

    This looks to be a difference between uClibc and glibc (not to be confused with glib, something completely separate/unrelated). Author of mpd should consider working out the complexity in his code officially. What has the mpd author had to say about this predicament?
     
  5. leandroong

    leandroong Addicted to LI Member

    managed to resume or bypass the problem by editing to:
    another issue:
    In file included from src/input/MmsInputPlugin.cxx:28:0:
    /home/leandroong/openwrt/openwrt_trunk/staging_dir/target-mipsel-linux-gnu/opt/include/libmms/mmsx.h:58:44: error: expected ',' or '...' before 'this'
     
  6. leandroong

    leandroong Addicted to LI Member

    Last edited: Dec 4, 2013
  7. leandroong

    leandroong Addicted to LI Member

    compiling w/out "--enable-mms"

    same result:
     
    Last edited: Dec 4, 2013
  8. leandroong

    leandroong Addicted to LI Member

    Last edited: Dec 4, 2013
  9. leandroong

    leandroong Addicted to LI Member

    Strange, after updating libmms to 0.6.2, compilation error yields
    reference: http://git.musicpd.org/cgit/master/mpd.git/commit/?id=5c48d3fbba0c7f7e7dbec7d2409938a57331ff11
     
    Last edited: Dec 4, 2013
  10. ryzhov_al

    ryzhov_al Networkin' Nut Member

    No way. The last mpd requires newer glib2 which can't be upgraded due to (too old) kernel 2.6.22.
     
  11. leandroong

    leandroong Addicted to LI Member

  12. leandroong

    leandroong Addicted to LI Member

    i'm using latest glib2, no issue there. There is changes in patch, will try to apply
     
  13. leandroong

    leandroong Addicted to LI Member

    Re-compiling again after applying above patches, using glib2 2.37, gives new error:
     
  14. leandroong

    leandroong Addicted to LI Member

    Looks like source code bug.
    Error: src/system/EPollFD.cxx:24:1: error: 'PollGroup' does not name a type
     
  15. leandroong

    leandroong Addicted to LI Member

    I was told by the administrator of MPD, after examining my compilation result that the problem is due to
    How should this be handle?

    url: http://bugs.musicpd.org/view.php?id=3894#bugnotes
     
  16. leandroong

    leandroong Addicted to LI Member

  17. leandroong

    leandroong Addicted to LI Member

    new error
     
  18. lancethepants

    lancethepants Network Guru Member

    I managed to get something to compile. I just did what seemed to be the minimum amount of libraries to get it to go.
    Looks like there are a host of other possible libraries and probably functionality that can be added.

    I've uploaded the static binary to http://lancethepants.com/files
    The binary seems functional. Running --help and -V gives some output. I can't say anything about the actual functionatity though. You will have to test it.

    Below is the script I made to compile. I had to patch the toolchain signalfd.h file as mentioned above.

    Code:
    #!/bin/bash
    
    set -e
    set -x
    
    mkdir ~/mpd && cd ~/mpd
    
    BASE=`pwd`
    SRC=$BASE/src
    WGET="wget --prefer-family=IPv4"
    DEST=$BASE/opt
    LDFLAGS="-L$DEST/lib -Wl,--gc-sections"
    CPPFLAGS="-I$DEST/include -I$DEST/include/ncurses"
    CFLAGS="-mtune=mips32 -mips32 -ffunction-sections -fdata-sections -muclibc"
    CXXFLAGS=$CFLAGS
    CONFIGURE="./configure --prefix=/opt --host=mipsel-linux"
    MAKE="make -j`nproc`"
    
    mkdir -p $SRC
    
    ######## ####################################################################
    # ZLIB # ####################################################################
    ######## ####################################################################
    
    mkdir $SRC/zlib && cd $SRC/zlib
    $WGET http://zlib.net/zlib-1.2.8.tar.gz
    tar zxvf zlib-1.2.8.tar.gz
    cd zlib-1.2.8
    
    LDFLAGS=$LDFLAGS \
    CPPFLAGS=$CPPFLAGS \
    CFLAGS=$CFLAGS \
    CXXFLAGS=$CXXFLAGS \
    CROSS_PREFIX=mipsel-linux- \
    ./configure \
    --prefix=/opt
    
    $MAKE
    make install DESTDIR=$BASE
    
    ########### #################################################################
    # OPENSSL # #################################################################
    ########### #################################################################
    
    mkdir -p $SRC/openssl && cd $SRC/openssl
    $WGET http://www.openssl.org/source/openssl-1.0.1e.tar.gz
    tar zxvf openssl-1.0.1e.tar.gz
    cd openssl-1.0.1e
    
    cat << "EOF" > openssl.patch
    --- Configure_orig      2013-11-19 11:32:38.755265691 -0700
    +++ Configure   2013-11-19 11:31:49.749650839 -0700
    @@ -402,6 +402,7 @@ my %table=(
    "linux-alpha+bwx-gcc","gcc:-O3 -DL_ENDIAN -DTERMIO::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_RISC1 DES_UNROLL:${alpha_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
    "linux-alpha-ccc","ccc:-fast -readonly_strings -DL_ENDIAN -DTERMIO::-D_REENTRANT:::SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_PTR DES_RISC1 DES_UNROLL:${alpha_asm}",
    "linux-alpha+bwx-ccc","ccc:-fast -readonly_strings -DL_ENDIAN -DTERMIO::-D_REENTRANT:::SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_INT DES_PTR DES_RISC1 DES_UNROLL:${alpha_asm}",
    +"linux-mipsel", "gcc:-DL_ENDIAN -DTERMIO -O3 -mtune=mips32 -mips32 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${mips32_asm}:o32:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
    
    # Android: linux-* but without -DTERMIO and pointers to headers and libs.
    "android","gcc:-mandroid -I\$(ANDROID_DEV)/include -B\$(ANDROID_DEV)/lib -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
    EOF
    
    patch < openssl.patch
    
    ./Configure linux-mipsel \
    -ffunction-sections -fdata-sections  -Wl,--gc-sections \
    --prefix=/opt shared no-zlib
    
    make CC=mipsel-linux-gcc AR="mipsel-linux-ar r" RANLIB=mipsel-linux-ranlib
    make install CC=mipsel-linux-gcc AR="mipsel-linux-ar r" RANLIB=mipsel-linux-ranlib INSTALLTOP=$DEST OPENSSLDIR=$DEST/ssl
    
    ############ ################################################################
    # LIBICONV # ################################################################
    ############ ################################################################
    
    mkdir $SRC/iconv && cd $SRC/iconv
    $WGET http://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.14.tar.gz
    tar zxvf libiconv-1.14.tar.gz
    cd libiconv-1.14
    
    LDFLAGS=$LDFLAGS \
    CPPFLAGS=$CPPFLAGS \
    CFLAGS=$CFLAGS \
    CXXFLAGS=$CXXFLAGS \
    $CONFIGURE \
    --enable-static
    
    $MAKE
    make install DESTDIR=$BASE
    
    ########### #################################################################
    # GETTEXT # #################################################################
    ########### #################################################################
    
    mkdir $SRC/gettext && cd $SRC/gettext
    $WGET http://ftp.gnu.org/gnu/gettext/gettext-0.18.3.1.tar.gz
    tar zxvf gettext-0.18.3.1.tar.gz
    cd gettext-0.18.3.1
    
    $WGET https://raw.github.com/lancethepants/tomatoware/master/patches/spawn.patch
    patch -p1 < spawn.patch
    
    LDFLAGS=$LDFLAGS \
    CPPFLAGS=$CPPFLAGS \
    CFLAGS=$CFLAGS \
    CXXFLAGS=$CXXFLAGS \
    $CONFIGURE \
    --enable-static \
    --enable-shared
    
    $MAKE
    make install DESTDIR=$BASE
    
    sed -i 's,\/opt\/lib\/libiconv.la,'"$DEST"'\/lib\/libiconv.la,g' \
    $DEST/lib/libintl.la
    
    ########## ##################################################################
    # LIBFFI # ##################################################################
    ########## ##################################################################
    
    mkdir $SRC/libffi && cd $SRC/libffi
    $WGET http://www.mirrorservice.org/sites/sourceware.org/pub/libffi/libffi-3.0.13.tar.gz
    tar zxvf libffi-3.0.13.tar.gz
    cd libffi-3.0.13
    
    LDFLAGS=$LDFLAGS \
    CPPFLAGS=$CPPFLAGS \
    CFLAGS=$CFLAGS \
    CXXFLAGS=$CXXFLAGS \
    $CONFIGURE
    
    $MAKE
    make install DESTDIR=$BASE
    
    cp -r $DEST/lib/libffi-3.0.13/include $DEST
    
    ######## ####################################################################
    # GLIB2 # ####################################################################
    ######## ####################################################################
    
    export PKG_CONFIG_LIBDIR=$DEST/lib/pkgconfig
    
    mkdir $SRC/glib && cd $SRC/glib
    $WGET ftp://ftp.gnome.org/pub/gnome/sources/glib/2.38/glib-2.38.2.tar.xz
    tar xvJf glib-2.38.2.tar.xz
    cd glib-2.38.2
    
    LDFLAGS=$LDFLAGS \
    CPPFLAGS=$CPPFLAGS \
    CFLAGS=$CFLAGS \
    CXXFLAGS=$CXXFLAGS \
    ZLIB_CFLAGS=$CPPFLAGS \
    ZLIB_LIBS=$LDFLAGS \
    LIBFFI_CFLAGS=$CPPFLAGS \
    LIBFFI_LIBS=$LDFLAGS \
    $CONFIGURE \
    --with-libiconv=gnu  \
    --enable-static \
    glib_cv_stack_grows=no \
    glib_cv_uscore=no \
    ac_cv_func_posix_getpwuid_r=yes \
    ac_cv_func_posix_getgrgid_r=yes
    
    $MAKE LIBS="-lz -lffi -lintl"
    make install DESTDIR=$BASE
    
    unset PKG_CONFIG_LIBDIR
    
    ################# ###########################################################
    # LIBSAMPLERATE # ###########################################################
    ################# ###########################################################
    
    mkdir $SRC/libsamplerate && cd $SRC/libsamplerate
    $WGET http://www.mega-nerd.com/SRC/libsamplerate-0.1.8.tar.gz
    tar zxvf libsamplerate-0.1.8.tar.gz
    cd libsamplerate-0.1.8
    
    LDFLAGS=$LDFLAGS \
    CPPFLAGS=$CPPFLAGS \
    CFLAGS=$CFLAGS \
    CXXFLAGS=$CXXFLAGS \
    $CONFIGURE
    
    $MAKE
    make install DESTDIR=$BASE
    
    ########## ##################################################################
    # LIBOGG # ##################################################################
    ########## ##################################################################
    
    mkdir $SRC/libogg && cd $SRC/libogg
    $WGET http://downloads.xiph.org/releases/ogg/libogg-1.3.1.tar.gz
    tar zxvf libogg-1.3.1.tar.gz
    cd libogg-1.3.1
    
    LDFLAGS=$LDFLAGS \
    CPPFLAGS=$CPPFLAGS \
    CFLAGS=$CFLAGS \
    CXXFLAGS=$CXXFLAGS \
    $CONFIGURE
    
    $MAKE
    make install DESTDIR=$BASE
    
    ############# ###############################################################
    # LIBVORBIS # ###############################################################
    ############# ###############################################################
    
    mkdir $SRC/libvorbis && cd $SRC/libvorbis
    $WGET http://downloads.xiph.org/releases/vorbis/libvorbis-1.3.3.tar.gz
    tar zxvf libvorbis-1.3.3.tar.gz
    cd libvorbis-1.3.3
    
    LDFLAGS=$LDFLAGS \
    CPPFLAGS=$CPPFLAGS \
    CFLAGS=$CFLAGS \
    CXXFLAGS=$CXXFLAGS \
    $CONFIGURE
    
    $MAKE
    make install DESTDIR=$BASE
    
    ########## ##################################################################
    # SQLITE # ##################################################################
    ########## ##################################################################
    
    mkdir $SRC/sqlite && cd $SRC/sqlite
    $WGET http://www.sqlite.org/2013/sqlite-autoconf-3080100.tar.gz
    tar zxvf sqlite-autoconf-3080100.tar.gz
    cd sqlite-autoconf-3080100
    
    LDFLAGS=$LDFLAGS \
    CPPFLAGS=$CPPFLAGS \
    CFLAGS=$CFLAGS \
    CXXFLAGS=$CXXFLAGS \
    $CONFIGURE
    
    $MAKE
    make install DESTDIR=$BASE
    
    ######## ####################################################################
    # CURL # ####################################################################
    ######## ####################################################################
    
    mkdir $SRC/curl && cd $SRC/curl
    $WGET http://curl.haxx.se/download/curl-7.33.0.tar.gz
    tar zxvf curl-7.33.0.tar.gz
    cd curl-7.33.0
    
    $WGET https://raw.github.com/lancethepants/tomatoware/master/patches/curl.patch
    patch < curl.patch
    
    LDFLAGS=$LDFLAGS \
    CPPFLAGS=$CPPFLAGS \
    CFLAGS=$CFLAGS \
    CXXFLAGS=$CXXFLAGS \
    $CONFIGURE \
    --with-ca-path=$PREFIX/ssl/certs
    
    $MAKE LIBS="-lssl -lcrypto"
    make install DESTDIR=$BASE
    
    ####### #####################################################################
    # MPD # #####################################################################
    ####### #####################################################################
    
    mkdir $SRC/mpd && cd $SRC/mpd
    $WGET http://www.musicpd.org/download/mpd/stable/mpd-0.18.5.tar.gz
    tar zxvf mpd-0.18.5.tar.gz
    cd mpd-0.18.5
    
    cat << "EOF" > mpd.patch
    ver 0.18.5 (2013/11/23)
    diff --git a/src/mixer/AlsaMixerPlugin.cxx b/src/mixer/AlsaMixerPlugin.cxx
    index 7defdd7..b81ca42 100644
    --- a/src/mixer/AlsaMixerPlugin.cxx
    +++ b/src/mixer/AlsaMixerPlugin.cxx
    @@ -24,6 +24,7 @@
    #include "Main.hxx"
    #include "event/MultiSocketMonitor.hxx"
    #include "event/Loop.hxx"
    +#include "event/Call.hxx"
    #include "util/ASCII.hxx"
    #include "util/ReusableArray.hxx"
    #include "util/Error.hxx"
    @@ -46,7 +47,7 @@ class AlsaMixerMonitor final : private MultiSocketMonitor {
    public:
        AlsaMixerMonitor(EventLoop &_loop, snd_mixer_t *_mixer)
            :MultiSocketMonitor(_loop), mixer(_mixer) {
    -        _loop.AddCall([this](){ InvalidateSockets(); });
    +        BlockingCall(_loop, [this](){ InvalidateSockets(); });
        }
    
    private:
    --
    cgit v0.9.1-27-gd5a4
    EOF
    
    patch -fp1 < mpd.patch
    
    LDFLAGS=$LDFLAGS \
    CPPFLAGS=$CPPFLAGS \
    CFLAGS="$CFLAGS -fpermissive" \
    CXXFLAGS="$CXXFLAGS -fpermissive" \
    $CONFIGURE
    
    $MAKE LIBS="-static -lssl -lcrypto -lintl -lz -liconv -lffi -ldl"
    
    I had to throw in -fpermissive in my LDFLAGS for mpd, which may be frowned upon, but had to in order to get it to compile.
     
  19. leandroong

    leandroong Addicted to LI Member

    @lancethepants, thanks. Is that an entware ipk, why no extension?
    I made another compilation, lowering glib2 version from 2.37 to current repo version 2.21. Get new compilation error and submitted to MPD administrator for analysis again.
    Here is what i reported, http://bugs.musicpd.org/view.php?id=3902
     
    Last edited: Dec 13, 2013
  20. lancethepants

    lancethepants Network Guru Member

    No ipk, just the binary. It's static, so all libraries have been compiled in.
     
    Last edited: Dec 13, 2013
  21. leandroong

    leandroong Addicted to LI Member

    @lancethepants, here is what i did
    1.) copy your mpd binary to /opt/test/ folder
    2. ) Initialization, "mpd /opt/etc/mpd.conf
    3. load playlist, "mpc load radio-chi-kor"
    4. test play song, "mpc add http://184.95.62.170:8068"
    Summary: not working
     
  22. leandroong

    leandroong Addicted to LI Member

    I'm ok with current version, 0.17.5. Just trying to update to latest version expoerimentally..
     
  23. lancethepants

    lancethepants Network Guru Member

    I compiled with the minimum amount of libraries. Perhaps whatever you are doing requires for functionality that would be included with more libraries.

    Entware has a bunch more. Maybe if I find some time I'll try with more
    Code:
            libFLAC.so.8 => /opt/lib/libFLAC.so.8 (0x2aac0000)
            libvorbisfile.so.3 => /opt/lib/libvorbisfile.so.3 (0x2ab18000)
            libvorbis.so.0 => /opt/lib/libvorbis.so.0 (0x2ab30000)
            libm.so.0 => /opt/lib/libm.so.0 (0x2ab6a000)
            libogg.so.0 => /opt/lib/libogg.so.0 (0x2ab86000)
            libsndfile.so.1 => /opt/lib/libsndfile.so.1 (0x2ab9b000)
            libaudiofile.so.0 => /opt/lib/libaudiofile.so.0 (0x2ac18000)
            libmad.so.0 => /opt/lib/libmad.so.0 (0x2ac4c000)
            libavformat.so.54 => /opt/lib/libavformat.so.54 (0x2ac72000)
            libavcodec.so.54 => /opt/lib/libavcodec.so.54 (0x2ad8a000)
            libavutil.so.51 => /opt/lib/libavutil.so.51 (0x2b6ad000)
            libfaad.so.2 => /opt/lib/libfaad.so.2 (0x2b6d9000)
            libcurl.so.4 => /opt/lib/libcurl.so.4 (0x2b729000)
            libsoup-2.4.so.1 => /opt/lib/libsoup-2.4.so.1 (0x2b785000)
            libgio-2.0.so.0 => /opt/lib/libgio-2.0.so.0 (0x2b7e6000)
            libgobject-2.0.so.0 => /opt/lib/libgobject-2.0.so.0 (0x2b8ca000)
            libgthread-2.0.so.0 => /opt/lib/libgthread-2.0.so.0 (0x2b916000)
            libgmodule-2.0.so.0 => /opt/lib/libgmodule-2.0.so.0 (0x2b92a000)
            libglib-2.0.so.0 => /opt/lib/libglib-2.0.so.0 (0x2b93d000)
            libintl.so.8 => /opt/lib/libintl.so.8 (0x2ba3c000)
            libiconv.so.2 => /opt/lib/libiconv.so.2 (0x2ba55000)
            libmms.so.0 => /opt/lib/libmms.so.0 (0x2bb48000)
            libid3tag.so.0 => /opt/lib/libid3tag.so.0 (0x2bb67000)
            libz.so.1 => /opt/lib/libz.so.1 (0x2bb8c000)
            libasound.so.2 => /opt/lib/libasound.so.2 (0x2bbb0000)
            libshout.so.3 => /opt/lib/libshout.so.3 (0x2bca3000)
            libtheora.so.0 => /opt/lib/libtheora.so.0 (0x2bcc3000)
            libspeex.so.1 => /opt/lib/libspeex.so.1 (0x2bd1d000)
            libvorbisenc.so.2 => /opt/lib/libvorbisenc.so.2 (0x2bd43000)
            libgcc_s.so.1 => /opt/lib/libgcc_s.so.1 (0x2bec0000)
            libpthread.so.0 => /opt/lib/libpthread.so.0 (0x2bee1000)
            libc.so.0 => /opt/lib/libc.so.0 (0x2bf06000)
            libbz2.so.1.0 => /opt/lib/libbz2.so.1.0 (0x2bfb6000)
            libssl.so.1.0.0 => /opt/lib/libssl.so.1.0.0 (0x2bfd8000)
            libcrypto.so.1.0.0 => /opt/lib/libcrypto.so.1.0.0 (0x2c03b000)
            libxml2.so.2 => not found
            libgnutls.so.26 => not found
            libgcrypt.so.11 => not found
            libgpg-error.so.0 => not found
            libdl.so.0 => /opt/lib/libdl.so.0 (0x2c1a4000)
            librt.so.0 => /opt/lib/librt.so.0 (0x2c1b7000)
            libvorbisidec.so.1 => /opt/lib/libvorbisidec.so.1 (0x2c1cb000)
            ld-uClibc.so.0 => /opt/lib/ld-uClibc.so.0 (0x2aaa8000)
    
    
    Looks like some broken dependencies in entware's installation
    Or it could be my use of the up-to-date glib.
     
  24. leandroong

    leandroong Addicted to LI Member

    For it to work, it has to acknowledge the mpd.conf file. The error I mention
    pertains to mpd.conf error on line 216.
    Attachment, is MPD entware makefile and mpd.conf that I'm using.
     

    Attached Files:

  25. leandroong

    leandroong Addicted to LI Member

    For it to work it has to accept configuration first. Normally run as "mpd mpd.conf". Rest is control by mpc client. All required dependencies are in Makefile.txt. 2 binary files being generated mpd-full and mpd-mini. For router, mpd-full is use.
     
  26. leandroong

    leandroong Addicted to LI Member

    Conclusion, MPD 0.18.5 cannot be link to due to required glib2 version minimum of 2.28.
    Note: This is entware toolchain limitation
     
    Last edited: Dec 14, 2013
  27. koitsu

    koitsu Network Guru Member

    Please file a ticket with the Entware folks to have the glib package upgraded from 2.26.1-3 to 2.28. They will certainly do it, along with rebuilding all the packages which depend on that.

    Note to readers: we're talking about glib, not glibc. Two different/unrelated things. :)
     
  28. leandroong

    leandroong Addicted to LI Member

    No need because @ryzhov_al knew already the problem.
    I ask MPD administrator,
    Administrator response,
     
  29. lancethepants

    lancethepants Network Guru Member

    I've compiled another binary with more features added. It should match pretty close to the capabilities of entware's mpd. You can run `mpd -V` and compare. A couple things have been depcrcated in this version of mpd, like last.fm and libsoup. I'm still working on adding a few more libraries and features, such as aac decoding. See if this one is feature rich enough for your use, and test overall whether it works.
    I've compressed it with upx to save on size, so it does take a second or two to run while it's extracting itself.
     
  30. leandroong

    leandroong Addicted to LI Member

    Still error.
    1. mpd -V
    2. mpd mpd.conf
    Note: make sure that you use glib2 version > than 2.80
     
  31. leandroong

    leandroong Addicted to LI Member

    It would be great if you can make this binary successful. I wonder if you are using latest libaudiofile, 0.3.6 ?
    I can help in compiling and testing ....
     
  32. lancethepants

    lancethepants Network Guru Member

    Just running `mpd -V` gives you and error?
    I get the following.

    Code:
    root@RT-BCAEC5C3073A:~# ./mpd -V
    Music Player Daemon 0.18.5
    
    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
    [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
    [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 pipe alsa oss httpd recorder
    
    Encoder plugins:
    null vorbis wave flac
    
    Archive plugins:
    [bz2] bz2
    
    Input plugins:
    file archive curl ffmpeg mms
    
    Playlist plugins:
    extm3u m3u xspf pls asx rss cue cue
    
    Protocols:
    file:// http:// https:// mms:// mmsh:// mmst:// mmsu:// gopher:// rtp:// rtsp:// rtmp:// rtmpt:// rtmps://
    
    
    What router are you running on?
    I'm using the latest glib.

    Edit: Also, when running against your mpd.conf, it's looking for some folders you must have, like playlists that I don't have on my router.

    It could be a problem with the Flags I'm using when compiling. Not sure if maybe your firmware is 2.4 kernel.

    Oh, and I'm using the latest libaudiofile too.
     
  33. leandroong

    leandroong Addicted to LI Member

    router: ZTE ZXV10 H618B, Tomato Firmware 1.28.0000 MIPSR1-115 K26 USB AIO

    following your syntax:
    1. run on external usb, located on "/opt/test"
    2. run on /tmp/home/root
    +++++
     
  34. leandroong

    leandroong Addicted to LI Member

    Main difference in your testing, I have USB audio connected.
     
  35. lancethepants

    lancethepants Network Guru Member

    Ah, a MIPSR1 router, that's what I was wondering. I use a MIPSR2 router, and compile specifically for them. I will try and recompile.

    True, I don't have a USB audio device plugged in, but at least the binary gives coherent output for me. I think it might work once I recompile.

    I used to have an audio dongle, but I just gave it away instead of having to fix the audio on someone's computer :)
     
  36. leandroong

    leandroong Addicted to LI Member

    MPD version works
    1. rename mpd to mpd_18.5
    2. run ./mpd_18.5 -V
     
  37. lancethepants

    lancethepants Network Guru Member

    Interesting. Recompile will take a bit. Just curious, in the mean time, what do you use MPD for? Streaming from internet? or local playlist?
     
  38. leandroong

    leandroong Addicted to LI Member

    No rush. Primary usage, prevent my DSL ISP from disconnecting my internet.
    I have internet playlist of chinese, korean and japanese in one filename called radio-chi-kor-jap.m3u. Using scheduler, I check every minute of non playing and will re-run mpd if dead. Another scheduler, run every 30minutes, that will change to another stations.
     
  39. koitsu

    koitsu Network Guru Member

    Couldn't you accomplish the exact same thing by simply making a small script that does a wget of some HTTPS URL some place online (ex. https://www.google.com/ )? The HTTPS part is important (if the ISP does layer 7 filtering, etc.).

    I don't see why mpd has to be involved at all if all you're intending to do is "keep your connection up".
     
  40. leandroong

    leandroong Addicted to LI Member

    In the living room, I have another router that run MPD on startup to play local saved playlist.
     
  41. leandroong

    leandroong Addicted to LI Member

    True. But, I like listening to music while surfing also to accompany me.
     
  42. lancethepants

    lancethepants Network Guru Member

    Alright, I've uploaded another binary, labeled MIPSR1, which should hopefully be friendly with your router.
     
  43. leandroong

    leandroong Addicted to LI Member

    1. I notice that it takes a while to run, better to have no compression.
    2. still error
     
  44. leandroong

    leandroong Addicted to LI Member

    Tried changing port# to 6700, same error, "Illegal Instruction". You are almost there ....
     
    Last edited: Dec 16, 2013
  45. leandroong

    leandroong Addicted to LI Member

    I think bash script need to consider this on existing makefile
    Code:
    define Package/mpd/Default
      SECTION:=sound
      CATEGORY:=Sound
      TITLE:=Music Player Daemon
      URL:=http://www.musicpd.org/
      DEPENDS:= +glib2 +libcurl +libpthread \
       +libflac +BUILD_PATENTED:libmad +libvorbisidec
    endef
    
    define Package/mpd/Default/description
    Music Player Daemon (MPD) is a flexible, powerful, server-side
    application for playing music. It is typically controlled over a
    network using one of it's many clients including mpc (console),
    gmpc (gnome), phpmp (php), etc...
    endef
    
    define Package/mpd-full
    $(call Package/mpd/Default)
      TITLE+= (full)
      DEPENDS+= \
       +AUDIO_SUPPORT:alsa-lib \
       +libaudiofile +BUILD_PATENTED:libfaad2 +libffmpeg +libid3tag \
       +libmms +libogg +libshout +libsndfile +libvorbis
      PROVIDES:=mpd
      VARIANT:=full
    endef
    
    define Package/mpd-full/description
    $(call Package/mpd/Default/description)
    .
    This package contains a full-blown Music Player Daemon.
    endef
    
    define Package/mpd-full/conffiles
    /etc/avahi/services/mpd.service
    /etc/mpd.conf
    endef
    
    
    define Package/mpd-mini
    $(call Package/mpd/Default)
      TITLE+= (mini)
      PROVIDES:=mpd
      VARIANT:=mini
    endef
    
    define Package/mpd-mini/description
    $(call Package/mpd/Default/description)
    .
    This package contains a minimal Music Player Daemon, with support for
    only Flac, MP3 & OGG media types & only file: & http: protocols.
    endef
    
    define Package/mpd-mini/conffiles
    /etc/mpd.conf
    endef
    
    
    CONFIGURE_ARGS += \
       $(call autoconf_bool,CONFIG_IPV6,ipv6) \
       --disable-debug \
       --disable-documentation \
       --disable-gprof \
       --disable-test \
       --disable-werror \
       \
       --disable-ao \
       --disable-bzip2 \
       --disable-cue \
       --disable-ffado \
       --disable-fluidsynth \
       --disable-gme \
       --disable-inotify \
       --disable-iso9660 \
       --disable-jack \
       --disable-lame-encoder \
       --disable-libwrap \
       --disable-lsr \
       --disable-mikmod \
       --disable-modplug \
       --disable-mpc \
       --disable-mpg123 \
       --disable-mvp \
       --disable-openal \
       --disable-pulse \
       --disable-sidplay \
       --disable-solaris-output \
       --disable-sqlite \
       --disable-twolame-encoder \
       --disable-wave-encoder \
       --disable-wavpack \
       --disable-wildmidi \
       --disable-zzip \
       --with-zeroconf=no \
       \
       --enable-curl \
       --enable-flac \
       --enable-httpd-output \
       $(call autoconf_bool,CONFIG_BUILD_PATENTED,mad) \
       $(call autoconf_bool,CONFIG_AUDIO_SUPPORT,oss) \
       --enable-tcp \
       --enable-un \
    
    CONFIGURE_VARS += \
       FLAC_CFLAGS="$(TARGET_CFLAGS) -I$(STAGING_DIR)/opt/include/FLAC" \
       FLAC_LIBS="$(TARGET_LDFLAGS) -lFLAC" \
       $(if $(CONFIG_BUILD_PATENTED),MAD_CFLAGS="$(TARGET_CFLAGS)") \
       $(if $(CONFIG_BUILD_PATENTED),MAD_LIBS="$(TARGET_LDFLAGS) -lmad") \
    
    TARGET_CFLAGS += -std=gnu99
    TARGET_LDFLAGS += -Wl,-rpath-link=$(STAGING_DIR)/opt/lib
    
    # use gcc instead of g++ to avoid unnecessary linking against libstdc++
      TARGET_CXX:=$(TARGET_CC)
    
    ifeq ($(BUILD_VARIANT),full)
    
      CONFIGURE_ARGS += \
       $(call autoconf_bool,CONFIG_BUILD_PATENTED,aac) \
       $(call autoconf_bool,CONFIG_AUDIO_SUPPORT,alsa) \
       --enable-audiofile \
       --enable-fifo \
       --enable-ffmpeg \
       --enable-id3 \
       --enable-lastfm \
       --enable-mms \
       --enable-oggflac \
       --enable-pipe-output \
       --enable-recorder-output \
       --enable-shout \
       --enable-sndfile \
       --enable-vorbis \
       --enable-vorbis-encoder \
       --with-faad="$(STAGING_DIR)/opt" \
       --with-tremor=no \
    
    endif
    
    ifeq ($(BUILD_VARIANT),mini)
    
      # oggflac is not compatible with tremor
      CONFIGURE_ARGS += \
       --disable-aac \
       --disable-alsa \
       --disable-audiofile \
       --disable-fifo \
       --disable-ffmpeg \
       --disable-id3 \
       --disable-lastfm \
       --disable-mms \
       --disable-oggflac \
       --disable-pipe-output \
       --disable-recorder-output \
       --disable-shout \
       --disable-sndfile \
       --disable-vorbis \
       --disable-vorbis-encoder \
       --with-tremor=yes \
    
    endif
    
    define Package/mpd/install
       $(INSTALL_DIR) $(1)/opt/bin
       $(CP) $(PKG_INSTALL_DIR)/opt/bin/mpd $(1)/opt/bin/
       $(INSTALL_DIR) $(1)/etc
       $(CP) $(PKG_BUILD_DIR)/doc/mpdconf.example $(1)/etc/mpd.conf
       $(INSTALL_DIR) $(1)/etc/init.d
       $(INSTALL_BIN) ./files/mpd.init $(1)/etc/init.d/mpd
    endef
    
    define Package/mpd-full/install
    $(call Package/mpd/install,$1)
       $(INSTALL_DIR) $(1)/etc/avahi/services
       $(INSTALL_DATA) ./files/mpd.service $(1)/etc/avahi/services/
    endef
    
    define Package/mpd-mini/install
    $(call Package/mpd/install,$1)
    endef
    
    note: 3 packages being generated but I can see only 2, mpd-full and mpd-mini. router needs mpd-full
     
    Last edited: Dec 16, 2013

Share This Page