From c22c60b9fd32d19030044266e1d61205c7c2150f Mon Sep 17 00:00:00 2001 From: Sebastian Kemper Date: Wed, 13 Dec 2017 19:29:01 +0100 Subject: [PATCH 1/2] re: fix build errors on mipsel targets On most mipsel targets re fails to build because the re Makefile adds "-march=mips32" to CFLAGS: Assembler messages: Error: -mips32r2 conflicts with the other architecture options, which imply -mips32 src/sip/addr.c:1:0: error: '-mips32r2' conflicts with the other architecture options, which specify a mips32 processor /** ^ Makefile:92: recipe for target 'build-mipsel/sip/addr.o' failed Fix this by preventing re from adding to OpenWrt CFLAGS. Signed-off-by: Sebastian Kemper --- .../005-fix-builds-for-mipsel-targets.patch | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 libs/re/patches/005-fix-builds-for-mipsel-targets.patch diff --git a/libs/re/patches/005-fix-builds-for-mipsel-targets.patch b/libs/re/patches/005-fix-builds-for-mipsel-targets.patch new file mode 100644 index 0000000..64cebf5 --- /dev/null +++ b/libs/re/patches/005-fix-builds-for-mipsel-targets.patch @@ -0,0 +1,14 @@ +--- a/mk/re.mk ++++ b/mk/re.mk +@@ -448,11 +448,6 @@ endif + + CFLAGS += -DARCH=\"$(ARCH)\" + +-ifeq ($(ARCH),mipsel) +-CFLAGS += -march=mips32 +-endif +- +- + ############################################################################## + # + # External libraries section From 23b3363a5e299082d354656b6a3a7ccb70ea7bd7 Mon Sep 17 00:00:00 2001 From: Sebastian Kemper Date: Wed, 13 Dec 2017 19:37:11 +0100 Subject: [PATCH 2/2] baresip: add symbol to prevent FFmpeg dependency by default Currently baresip often fails to build because the FFmpeg compile was not successful: CC [M] build-mipsel/modules/avcodec/avcodec.o modules/avcodec/avcodec.c:9:32: fatal error: libavcodec/avcodec.h: No such file or directory compilation terminated. Address this by adding a configuration symbol that prevents the FFmpeg-depending modules from being selected by default, except on i386 and x86_64. It is better having baresip packages without these video modules than not having baresip packages at all. Signed-off-by: Sebastian Kemper --- net/baresip/Config.in | 16 ++++++++++++++++ net/baresip/Makefile | 8 ++++++-- 2 files changed, 22 insertions(+), 2 deletions(-) create mode 100644 net/baresip/Config.in diff --git a/net/baresip/Config.in b/net/baresip/Config.in new file mode 100644 index 0000000..cb1c606 --- /dev/null +++ b/net/baresip/Config.in @@ -0,0 +1,16 @@ +menu "bareSIP configuration" + depends on PACKAGE_baresip + +config BARESIP_WITH_FFMPEG + bool "Compile with FFmpeg support" + default y if (i386||x86_64) + help + The sole purpose of this symbol is to prevent that the bareSIP + video modules, the ones which depend on FFmpeg, are built by + default. The reason is that FFmpeg often fails to compile for + some targets, causing the bareSIP compile to fail as well. + + If you want the modules which depend on FFmpeg to become + available, select 'y'. + +endmenu diff --git a/net/baresip/Makefile b/net/baresip/Makefile index 65d199b..958f124 100644 --- a/net/baresip/Makefile +++ b/net/baresip/Makefile @@ -50,6 +50,10 @@ PKG_CONFIG_DEPENDS:= \ include $(INCLUDE_DIR)/package.mk +define Package/$(PKG_NAME)/config + source "$(SOURCE)/Config.in" +endef + define Package/baresip/Default SECTION:=net CATEGORY:=Network @@ -151,8 +155,8 @@ $(eval $(call BuildPackage,baresip)) $(eval $(call BuildPlugin,alsa,ALSA audio driver,alsa,+alsa-lib)) $(eval $(call BuildPlugin,aubridge,Audio bridge module,aubridge,)) $(eval $(call BuildPlugin,aufile,Audio module for using a WAV-file as audio input,aufile,)) -$(eval $(call BuildPlugin,avcodec,Video codec using FFmpeg,avcodec,+libffmpeg-full +libx264)) -$(eval $(call BuildPlugin,avformat,Video source using FFmpeg,avformat,+libffmpeg-full)) +$(eval $(call BuildPlugin,avcodec,Video codec using FFmpeg,avcodec,@BARESIP_WITH_FFMPEG +libffmpeg-full +libx264)) +$(eval $(call BuildPlugin,avformat,Video source using FFmpeg,avformat,@BARESIP_WITH_FFMPEG +libffmpeg-full)) $(eval $(call BuildPlugin,cons,UDP/TCP console UI driver,cons,)) $(eval $(call BuildPlugin,debug_cmd,Debug commands,debug_cmd,)) $(eval $(call BuildPlugin,dtls_srtp,DTLS-SRTP end-to-end encryption,dtls_srtp,))