Since 18.6 mpd has support for libsoxr. This is better and more efficient re-sampling library for embedded systems. This is faster and smaller. I would do it by myself but is uses cmake I don't understand. The best option would be replacing libsamplerate with libsoxr or making them both available.
There shouldn't be a real need to understand cmake in order to make a package available in buildroot. Have you had a look at this part of the manual? http://buildroot.uclibc.org/downloads/manual/manual.html#adding-packages Buildroot has a 'cmake-package' infrastructure, which makes it easy to add packages that have cmake makefiles. If you can, implementing this yourself will create much bigger chances of the changes becoming available in buildroot, because other buildroot developers already have a lot of other work, so may not start on libsoxr. Thanks in advance...
(In reply to comment #1) > There shouldn't be a real need to understand cmake in order to make a package > available in buildroot. Have you had a look at this part of the manual? > http://buildroot.uclibc.org/downloads/manual/manual.html#adding-packages > > Buildroot has a 'cmake-package' infrastructure, which makes it easy to add > packages that have cmake makefiles. > > If you can, implementing this yourself will create much bigger chances of the > changes becoming available in buildroot, because other buildroot developers > already have a lot of other work, so may not start on libsoxr. > > Thanks in advance... Well, as I said that not trivial like packaging mpdcron,libmpdclient or ncmpcpp. This what I see: >> libsoxr 0.1.1 Patching >>> libsoxr 0.1.1 Configuring (cd /home/prezi/buildroot-2014.02/output/build/libsoxr-0.1.1/ && rm -f CMakeCache.txt && /home/prezi/buildroot-2014.02/output/host/usr/bin/cmake /home/prezi/buildroot-2014.02/output/build/libsoxr-0.1.1/ -DCMAKE_TOOLCHAIN_FILE="/home/prezi/buildroot-2014.02/output/host/usr/share/buildroot/toolchainfile.cmake" -DCMAKE_INSTALL_PREFIX="/usr" -DCMAKE_COLOR_MAKEFILE=OFF -DBUILD_SHARED_LIBS=ON -Wno-dev ) Re-run cmake no build system arguments -- The C compiler identification is GNU 4.7.3 -- Check for working C compiler: /home/prezi/buildroot-2014.02/output/host/usr/bin/i586-buildroot-linux-uclibc-gcc -- Check for working C compiler: /home/prezi/buildroot-2014.02/output/host/usr/bin/i586-buildroot-linux-uclibc-gcc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Looking for pow in m -- Looking for pow in m - found -- Try OpenMP C flag = [-fopenmp] -- Performing Test OpenMP_FLAG_DETECTED -- Performing Test OpenMP_FLAG_DETECTED - Success -- Found OpenMP: -fopenmp -- Try SIMD C flag = [ ] -- Performing Test SIMD_FLAG_DETECTED -- Performing Test SIMD_FLAG_DETECTED - Failed -- Try SIMD C flag = [/arch:SSE /fp:fast -D__SSE__] -- Performing Test SIMD_FLAG_DETECTED -- Performing Test SIMD_FLAG_DETECTED - Failed -- Try SIMD C flag = [-msse -mfpmath=sse] -- Performing Test SIMD_FLAG_DETECTED -- Performing Test SIMD_FLAG_DETECTED - Success -- Found SIMD: -msse -mfpmath=sse -- Looking for lrint -- Looking for lrint - found -- Looking for include file fenv.h -- Looking for include file fenv.h - not found -- Performing Test HAVE_WORDS_BIGENDIAN CMake Error: TRY_RUN() invoked in cross-compiling mode, please set the following cache variables appropriately: HAVE_WORDS_BIGENDIAN_EXITCODE (advanced) For details see /home/prezi/buildroot-2014.02/output/build/libsoxr-0.1.1/TryRunResults.cmake -- Performing Test HAVE_WORDS_BIGENDIAN - Failed -- Configuring incomplete, errors occurred! See also "/home/prezi/buildroot-2014.02/output/build/libsoxr-0.1.1/CMakeFiles/CMakeOutput.log". See also "/home/prezi/buildroot-2014.02/output/build/libsoxr-0.1.1/CMakeFiles/CMakeError.log". make: *** [/home/prezi/buildroot-2014.02/output/build/libsoxr-0.1.1/.stamp_configured] Error 1
The libsoxr package tries to determine the endianness by running a program, which is not possible because we're cross compiling. However, this fact is detected, and the suggestion is to 'tell' libsoxr the right result: CMake Error: TRY_RUN() invoked in cross-compiling mode, please set the following cache variables appropriately: HAVE_WORDS_BIGENDIAN_EXITCODE (advanced) So this means you have to pass this variable to the compilation of libsoxr. The variable HAVE_WORDS_BIGENDIAN_EXITCODE is created based on the test_big_endian macro, present in ./cmake/Modules/TestBigEndian.cmake. This file has a note: "1 if system is big endian" So essentially, you should add something like this in the libsoxr.mk file: ifeq ($(BR2_ENDIAN),"BIG") LIBSOXR_CONF_OPT += -DHAVE_WORDS_BIGENDIAN_EXITCODE=1 else LIBSOXR_CONF_OPT += -DHAVE_WORDS_BIGENDIAN_EXITCODE=0 endif I'm unsure about the exact way to pass this flag to the build, either with FOO_CONF_OPT or FOO_CONF_ENV, so you may want to try both.
(In reply to comment #3) > The libsoxr package tries to determine the endianness by running a program, > which is not possible because we're cross compiling. However, this fact is > detected, and the suggestion is to 'tell' libsoxr the right result: > > CMake Error: TRY_RUN() invoked in cross-compiling mode, please set the > following cache variables appropriately: > HAVE_WORDS_BIGENDIAN_EXITCODE (advanced) > > > So this means you have to pass this variable to the compilation of libsoxr. > The variable HAVE_WORDS_BIGENDIAN_EXITCODE is created based on the > test_big_endian macro, present in ./cmake/Modules/TestBigEndian.cmake. > This file has a note: "1 if system is big endian" > > So essentially, you should add something like this in the libsoxr.mk file: > > ifeq ($(BR2_ENDIAN),"BIG") > LIBSOXR_CONF_OPT += -DHAVE_WORDS_BIGENDIAN_EXITCODE=1 > else > LIBSOXR_CONF_OPT += -DHAVE_WORDS_BIGENDIAN_EXITCODE=0 > endif > > I'm unsure about the exact way to pass this flag to the build, either with > FOO_CONF_OPT or FOO_CONF_ENV, so you may want to try both. I confirm, when using the cmake infrastructure, the flags are passed to FOO_CONF_OPT.
Hadrien Bouteville has proposed a libsoxr patch on the list, so this bug can soon be closed...
libsoxr added in commit 705662b41d59558ad6ca11362c9611cf13f1d6fd for the upcoming 2014.05 release. But please note you're probably talking of mpd 0.18.6 (and not 18.6), and anyway the whole 0.18.x branch lacks libsoxr support, that'll probably be in 0.19.x or whatever the next major release is called (it's in mpd git master for now). Thanks.