Skip to contentSkip to conversation

package/freeswitch: add patch to fix build issues

PATCH New Heiko Thiery 2 participants 4 messages Jun 9, 2020 – Jun 16, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/freeswitch: add patch to fix build issues

The build fails due to problems with check unit test framework. The API of the check framework seems to have changed API and is incompatible with freeswitch.

See upstream discussion:
https://github.com/signalwire/freeswitch/issues/681#issuecomment-641079430

Add the patch that disables the support for check.

Fixes:
http://autobuild.buildroot.net/results/04f36d541ee6754cd59a9db8605de9de4e1af7f9/

---
 ...0001-disable-the-check-for-check-lib.patch | 33 +++++++++++++++++++
 1 file changed, 33 insertions(+)
 create mode 100644 package/freeswitch/0001-disable-the-check-for-check-lib.patch
package/freeswitch/0001-disable-the-check-for-check-lib.patch new file +33 -0
new file mode 100644
index 0000000000..213d7d35f4
@@ -0,0 +1,33 @@
+From 6a63b51efdf431960711832d78225e50772ba8aa Mon Sep 17 00:00:00 2001
+From: Heiko Thiery <[email protected]>
+Date: Tue, 9 Jun 2020 08:32:51 +0200
+Subject: [PATCH] disable the check for check lib
+
+Do not set the define HAVE_CHECK to prevent building code with
+incompatible check lib.
+
+Signed-off-by: Heiko Thiery <[email protected]>
+---
+ libs/sofia-sip/configure.ac | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/libs/sofia-sip/configure.ac b/libs/sofia-sip/configure.ac
+index 9542208cb6..ebc677628d 100644
+--- a/libs/sofia-sip/configure.ac
++++ b/libs/sofia-sip/configure.ac
+@@ -249,9 +249,9 @@ SAC_TPORT
+ dnl Check is used for testing
+ PKG_CHECK_MODULES(CHECK, check >= 0.9.4, have_check="yes", have_check="no")
+ AM_CONDITIONAL(HAVE_CHECK, test x"$have_check" = "xyes")
+-if test x"$have_check" = "xyes"; then
+-   AC_DEFINE([HAVE_CHECK], 1, [Define to 1 if check library is available])
+-fi
++#if test x"$have_check" = "xyes"; then
++#   AC_DEFINE([HAVE_CHECK], 1, [Define to 1 if check library is available])
++#fi
+ AC_CHECK_HEADERS([fnmatch.h])
+ 
+ AC_CHECK_LIB(pthread, pthread_setschedparam, [AC_DEFINE(HAVE_PTHREAD_SETSCHEDPARAM, 1, [Define if you have pthread_setschedparam()])])
+-- 
+2.20.1
+
Signature · 1 line
2.20.1
#1 lore raw

PATCH 1/1 package/freeswitch: add patch to fix build issues

Quoted 23 lines · On Tue, 9 Jun 2020 10:25:20 +0200 Heiko Thiery <[email protected]> wrote:
package/freeswitch/0001-disable-the-check-for-check-lib.patch new file +17 -0
new file mode 100644
index 0000000000..213d7d35f4
@@ -0,0 +1,33 @@
+From 6a63b51efdf431960711832d78225e50772ba8aa Mon Sep 17 00:00:00 2001
+From: Heiko Thiery <[email protected]>
+Date: Tue, 9 Jun 2020 08:32:51 +0200
+Subject: [PATCH] disable the check for check lib
+
+Do not set the define HAVE_CHECK to prevent building code with
+incompatible check lib.
+
+Signed-off-by: Heiko Thiery <[email protected]>
+---
+ libs/sofia-sip/configure.ac | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/libs/sofia-sip/configure.ac b/libs/sofia-sip/configure.ac
+index 9542208cb6..ebc677628d 100644
+--- a/libs/sofia-sip/configure.ac
++++ b/libs/sofia-sip/configure.ac

package/freeswitch/0001-disable-the-check-for-check-lib.patch line 27

Quoted 10 lines
package/freeswitch/0001-disable-the-check-for-check-lib.patch new file +10 -0
+@@ -249,9 +249,9 @@ SAC_TPORT
+ dnl Check is used for testing
+ PKG_CHECK_MODULES(CHECK, check >= 0.9.4, have_check="yes", have_check="no")
+ AM_CONDITIONAL(HAVE_CHECK, test x"$have_check" = "xyes")
+-if test x"$have_check" = "xyes"; then
+-   AC_DEFINE([HAVE_CHECK], 1, [Define to 1 if check library is available])
+-fi
++#if test x"$have_check" = "xyes"; then
++#   AC_DEFINE([HAVE_CHECK], 1, [Define to 1 if check library is available])
++#fi

Since we're anyway patching the configure.ac script, can we do better, and add a --enable/--disable or --with/--without option, and then use it from freeswitch Makefile.am to disable building sofia-sip tests ?

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#2 lore raw

PATCH 1/1 package/freeswitch: add patch to fix build issues

Hi Thomas,

Am Mi., 10. Juni 2020 um 22:29 Uhr schrieb Thomas Petazzoni <[email protected]>:

Quoted 33 lines
Quoted 29 lines · On Tue, 9 Jun 2020 10:25:20 +0200 Heiko Thiery <[email protected]> wrote:
package/freeswitch/0001-disable-the-check-for-check-lib.patch new file +23 -0
new file mode 100644
index 0000000000..213d7d35f4
@@ -0,0 +1,33 @@
+From 6a63b51efdf431960711832d78225e50772ba8aa Mon Sep 17 00:00:00 2001
+From: Heiko Thiery <[email protected]>
+Date: Tue, 9 Jun 2020 08:32:51 +0200
+Subject: [PATCH] disable the check for check lib
+
+Do not set the define HAVE_CHECK to prevent building code with
+incompatible check lib.
+
+Signed-off-by: Heiko Thiery <[email protected]>
+---
+ libs/sofia-sip/configure.ac | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/libs/sofia-sip/configure.ac b/libs/sofia-sip/configure.ac
+index 9542208cb6..ebc677628d 100644
+--- a/libs/sofia-sip/configure.ac
++++ b/libs/sofia-sip/configure.ac
+@@ -249,9 +249,9 @@ SAC_TPORT
+ dnl Check is used for testing
+ PKG_CHECK_MODULES(CHECK, check >= 0.9.4, have_check="yes", have_check="no")
+ AM_CONDITIONAL(HAVE_CHECK, test x"$have_check" = "xyes")
+-if test x"$have_check" = "xyes"; then
+-   AC_DEFINE([HAVE_CHECK], 1, [Define to 1 if check library is available])
Quoted 8 lines

package/freeswitch/0001-disable-the-check-for-check-lib.patch line 27

Quoted 4 lines
package/freeswitch/0001-disable-the-check-for-check-lib.patch new file +4 -0
+-fi
++#if test x"$have_check" = "xyes"; then
++#   AC_DEFINE([HAVE_CHECK], 1, [Define to 1 if check library is available])
++#fi

Since we're anyway patching the configure.ac script, can we do better, and add a --enable/--disable or --with/--without option, and then use it from freeswitch Makefile.am to disable building sofia-sip tests ?

I have to admit I've no experience with automake and co. But I will give it a try.

Signature · 1 line
Heiko
#3 lore raw

PATCH 1/1 package/freeswitch: add patch to fix build issues

Hi Thomas,

Am Do., 11. Juni 2020 um 11:12 Uhr schrieb Heiko Thiery <[email protected]>:

Quoted 47 lines

Hi Thomas,

Am Mi., 10. Juni 2020 um 22:29 Uhr schrieb Thomas Petazzoni <[email protected]>:

Quoted 33 lines
Quoted 29 lines · On Tue, 9 Jun 2020 10:25:20 +0200 Heiko Thiery <[email protected]> wrote:
package/freeswitch/0001-disable-the-check-for-check-lib.patch new file +23 -0
new file mode 100644
index 0000000000..213d7d35f4
@@ -0,0 +1,33 @@
+From 6a63b51efdf431960711832d78225e50772ba8aa Mon Sep 17 00:00:00 2001
+From: Heiko Thiery <[email protected]>
+Date: Tue, 9 Jun 2020 08:32:51 +0200
+Subject: [PATCH] disable the check for check lib
+
+Do not set the define HAVE_CHECK to prevent building code with
+incompatible check lib.
+
+Signed-off-by: Heiko Thiery <[email protected]>
+---
+ libs/sofia-sip/configure.ac | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/libs/sofia-sip/configure.ac b/libs/sofia-sip/configure.ac
+index 9542208cb6..ebc677628d 100644
+--- a/libs/sofia-sip/configure.ac
++++ b/libs/sofia-sip/configure.ac
+@@ -249,9 +249,9 @@ SAC_TPORT
+ dnl Check is used for testing
+ PKG_CHECK_MODULES(CHECK, check >= 0.9.4, have_check="yes", have_check="no")
+ AM_CONDITIONAL(HAVE_CHECK, test x"$have_check" = "xyes")
+-if test x"$have_check" = "xyes"; then
+-   AC_DEFINE([HAVE_CHECK], 1, [Define to 1 if check library is available])
Quoted 8 lines

package/freeswitch/0001-disable-the-check-for-check-lib.patch line 27

Quoted 4 lines
package/freeswitch/0001-disable-the-check-for-check-lib.patch new file +4 -0
+-fi
++#if test x"$have_check" = "xyes"; then
++#   AC_DEFINE([HAVE_CHECK], 1, [Define to 1 if check library is available])
++#fi

Since we're anyway patching the configure.ac script, can we do better, and add a --enable/--disable or --with/--without option, and then use it from freeswitch Makefile.am to disable building sofia-sip tests ?

Quoted 2 lines

I have to admit I've no experience with automake and co. But I will give it a try.

Unfortunately I did not find a better solution for that problem. As I said, my autoconf knowledge is not that good. What I did so far is I added an option (--without-check) to disable the "PKG_CHECK_MODULES" for the check unit test framework [1]. Then I added the '--without-check' to the configure.gnu script that is called from the toplevel makefile of freeswitch. But then I hit the next issues while installing ;-(

I hope that there will be a better solution upstream for the next release.

[1] https://github.com/signalwire/freeswitch/blob/master/libs/sofia-sip/configure.ac#L250
[2] https://github.com/signalwire/freeswitch/blob/master/libs/sofia-sip/configure.gnu

Signature · 1 line
Heiko