OpenWrt Forum Archive

Topic: BB + MPD-full + PulseAudio, unable to build

The content of this topic has been archived on 22 Mar 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Hi,

I'm trying to build MPD-full with pulseaudio support on BarrierBreaker.
The target profile is : TP-LINK TL-WDR3500/3600/4300/4310/MW4350R
Therefore I followed this thread:
https://forum.openwrt.org/viewtopic.php … 26#p205026
But as the post also says https://forum.openwrt.org/viewtopic.php … 71#p216871

I used "attitude_adjustment_12.09" and instructions are for "attitude_adjustment_12.09"

Based on the documentation, I made the following changes to "feeds/packages/sound/mpd/Makefile"

define Package/mpd-full
$(call Package/mpd/Default)
  TITLE+= (full)
  DEPENDS+= \
    +AUDIO_SUPPORT:alsa-lib \
    +libaudiofile +BUILD_PATENTED:libfaad2 +libffmpeg-full +libid3tag \
    +libmms +libogg +libsndfile +libvorbis +pulseaudio-daemon
  PROVIDES:=mpd
  VARIANT:=full
endef

    --enable-pulse \

TARGET_LDFLAGS += -Wl,-rpath-link=$(STAGING_DIR)/usr/lib $(if $(ICONV_FULL),-liconv),-rpath-link=$(STAGING_DIR)/usr/lib/pulseaudio

"feeds/packages/sound/pulseaudio/Makefile" seemed to have everything it needs. The documentation sais:

+       $(CP) \
+               $(PKG_INSTALL_DIR)/usr/lib/pulseaudio/*.so* \
+               $(1)/usr/lib/pulseaudio/

But I assumed it is included in $(PKG_INSTALL_DIR)/usr/lib/pulseaudio/*
And the file remained as provided by the git clone.

define Build/InstallDev
    $(INSTALL_DIR) \
        $(1)/usr/lib/pkgconfig \
        $(1)/usr/include/pulse \
        $(1)/usr/lib \
        $(1)/usr/lib/pulseaudio
    $(CP) \
        $(PKG_INSTALL_DIR)/usr/include/pulse/* \
        $(1)/usr/include/pulse
    $(CP) \
        $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/*.pc \
        $(1)/usr/lib/pkgconfig
    $(CP) \
        $(PKG_INSTALL_DIR)/usr/lib/*.so* \
        $(1)/usr/lib/
    $(CP) \
        $(PKG_INSTALL_DIR)/usr/lib/pulseaudio/* \
        $(1)/usr/lib/pulseaudio/
endef

So after selecting Sound/pulseaudio-daemon,Libraries/libffmpeg-mini and Sound/mpd-full in the Menuconfig.
I started a Make
and I got the following result.

checking whether the C compiler works... no
configure: error: in `build_dir/target-mips_34kc_uClibc-0.9.33.2/mpd-full/mpd-0.17.6':
configure: error: C compiler cannot create executables

Has anyone an Idea on this ?
Thanks

(Last edited by youpla on 16 Aug 2015, 09:20)

If you select multiple packages please provide the output of

./scripts/diffconfig.sh

mpd is an autoconf package. It automatically builds a log where you can get more details about your error.

Open config.log in mpd build directory. ( build_dir/target-<your arch>/mpd-full/mpd-0.17.6 )
and look where the compile fails and prints this message

edit: Please post your real diff of your changes (so it applies as a patch) or the complete makefile that you modified.

(Last edited by zloop on 16 Aug 2015, 09:44)

zloop wrote:

If you select multiple packages please provide the output of

./scripts/diffconfig.sh

Here is : "./scripts/diffconfig.sh"

/media/a439c30c-0460-42f5-ad83-d00ec702c994/openwrtbb/openwrt$ ./scripts/diffconfig.sh
CONFIG_TARGET_ar71xx=y
CONFIG_TARGET_ar71xx_generic=y
CONFIG_TARGET_ar71xx_generic_TLWDR4300=y
CONFIG_LIBCURL_COOKIES=y
CONFIG_LIBCURL_FILE=y
CONFIG_LIBCURL_FTP=y
CONFIG_LIBCURL_HTTP=y
CONFIG_LIBCURL_POLARSSL=y
CONFIG_OPENSSL_WITH_EC=y
CONFIG_PACKAGE_alsa-lib=m
CONFIG_PACKAGE_block-mount=y
CONFIG_PACKAGE_glib2=m
CONFIG_PACKAGE_kmod-crypto-hash=y
CONFIG_PACKAGE_kmod-fs-ext4=y
CONFIG_PACKAGE_kmod-input-core=y
CONFIG_PACKAGE_kmod-lib-crc16=y
CONFIG_PACKAGE_kmod-mii=y
CONFIG_PACKAGE_kmod-scsi-core=y
CONFIG_PACKAGE_kmod-sound-core=y
CONFIG_PACKAGE_kmod-usb-audio=y
CONFIG_PACKAGE_kmod-usb-net=y
CONFIG_PACKAGE_kmod-usb-net-cdc-ether=y
CONFIG_PACKAGE_kmod-usb-ohci=y
CONFIG_PACKAGE_kmod-usb-storage=y
CONFIG_PACKAGE_libattr=m
CONFIG_PACKAGE_libaudiofile=m
CONFIG_PACKAGE_libbz2=m
CONFIG_PACKAGE_libcap=m
CONFIG_PACKAGE_libcurl=m
CONFIG_PACKAGE_libfaad2=m
CONFIG_PACKAGE_libffi=m
CONFIG_PACKAGE_libffmpeg-full=m
CONFIG_PACKAGE_libflac=m
CONFIG_PACKAGE_libid3tag=m
CONFIG_PACKAGE_libjson=m
CONFIG_PACKAGE_libltdl=m
CONFIG_PACKAGE_libmad=m
CONFIG_PACKAGE_libmms=m
CONFIG_PACKAGE_libncurses=y
CONFIG_PACKAGE_libogg=m
CONFIG_PACKAGE_libopenssl=m
CONFIG_PACKAGE_libpolarssl=m
CONFIG_PACKAGE_libpthread=m
CONFIG_PACKAGE_librt=m
CONFIG_PACKAGE_libsndfile=m
CONFIG_PACKAGE_libspeexdsp=m
CONFIG_PACKAGE_libstdcpp=m
CONFIG_PACKAGE_libvorbis=m
CONFIG_PACKAGE_libvorbisidec=m
CONFIG_PACKAGE_libwrap=m
CONFIG_PACKAGE_mpd-full=m
CONFIG_PACKAGE_nano=y
CONFIG_PACKAGE_pulseaudio-daemon=m
CONFIG_PACKAGE_terminfo=y
CONFIG_PACKAGE_uboot-ar71xx-nbg460n_550n_550nh=y
CONFIG_PACKAGE_zlib=m
zloop wrote:

mpd is an autoconf package. It automatically builds a log where you can get more details about your error.

Open config.log in mpd build directory. ( build_dir/target-<your arch>/mpd-full/mpd-0.17.6 )
and look where the compile fails and prints this message

I can post the whole file, but there is this interesting error that seems to match with the error reported in this post:
https://forum.openwrt.org/viewtopic.php … 43#p286843

mips-openwrt-linux-uclibc-gcc: error: ,-rpath-link=/media/a439c30c-0460-42f5-ad83-d00ec702c994/openwrtbb/openwrt/staging_dir/target-mips_34kc_uClibc-0.9.33.2/usr/lib/pulseaudio: No such file or directory

I checked and  the path exists with a file in it.
/media/a439c30c-0460-42f5-ad83-d00ec702c994/openwrtbb/openwrt/staging_dir/target-mips_34kc_uClibc-0.9.33.2/usr/lib/pulseaudio/libpulsecommon-5.0.so
Tell me if you still need the whole file to be posted

zloop wrote:

edit: Please post your real diff of your changes (so it applies as a patch) or the complete makefile that you modified.

So I made a "diff -u Makefile Makefile.old > mpd.diff.patch" which gives:

--- Makefile.old    2015-08-16 11:11:38.024542653 +0200
+++ Makefile    2015-08-16 11:14:27.236545583 +0200
@@ -48,8 +48,8 @@
   TITLE+= (full)
   DEPENDS+= \
     +AUDIO_SUPPORT:alsa-lib \
-    +libaudiofile +BUILD_PATENTED:libfaad2 +libffmpeg +libid3tag \
-    +libmms +libogg +libsndfile +libvorbis
+    +libaudiofile +BUILD_PATENTED:libfaad2 +libffmpeg-full +libid3tag \
+    +libmms +libogg +libsndfile +libvorbis +pulseaudio-daemon
   PROVIDES:=mpd
   VARIANT:=full
 endef
@@ -109,7 +109,7 @@
     --disable-mpg123 \
     --disable-mvp \
     --disable-openal \
-    --disable-pulse \
+    --enable-pulse \
     --disable-sidplay \
     --disable-solaris-output \
     --disable-soup \
@@ -136,7 +136,7 @@
     $(if $(CONFIG_BUILD_PATENTED),MAD_LIBS="$(TARGET_LDFLAGS) -lmad") \
 
 TARGET_CFLAGS += -std=gnu99
-TARGET_LDFLAGS += -Wl,-rpath-link=$(STAGING_DIR)/usr/lib $(if $(ICONV_FULL),-liconv)
+TARGET_LDFLAGS += -Wl,-rpath-link=$(STAGING_DIR)/usr/lib $(if $(ICONV_FULL),-liconv),-rpath-link=$(STAGING_DIR)/usr/lib/pulseaudio
 
 # use gcc instead of g++ to avoid unnecessary linking against libstdc++
 TARGET_CXX:=$(TARGET_CC)

Thanks

(Last edited by youpla on 16 Aug 2015, 15:34)

-TARGET_LDFLAGS += -Wl,-rpath-link=$(STAGING_DIR)/usr/lib $(if $(ICONV_FULL),-liconv)
+TARGET_LDFLAGS += -Wl,-rpath-link=$(STAGING_DIR)/usr/lib $(if $(ICONV_FULL),-liconv),-rpath-link=$(STAGING_DIR)/usr/lib/pulseaudio

I think it's wrong compare it to the post you linked

-TARGET_LDFLAGS += -Wl,-rpath-link=$(STAGING_DIR)/usr/lib
+TARGET_LDFLAGS += -Wl,-rpath-link=$(STAGING_DIR)/usr/lib,-rpath-link=$(STAGING_DIR)/usr/lib/pulseaudio

so it probably should look more like

-TARGET_LDFLAGS += -Wl,-rpath-link=$(STAGING_DIR)/usr/lib $(if $(ICONV_FULL),-liconv)
+TARGET_LDFLAGS += -Wl,-rpath-link=$(STAGING_DIR)/usr/lib,-rpath-link=$(STAGING_DIR)/usr/lib/pulseaudio $(if $(ICONV_FULL),-liconv)

please test that smile

Thank you very much. :-)

Compile is a success with

TARGET_LDFLAGS += -Wl,-rpath-link=$(STAGING_DIR)/usr/lib,-rpath-link=$(STAGING_DIR)/usr/lib/pulseaudio $(if $(ICONV_FULL),-liconv)

I honestly thought that "-liconv" was just a command line parameter and that the order doesn't matter.
But it definitively does.

If it's OK with you, I'll update
http://wiki.openwrt.org/doc/howto/pulseaudio
"0.16.1 of MPD is needed. It needs to be build with support for PulseAudio: "
Based on the this and the other mentioned threads

The discussion might have continued from here.