...
./configure: line 16398: syntax error: unexpected end of file
...

Backport a commit from upstream to fix it

Signed-off-by: Hongxu Jia <[email protected]>
---
 .../corosync/corosync_3.0.3.bb                |  1 +
 ....m4-make-conpatible-to-autoconf-2.70.patch | 89 +++++++++++++++++++
 2 files changed, 90 insertions(+)
 create mode 100644 
meta-networking/recipes-support/lksctp-tools/lksctp-tools/0001-m4-sctp.m4-make-conpatible-to-autoconf-2.70.patch

diff --git a/meta-networking/recipes-extended/corosync/corosync_3.0.3.bb 
b/meta-networking/recipes-extended/corosync/corosync_3.0.3.bb
index c0531d386..7e0b5d5ca 100644
--- a/meta-networking/recipes-extended/corosync/corosync_3.0.3.bb
+++ b/meta-networking/recipes-extended/corosync/corosync_3.0.3.bb
@@ -8,6 +8,7 @@ SECTION = "base"
 inherit autotools pkgconfig systemd useradd
 
 SRC_URI = 
"https://github.com/${BPN}/${BPN}/releases/download/v${PV}/${BP}.tar.gz \
+           file://0001-m4-sctp.m4-make-conpatible-to-autoconf-2.70.patch \
            file://corosync.conf \
           "
 SRC_URI[sha256sum] = 
"20eb903eb984f6a728282c199825e442e8bba869acefd22390076ef3a33a4ded"
diff --git 
a/meta-networking/recipes-support/lksctp-tools/lksctp-tools/0001-m4-sctp.m4-make-conpatible-to-autoconf-2.70.patch
 
b/meta-networking/recipes-support/lksctp-tools/lksctp-tools/0001-m4-sctp.m4-make-conpatible-to-autoconf-2.70.patch
new file mode 100644
index 000000000..484af4e0f
--- /dev/null
+++ 
b/meta-networking/recipes-support/lksctp-tools/lksctp-tools/0001-m4-sctp.m4-make-conpatible-to-autoconf-2.70.patch
@@ -0,0 +1,89 @@
+From d6d7130f0a2e3b81880fca29966e42c1b2be40a7 Mon Sep 17 00:00:00 2001
+From: Sergei Trofimovich <[email protected]>
+Date: Fri, 8 Jan 2021 22:22:52 +0000
+Subject: [PATCH] m4/sctp.m4: make conpatible to autoconf-2.70
+
+On recently released `autoconf-2.70` generated `./configure`
+fails as:
+
+```
+$ ./configure
+...
+checking for struct sctp_event_subscribe.sctp_stream_reset_event... yes
+checking for gcc options needed to detect all undeclared functions... none 
needed
+./configure: line 16464: syntax error: unexpected end of file
+```
+
+This happens becuase new autoconf generates less whitespace:
+
+```
+{
+if ...
+...
+fi}
+```
+
+It requires at least whitespace between `fi` and `}`.
+
+As input already has newlines the change just drops extra `{}`.
+
+Tested on `autoconf-2.69` and `autoconf-2.70`.
+
+Signed-off-by: Sergei Trofimovich <[email protected]>
+Signed-off-by: Marcelo Ricardo Leitner <[email protected]>
+
+Upstream-Status: Backport [git://github.com/sctp/lksctp-tools.git]
+Signed-off-by: Hongxu Jia <[email protected]>
+
+---
+ m4/sctp.m4 | 12 ++++++------
+ 1 file changed, 6 insertions(+), 6 deletions(-)
+
+diff --git a/m4/sctp.m4 b/m4/sctp.m4
+index 6593517..94527a6 100644
+--- a/m4/sctp.m4
++++ b/m4/sctp.m4
+@@ -6,7 +6,7 @@
+ 
+ # Macros to assist on probing kernel features
+ #   Probes if a type is defined
+-AC_DEFUN([LKSCTP_CHECK_TYPE], [{
++AC_DEFUN([LKSCTP_CHECK_TYPE], [
+ AC_CHECK_TYPE([$1],
+       AC_DEFINE([$2], 1,
+                 [Define if $1 is present.])
+@@ -22,10 +22,10 @@ AC_CHECK_TYPE([$1],
+ #ifdef HAVE_LINUX_SCTP_H
+ # include <linux/sctp.h>
+ #endif
+-])}])
++])])
+ 
+ #   Probes if a struct has a given member
+-AC_DEFUN([LKSCTP_CHECK_MEMBER], [{
++AC_DEFUN([LKSCTP_CHECK_MEMBER], [
+ AC_CHECK_MEMBER([$1],
+       AC_DEFINE([$2], 1,
+                 [Define if $1 is present.])
+@@ -41,10 +41,10 @@ AC_CHECK_MEMBER([$1],
+ #ifdef HAVE_LINUX_SCTP_H
+ # include <linux/sctp.h>
+ #endif
+-])}])
++])])
+ 
+ #   Probes if a declaration is present
+-AC_DEFUN([LKSCTP_CHECK_DECL], [{
++AC_DEFUN([LKSCTP_CHECK_DECL], [
+ AC_CHECK_DECL([$1],
+       AC_DEFINE([$2], 1,
+                 [Define if $1 is present.])
+@@ -60,4 +60,4 @@ AC_CHECK_DECL([$1],
+ #ifdef HAVE_LINUX_SCTP_H
+ # include <linux/sctp.h>
+ #endif
+-])}])
++])])
+-- 
+2.27.0
+
-- 
2.29.2

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#89277): 
https://lists.openembedded.org/g/openembedded-devel/message/89277
Mute This Topic: https://lists.openembedded.org/mt/80376742/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to