Skip to contentSkip to conversation

package/webrtc-audio-processing: needs gcc >= 4.8

PATCH New Romain Naour 3 participants 9 messages Jul 3, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/4 package/webrtc-audio-processing: needs gcc >= 4.8

Webrtc-audio-processing require a C++11 compiler

Fixes:
http://autobuild.buildroot.net/results/729/729cd0039ac172cfe31a4325bad902e9a14e146f

---
 package/webrtc-audio-processing/Config.in | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
package/webrtc-audio-processing/Config.in +4 -2
index f228bc7..7c69903 100644
@@ -2,6 +2,7 @@ config BR2_PACKAGE_WEBRTC_AUDIO_PROCESSING
 	bool "webrtc-audio-processing"
 	depends on BR2_arm || BR2_i386 || BR2_x86_64
 	depends on BR2_INSTALL_LIBSTDCPP
+	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_8
 	depends on BR2_TOOLCHAIN_HAS_THREADS
 	help
 	  AudioProcessing library based on Google's implementation of
@@ -9,6 +10,7 @@ config BR2_PACKAGE_WEBRTC_AUDIO_PROCESSING
 
 	  http://freedesktop.org/software/pulseaudio/webrtc-audio-processing/
 
-comment "webrtc-audio-processing needs a toolchain w/ C++, threads"
+comment "webrtc-audio-processing needs a toolchain w/ C++, threads, gcc >= 4.8"
 	depends on BR2_arm || BR2_i386 || BR2_x86_64
-	depends on !(BR2_INSTALL_LIBSTDCPP && BR2_TOOLCHAIN_HAS_THREADS)
+	depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS \
+		|| !BR2_TOOLCHAIN_GCC_AT_LEAST_4_8
Signature · 1 line
2.5.5
#1 lore raw

PATCH 2/4 package/pulseaudio: allow to build without C++11 support

C++11 support is only required for WebRTC optional support but pulseaudio can still be built with toolchains based on gcc 4.7 or older witch doesn't have it.

Add a patch to make C++11 support optional and explicitely check for gnu++11. Also stop the build only if no C++11 support has been found and WebRTC support has been resquested.

Fixes:
http://autobuild.buildroot.net/results/d89/d897a94a8b6a52eba03d04c24536f554a7643000

---
 ...-C-11-is-only-required-for-WebRTC-support.patch | 45 ++++++++++++++++++++++
 package/pulseaudio/pulseaudio.mk                   |  3 ++
 2 files changed, 48 insertions(+)
 create mode 100644 package/pulseaudio/0002-webrtc-C-11-is-only-required-for-WebRTC-support.patch
package/pulseaudio/0002-webrtc-C-11-is-only-required-for-WebRTC-support.patch new file +45 -0
new file mode 100644
index 0000000..143d73b
@@ -0,0 +1,45 @@
+From f9691b5f0aed2ffbaac82513b8baa7e3e357c2c1 Mon Sep 17 00:00:00 2001
+From: Romain Naour <[email protected]>
+Date: Sun, 3 Jul 2016 20:19:48 +0200
+Subject: [PATCH] webrtc: C++11 is only required for WebRTC support
+
+Make C++11 support optional and explicitely check for gnu++11.
+
+Stop the build only if no C++11 support has been found and WebRTC
+support has been resquested.
+
+Signed-off-by: Romain Naour <[email protected]>
+---
+ configure.ac | 8 +++++---
+ 1 file changed, 5 insertions(+), 3 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 4edc8e0..65a386a 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -81,10 +81,9 @@ AC_PROG_LN_S
+ 
+ AC_PROG_CC
+ AM_PROG_CC_C_O
+-# Only required if you want the WebRTC canceller -- no runtime dep on
+-# libstdc++ otherwise
++# C++11 is only required if you want the WebRTC canceller -- no runtime dep on
+ AC_PROG_CXX
+-AX_CXX_COMPILE_STDCXX_11
++AX_CXX_COMPILE_STDCXX_11(ext,optional)
+ AC_PROG_GCC_TRADITIONAL
+ AC_USE_SYSTEM_EXTENSIONS
+ 
+@@ -1414,6 +1413,9 @@ fi
+ AC_ARG_ENABLE([webrtc-aec],
+     AS_HELP_STRING([--enable-webrtc-aec], [Enable the optional WebRTC-based echo canceller]))
+ 
++AS_IF([test "x$enable_webrtc_aec" = "xyes" && test "$HAVE_CXX11" = "0"],
++    [AC_MSG_ERROR([*** webrtc-audio-processing needs C++11 support])])
++
+ AS_IF([test "x$enable_webrtc_aec" != "xno"],
+     [PKG_CHECK_MODULES(WEBRTC, [ webrtc-audio-processing >= 0.2 ], [HAVE_WEBRTC=1], [HAVE_WEBRTC=0])],
+     [HAVE_WEBRTC=0])
+-- 
+2.5.5
+
package/pulseaudio/pulseaudio.mk +3 -0
index f50ea67..bc95d91 100644
@@ -21,6 +21,9 @@ PULSEAUDIO_CONF_OPTS = \
 PULSE_AUDIO_CONF_ENV += \
 	ac_cv_header_atomic_ops_h=no
 
+# 0002-webrtc-C-11-is-only-required-for-WebRTC-support.patch
+PULSEAUDIO_AUTORECONF = YES
+
 PULSEAUDIO_DEPENDENCIES = \
 	host-pkgconf libtool json-c libsndfile speex host-intltool \
 	$(if $(BR2_PACKAGE_LIBSAMPLERATE),libsamplerate) \
Signature · 1 line
2.5.5
#2 lore raw

PATCH 2/4 package/pulseaudio: allow to build without C++11 support

Romain, All,

On 2016-07-04 00:32 +0200, Romain Naour spake thusly:

Quoted 39 lines

C++11 support is only required for WebRTC optional support but pulseaudio can still be built with toolchains based on gcc 4.7 or older witch doesn't have it.

Add a patch to make C++11 support optional and explicitely check for gnu++11. Also stop the build only if no C++11 support has been found and WebRTC support has been resquested.

Fixes:
http://autobuild.buildroot.net/results/d89/d897a94a8b6a52eba03d04c24536f554a7643000

---
 ...-C-11-is-only-required-for-WebRTC-support.patch | 45 ++++++++++++++++++++++
 package/pulseaudio/pulseaudio.mk                   |  3 ++
 2 files changed, 48 insertions(+)
 create mode 100644 package/pulseaudio/0002-webrtc-C-11-is-only-required-for-WebRTC-support.patch
package/pulseaudio/0002-webrtc-C-11-is-only-required-for-WebRTC-support.patch new file +15 -0
new file mode 100644
index 0000000..143d73b
@@ -0,0 +1,45 @@
+From f9691b5f0aed2ffbaac82513b8baa7e3e357c2c1 Mon Sep 17 00:00:00 2001
+From: Romain Naour <[email protected]>
+Date: Sun, 3 Jul 2016 20:19:48 +0200
+Subject: [PATCH] webrtc: C++11 is only required for WebRTC support
+
+Make C++11 support optional and explicitely check for gnu++11.
+
+Stop the build only if no C++11 support has been found and WebRTC
+support has been resquested.
+
+Signed-off-by: Romain Naour <[email protected]>
+---
+ configure.ac | 8 +++++---
+ 1 file changed, 5 insertions(+), 3 deletions(-)
+

package/pulseaudio/0002-webrtc-C-11-is-only-required-for-WebRTC-support.patch line 25

Quoted 10 lines
package/pulseaudio/0002-webrtc-C-11-is-only-required-for-WebRTC-support.patch new file +10 -0
+diff --git a/configure.ac b/configure.ac
+index 4edc8e0..65a386a 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -81,10 +81,9 @@ AC_PROG_LN_S
+ 
+ AC_PROG_CC
+ AM_PROG_CC_C_O
+-# Only required if you want the WebRTC canceller -- no runtime dep on
+-# libstdc++ otherwise

You've been a little bit over-zealous: that last line you remove is still needed. ;-)

package/pulseaudio/0002-webrtc-C-11-is-only-required-for-WebRTC-support.patch line 29

Quoted 4 lines
package/pulseaudio/0002-webrtc-C-11-is-only-required-for-WebRTC-support.patch new file +4 -0
++# C++11 is only required if you want the WebRTC canceller -- no runtime dep on
+ AC_PROG_CXX
+-AX_CXX_COMPILE_STDCXX_11
++AX_CXX_COMPILE_STDCXX_11(ext,optional)

Syntax for paramters to m4 macros are to be double-quoted:

    AX_CXX_COMPILE_STDCXX_11([ext],[optional])

Otherwise, looks good.

Regards,
Yann E. MORIN.

Quoted 37 lines
package/pulseaudio/0002-webrtc-C-11-is-only-required-for-WebRTC-support.patch new file +16 -0
+ AC_PROG_GCC_TRADITIONAL
+ AC_USE_SYSTEM_EXTENSIONS
+ 
+@@ -1414,6 +1413,9 @@ fi
+ AC_ARG_ENABLE([webrtc-aec],
+     AS_HELP_STRING([--enable-webrtc-aec], [Enable the optional WebRTC-based echo canceller]))
+ 
++AS_IF([test "x$enable_webrtc_aec" = "xyes" && test "$HAVE_CXX11" = "0"],
++    [AC_MSG_ERROR([*** webrtc-audio-processing needs C++11 support])])
++
+ AS_IF([test "x$enable_webrtc_aec" != "xno"],
+     [PKG_CHECK_MODULES(WEBRTC, [ webrtc-audio-processing >= 0.2 ], [HAVE_WEBRTC=1], [HAVE_WEBRTC=0])],
+     [HAVE_WEBRTC=0])
+-- 
+2.5.5
+
package/pulseaudio/pulseaudio.mk +3 -0
index f50ea67..bc95d91 100644
@@ -21,6 +21,9 @@ PULSEAUDIO_CONF_OPTS = \
 PULSE_AUDIO_CONF_ENV += \
 	ac_cv_header_atomic_ops_h=no
 
+# 0002-webrtc-C-11-is-only-required-for-WebRTC-support.patch
+PULSEAUDIO_AUTORECONF = YES
+
 PULSEAUDIO_DEPENDENCIES = \
 	host-pkgconf libtool json-c libsndfile speex host-intltool \
 	$(if $(BR2_PACKAGE_LIBSAMPLERATE),libsamplerate) \
Signature · 6 lines
2.5.5

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#3 lore raw

PATCH 3/4 package/pulseaudio: add WebRTC optional dependency

In reply to Romain Naour

WebRTC is an optional pulseaudio dependency which require C++11 support in the toolchain. Also the autotool script provide --enable/--disable option for this support, so use them in pulseaudio.mk.

---
 package/pulseaudio/pulseaudio.mk | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
package/pulseaudio/pulseaudio.mk +7 -1
index bc95d91..9ef11bc 100644
@@ -34,7 +34,6 @@ PULSEAUDIO_DEPENDENCIES = \
 	$(if $(BR2_PACKAGE_BLUEZ_UTILS),bluez_utils) \
 	$(if $(BR2_PACKAGE_OPENSSL),openssl) \
 	$(if $(BR2_PACKAGE_FFTW),fftw) \
-	$(if $(BR2_PACKAGE_WEBRTC_AUDIO_PROCESSING),webrtc-audio-processing) \
 	$(if $(BR2_PACKAGE_SYSTEMD),systemd)
 
 ifeq ($(BR2_PACKAGE_GDBM),y)
@@ -88,6 +87,13 @@ else
 PULSEAUDIO_CONF_OPTS += --disable-udev
 endif
 
+ifeq ($(BR2_PACKAGE_WEBRTC_AUDIO_PROCESSING),y)
+PULSEAUDIO_CONF_OPTS += --enable-webrtc-aec
+PULSEAUDIO_DEPENDENCIES += webrtc-audio-processing
+else
+PULSEAUDIO_CONF_OPTS += --disable-webrtc-aec
+endif
+
 ifneq ($(BR2_INSTALL_LIBSTDCPP),y)
 # The optional webrtc echo canceller is written in C++, causing auto* to want
 # to link module-echo-cancel.so with CXX even if webrtc ISN'T used.
Signature · 1 line
2.5.5
#4 lore raw

PATCH 3/4 package/pulseaudio: add WebRTC optional dependency

Romain, All,

On 2016-07-04 00:32 +0200, Romain Naour spake thusly:

Quoted 2 lines

WebRTC is an optional pulseaudio dependency which require C++11 support in the toolchain.

This change has nothing to do with the c++11 support, has it?

Quoted 3 lines

Also the autotool script provide --enable/--disable option for this support, so use them in pulseaudio.mk.

I would rephrase that commit log such as;

package/pulseaudio: explicitly enable/disable WebRTC support

Currently, pulseaudio optionally depends on webrtc if it is enabled.

However, it is never explcitly enabled or disabled, although pulseaudio's ./configure has --enable/disable-webrtc-aec.

Forcibly enable/disable webrtc support usign those options.

Signed-off-by You

(You can keep my reviewd-by tag when you respin)

Regards,
Yann E. MORIN.

Quoted 38 lines
---
 package/pulseaudio/pulseaudio.mk | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
package/pulseaudio/pulseaudio.mk +7 -1
index bc95d91..9ef11bc 100644
@@ -34,7 +34,6 @@ PULSEAUDIO_DEPENDENCIES = \
 	$(if $(BR2_PACKAGE_BLUEZ_UTILS),bluez_utils) \
 	$(if $(BR2_PACKAGE_OPENSSL),openssl) \
 	$(if $(BR2_PACKAGE_FFTW),fftw) \
-	$(if $(BR2_PACKAGE_WEBRTC_AUDIO_PROCESSING),webrtc-audio-processing) \
 	$(if $(BR2_PACKAGE_SYSTEMD),systemd)
 
 ifeq ($(BR2_PACKAGE_GDBM),y)
@@ -88,6 +87,13 @@ else
 PULSEAUDIO_CONF_OPTS += --disable-udev
 endif
 
+ifeq ($(BR2_PACKAGE_WEBRTC_AUDIO_PROCESSING),y)
+PULSEAUDIO_CONF_OPTS += --enable-webrtc-aec
+PULSEAUDIO_DEPENDENCIES += webrtc-audio-processing
+else
+PULSEAUDIO_CONF_OPTS += --disable-webrtc-aec
+endif
+
 ifneq ($(BR2_INSTALL_LIBSTDCPP),y)
 # The optional webrtc echo canceller is written in C++, causing auto* to want
 # to link module-echo-cancel.so with CXX even if webrtc ISN'T used.
Signature · 6 lines
2.5.5

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#5 lore raw

PATCH 4/4 package/puseaudio: fix typo

In reply to Romain Naour

commit 7290dc1e87b23fe21c75c50b2238004273a0ec5c added PULSE_AUDIO_CONF_ENV instead of PULSEAUDIO_CONF_ENV.

---
 package/pulseaudio/pulseaudio.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
package/pulseaudio/pulseaudio.mk +1 -1
index 9ef11bc..e0d9ab4 100644
@@ -18,7 +18,7 @@ PULSEAUDIO_CONF_OPTS = \
 # Make sure we don't detect libatomic_ops. Indeed, since pulseaudio
 # requires json-c, which needs 4 bytes __sync builtins, there should
 # be no need for pulseaudio to rely on libatomic_ops.
-PULSE_AUDIO_CONF_ENV += \
+PULSEAUDIO_CONF_ENV += \
 	ac_cv_header_atomic_ops_h=no
 
 # 0002-webrtc-C-11-is-only-required-for-WebRTC-support.patch
Signature · 1 line
2.5.5
#6 lore raw

PATCH 4/4 package/puseaudio: fix typo

Romain, All,

On 2016-07-04 00:32 +0200, Romain Naour spake thusly:

Quoted 4 lines

commit 7290dc1e87b23fe21c75c50b2238004273a0ec5c added PULSE_AUDIO_CONF_ENV instead of PULSEAUDIO_CONF_ENV.

Meh...

Regards,
Yann E. MORIN.

Quoted 24 lines
---
 package/pulseaudio/pulseaudio.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
package/pulseaudio/pulseaudio.mk +1 -1
index 9ef11bc..e0d9ab4 100644
@@ -18,7 +18,7 @@ PULSEAUDIO_CONF_OPTS = \
 # Make sure we don't detect libatomic_ops. Indeed, since pulseaudio
 # requires json-c, which needs 4 bytes __sync builtins, there should
 # be no need for pulseaudio to rely on libatomic_ops.
-PULSE_AUDIO_CONF_ENV += \
+PULSEAUDIO_CONF_ENV += \
 	ac_cv_header_atomic_ops_h=no
 
 # 0002-webrtc-C-11-is-only-required-for-WebRTC-support.patch
Signature · 6 lines
2.5.5

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#7 lore raw

PATCH 1/4 package/webrtc-audio-processing: needs gcc >= 4.8

In reply to Romain Naour

Romain, All,

On 2016-07-04 00:32 +0200, Romain Naour spake thusly:

Quoted 6 lines

Webrtc-audio-processing require a C++11 compiler

Fixes:
http://autobuild.buildroot.net/results/729/729cd0039ac172cfe31a4325bad902e9a14e146f

Regards,
Yann E. MORIN.

Quoted 33 lines
---
 package/webrtc-audio-processing/Config.in | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
package/webrtc-audio-processing/Config.in +4 -2
index f228bc7..7c69903 100644
@@ -2,6 +2,7 @@ config BR2_PACKAGE_WEBRTC_AUDIO_PROCESSING
 	bool "webrtc-audio-processing"
 	depends on BR2_arm || BR2_i386 || BR2_x86_64
 	depends on BR2_INSTALL_LIBSTDCPP
+	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_8
 	depends on BR2_TOOLCHAIN_HAS_THREADS
 	help
 	  AudioProcessing library based on Google's implementation of
@@ -9,6 +10,7 @@ config BR2_PACKAGE_WEBRTC_AUDIO_PROCESSING
 
 	  http://freedesktop.org/software/pulseaudio/webrtc-audio-processing/
 
-comment "webrtc-audio-processing needs a toolchain w/ C++, threads"
+comment "webrtc-audio-processing needs a toolchain w/ C++, threads, gcc >= 4.8"
 	depends on BR2_arm || BR2_i386 || BR2_x86_64
-	depends on !(BR2_INSTALL_LIBSTDCPP && BR2_TOOLCHAIN_HAS_THREADS)
+	depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS \
+		|| !BR2_TOOLCHAIN_GCC_AT_LEAST_4_8
Signature · 6 lines
2.5.5

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'