* [OE-core] [PATCH] ell: upgrade 0.33 -> 0.35
@ 2020-12-25 1:30 zangrc
2020-12-25 3:42 ` Khem Raj
0 siblings, 1 reply; 3+ messages in thread
From: zangrc @ 2020-12-25 1:30 UTC (permalink / raw)
To: openembedded-core
Add the following patch to solve the compilation error when using musl:
0001-Fix-bug-caused-by-missing-types.h-file.patch
0001-Fix-the-bug-caused-by-using-functions-not-provided-b.patch
Signed-off-by: Zang Ruochen <zangrc.fnst@cn.fujitsu.com>
---
...x-bug-caused-by-missing-types.h-file.patch | 48 +++++++++++++++++++
...ed-by-using-functions-not-provided-b.patch | 26 ++++++++++
.../ell/{ell_0.33.bb => ell_0.35.bb} | 9 +++-
3 files changed, 81 insertions(+), 2 deletions(-)
create mode 100644 meta/recipes-core/ell/ell/0001-Fix-bug-caused-by-missing-types.h-file.patch
create mode 100644 meta/recipes-core/ell/ell/0001-Fix-the-bug-caused-by-using-functions-not-provided-b.patch
rename meta/recipes-core/ell/{ell_0.33.bb => ell_0.35.bb} (70%)
diff --git a/meta/recipes-core/ell/ell/0001-Fix-bug-caused-by-missing-types.h-file.patch b/meta/recipes-core/ell/ell/0001-Fix-bug-caused-by-missing-types.h-file.patch
new file mode 100644
index 0000000000..6f26ec4e7d
--- /dev/null
+++ b/meta/recipes-core/ell/ell/0001-Fix-bug-caused-by-missing-types.h-file.patch
@@ -0,0 +1,48 @@
+Subject: [PATCH] Fix bug caused by missing types.h file.
+
+Fix the following error:
+../ell-0.35/ell/dhcp-private.h:75:2: error: unknown type name '__be32'
+| 75 | __be32 xid;
+| | ^~~~~~
+| ../ell-0.35/ell/dhcp-private.h:76:2: error: unknown type name '__be16'
+| 76 | __be16 secs;
+| | ^~~~~~
+| ../ell-0.35/ell/dhcp-private.h:77:2: error: unknown type name '__be16'
+| 77 | __be16 flags;
+| | ^~~~~~
+| ../ell-0.35/ell/dhcp-private.h:85:2: error: unknown type name '__be32'
+| 85 | __be32 magic;
+
+Signed-off-by: Zang Ruochen <zangrc.fnst@cn.fujitsu.com>
+---
+ ell/dhcp-private.h | 1 +
+ ell/dhcp6-private.h | 1 +
+ 2 files changed, 2 insertions(+)
+
+diff --git a/ell/dhcp-private.h b/ell/dhcp-private.h
+index 204e54e..b418535 100644
+--- a/ell/dhcp-private.h
++++ b/ell/dhcp-private.h
+@@ -19,6 +19,7 @@
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
++#include <linux/types.h>
+
+ struct l_dhcp_client;
+ struct l_dhcp_server;
+diff --git a/ell/dhcp6-private.h b/ell/dhcp6-private.h
+index 2bbd1d3..14dd85c 100644
+--- a/ell/dhcp6-private.h
++++ b/ell/dhcp6-private.h
+@@ -19,6 +19,7 @@
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
++#include <linux/types.h>
+
+ struct l_dhcp6_client;
+
+--
+2.25.1
+
diff --git a/meta/recipes-core/ell/ell/0001-Fix-the-bug-caused-by-using-functions-not-provided-b.patch b/meta/recipes-core/ell/ell/0001-Fix-the-bug-caused-by-using-functions-not-provided-b.patch
new file mode 100644
index 0000000000..da0018a8df
--- /dev/null
+++ b/meta/recipes-core/ell/ell/0001-Fix-the-bug-caused-by-using-functions-not-provided-b.patch
@@ -0,0 +1,26 @@
+Subject: [PATCH] Fix the bug caused by using functions not provided by musl.
+
+Fix the following error:
+/usr/src/debug/ell/0.35-r0/build/../ell-0.35/ell/pem.c:227: undefined reference to `rawmemchr'
+
+Signed-off-by: Zang Ruochen <zangrc.fnst@cn.fujitsu.com>
+---
+ ell/pem.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/ell/pem.c b/ell/pem.c
+index 790f2c2..27d47a0 100644
+--- a/ell/pem.c
++++ b/ell/pem.c
+@@ -224,7 +224,7 @@ static uint8_t *pem_load_buffer(const void *buf, size_t buf_len,
+
+ /* Check that each header line has a key and a colon */
+ while (start < end) {
+- const char *lf = rawmemchr(start, '\n');
++ const char *lf = strchr(start, '\n');
+ const char *colon = memchr(start, ':', lf - start);
+
+ if (!colon)
+--
+2.25.1
+
diff --git a/meta/recipes-core/ell/ell_0.33.bb b/meta/recipes-core/ell/ell_0.35.bb
similarity index 70%
rename from meta/recipes-core/ell/ell_0.33.bb
rename to meta/recipes-core/ell/ell_0.35.bb
index 2fa05104fb..718b01f5cb 100644
--- a/meta/recipes-core/ell/ell_0.33.bb
+++ b/meta/recipes-core/ell/ell_0.35.bb
@@ -13,8 +13,13 @@ DEPENDS = "dbus"
inherit autotools pkgconfig
-SRC_URI = "https://mirrors.edge.kernel.org/pub/linux/libs/${BPN}/${BPN}-${PV}.tar.xz"
-SRC_URI[sha256sum] = "d9e40e641164150394b74b719b9726fc734f24b2cde679cf5f3be6915c34eded"
+SRC_URI = "https://mirrors.edge.kernel.org/pub/linux/libs/${BPN}/${BPN}-${PV}.tar.xz \
+ file://0001-Fix-bug-caused-by-missing-types.h-file.patch \
+"
+
+SRC_URI_append_libc-musl = "file://0001-Fix-the-bug-caused-by-using-functions-not-provided-b.patch"
+
+SRC_URI[sha256sum] = "2bfe9da7781f65f1cb1595a5a068a3ae74d4b68b74f287c6f0c892cfe623913f"
do_configure_prepend () {
mkdir -p ${S}/build-aux
--
2.25.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [OE-core] [PATCH] ell: upgrade 0.33 -> 0.35
2020-12-25 1:30 [OE-core] [PATCH] ell: upgrade 0.33 -> 0.35 zangrc
@ 2020-12-25 3:42 ` Khem Raj
2020-12-25 7:41 ` Alexander Kanavin
0 siblings, 1 reply; 3+ messages in thread
From: Khem Raj @ 2020-12-25 3:42 UTC (permalink / raw)
To: zangrc, openembedded-core
On 12/24/20 5:30 PM, zangrc wrote:
> Add the following patch to solve the compilation error when using musl:
> 0001-Fix-bug-caused-by-missing-types.h-file.patch
> 0001-Fix-the-bug-caused-by-using-functions-not-provided-b.patch
>
> Signed-off-by: Zang Ruochen <zangrc.fnst@cn.fujitsu.com>
> ---
> ...x-bug-caused-by-missing-types.h-file.patch | 48 +++++++++++++++++++
> ...ed-by-using-functions-not-provided-b.patch | 26 ++++++++++
> .../ell/{ell_0.33.bb => ell_0.35.bb} | 9 +++-
> 3 files changed, 81 insertions(+), 2 deletions(-)
> create mode 100644 meta/recipes-core/ell/ell/0001-Fix-bug-caused-by-missing-types.h-file.patch
> create mode 100644 meta/recipes-core/ell/ell/0001-Fix-the-bug-caused-by-using-functions-not-provided-b.patch
> rename meta/recipes-core/ell/{ell_0.33.bb => ell_0.35.bb} (70%)
>
> diff --git a/meta/recipes-core/ell/ell/0001-Fix-bug-caused-by-missing-types.h-file.patch b/meta/recipes-core/ell/ell/0001-Fix-bug-caused-by-missing-types.h-file.patch
> new file mode 100644
> index 0000000000..6f26ec4e7d
> --- /dev/null
> +++ b/meta/recipes-core/ell/ell/0001-Fix-bug-caused-by-missing-types.h-file.patch
> @@ -0,0 +1,48 @@
> +Subject: [PATCH] Fix bug caused by missing types.h file.
> +
> +Fix the following error:
> +../ell-0.35/ell/dhcp-private.h:75:2: error: unknown type name '__be32'
> +| 75 | __be32 xid;
> +| | ^~~~~~
> +| ../ell-0.35/ell/dhcp-private.h:76:2: error: unknown type name '__be16'
> +| 76 | __be16 secs;
> +| | ^~~~~~
> +| ../ell-0.35/ell/dhcp-private.h:77:2: error: unknown type name '__be16'
> +| 77 | __be16 flags;
> +| | ^~~~~~
> +| ../ell-0.35/ell/dhcp-private.h:85:2: error: unknown type name '__be32'
> +| 85 | __be32 magic;
> +
> +Signed-off-by: Zang Ruochen <zangrc.fnst@cn.fujitsu.com>
> +---
> + ell/dhcp-private.h | 1 +
> + ell/dhcp6-private.h | 1 +
> + 2 files changed, 2 insertions(+)
> +
> +diff --git a/ell/dhcp-private.h b/ell/dhcp-private.h
> +index 204e54e..b418535 100644
> +--- a/ell/dhcp-private.h
> ++++ b/ell/dhcp-private.h
> +@@ -19,6 +19,7 @@
> + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
> + *
> + */
> ++#include <linux/types.h>
> +
> + struct l_dhcp_client;
> + struct l_dhcp_server;
> +diff --git a/ell/dhcp6-private.h b/ell/dhcp6-private.h
> +index 2bbd1d3..14dd85c 100644
> +--- a/ell/dhcp6-private.h
> ++++ b/ell/dhcp6-private.h
> +@@ -19,6 +19,7 @@
> + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
> + *
> + */
> ++#include <linux/types.h>
> +
> + struct l_dhcp6_client;
> +
> +--
> +2.25.1
> +
> diff --git a/meta/recipes-core/ell/ell/0001-Fix-the-bug-caused-by-using-functions-not-provided-b.patch b/meta/recipes-core/ell/ell/0001-Fix-the-bug-caused-by-using-functions-not-provided-b.patch
> new file mode 100644
> index 0000000000..da0018a8df
> --- /dev/null
> +++ b/meta/recipes-core/ell/ell/0001-Fix-the-bug-caused-by-using-functions-not-provided-b.patch
> @@ -0,0 +1,26 @@
> +Subject: [PATCH] Fix the bug caused by using functions not provided by musl.
> +
> +Fix the following error:
> +/usr/src/debug/ell/0.35-r0/build/../ell-0.35/ell/pem.c:227: undefined reference to `rawmemchr'
> +
> +Signed-off-by: Zang Ruochen <zangrc.fnst@cn.fujitsu.com>
> +---
> + ell/pem.c | 2 +-
> + 1 file changed, 1 insertion(+), 1 deletion(-)
> +
> +diff --git a/ell/pem.c b/ell/pem.c
> +index 790f2c2..27d47a0 100644
> +--- a/ell/pem.c
> ++++ b/ell/pem.c
> +@@ -224,7 +224,7 @@ static uint8_t *pem_load_buffer(const void *buf, size_t buf_len,
> +
> + /* Check that each header line has a key and a colon */
> + while (start < end) {
> +- const char *lf = rawmemchr(start, '\n');
> ++ const char *lf = strchr(start, '\n');
Lets make this patch like below
#if defined(__GLIBC__)
const char *lf = rawmemchr(start, '\n');
#else
const char *lf = memchr(start, '\n', end - start);
#endif
> + const char *colon = memchr(start, ':', lf - start);
> +
> + if (!colon)
> +--
> +2.25.1
> +
> diff --git a/meta/recipes-core/ell/ell_0.33.bb b/meta/recipes-core/ell/ell_0.35.bb
> similarity index 70%
> rename from meta/recipes-core/ell/ell_0.33.bb
> rename to meta/recipes-core/ell/ell_0.35.bb
> index 2fa05104fb..718b01f5cb 100644
> --- a/meta/recipes-core/ell/ell_0.33.bb
> +++ b/meta/recipes-core/ell/ell_0.35.bb
> @@ -13,8 +13,13 @@ DEPENDS = "dbus"
>
> inherit autotools pkgconfig
>
> -SRC_URI = "https://mirrors.edge.kernel.org/pub/linux/libs/${BPN}/${BPN}-${PV}.tar.xz"
> -SRC_URI[sha256sum] = "d9e40e641164150394b74b719b9726fc734f24b2cde679cf5f3be6915c34eded"
> +SRC_URI = "https://mirrors.edge.kernel.org/pub/linux/libs/${BPN}/${BPN}-${PV}.tar.xz \
> + file://0001-Fix-bug-caused-by-missing-types.h-file.patch \
> +"
> +
> +SRC_URI_append_libc-musl = "file://0001-Fix-the-bug-caused-by-using-functions-not-provided-b.patch"
Provided the patch is done like I mentioned this patch is not needed to
be musl specific anymore.
> +
> +SRC_URI[sha256sum] = "2bfe9da7781f65f1cb1595a5a068a3ae74d4b68b74f287c6f0c892cfe623913f"
>
> do_configure_prepend () {
> mkdir -p ${S}/build-aux
>
>
>
>
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [OE-core] [PATCH] ell: upgrade 0.33 -> 0.35
2020-12-25 3:42 ` Khem Raj
@ 2020-12-25 7:41 ` Alexander Kanavin
0 siblings, 0 replies; 3+ messages in thread
From: Alexander Kanavin @ 2020-12-25 7:41 UTC (permalink / raw)
To: Khem Raj; +Cc: openembedded-core, zangrc
[-- Attachment #1: Type: text/plain, Size: 5954 bytes --]
Also, don’t forget upstream-status please. The missing header patch can be
backported, which is preferred.
Alex
On Fri 25. Dec 2020 at 4.42, Khem Raj <raj.khem@gmail.com> wrote:
>
>
> On 12/24/20 5:30 PM, zangrc wrote:
> > Add the following patch to solve the compilation error when using musl:
> > 0001-Fix-bug-caused-by-missing-types.h-file.patch
> > 0001-Fix-the-bug-caused-by-using-functions-not-provided-b.patch
> >
> > Signed-off-by: Zang Ruochen <zangrc.fnst@cn.fujitsu.com>
> > ---
> > ...x-bug-caused-by-missing-types.h-file.patch | 48 +++++++++++++++++++
> > ...ed-by-using-functions-not-provided-b.patch | 26 ++++++++++
> > .../ell/{ell_0.33.bb => ell_0.35.bb} | 9 +++-
> > 3 files changed, 81 insertions(+), 2 deletions(-)
> > create mode 100644
> meta/recipes-core/ell/ell/0001-Fix-bug-caused-by-missing-types.h-file.patch
> > create mode 100644
> meta/recipes-core/ell/ell/0001-Fix-the-bug-caused-by-using-functions-not-provided-b.patch
> > rename meta/recipes-core/ell/{ell_0.33.bb => ell_0.35.bb} (70%)
> >
> > diff --git
> a/meta/recipes-core/ell/ell/0001-Fix-bug-caused-by-missing-types.h-file.patch
> b/meta/recipes-core/ell/ell/0001-Fix-bug-caused-by-missing-types.h-file.patch
> > new file mode 100644
> > index 0000000000..6f26ec4e7d
> > --- /dev/null
> > +++
> b/meta/recipes-core/ell/ell/0001-Fix-bug-caused-by-missing-types.h-file.patch
> > @@ -0,0 +1,48 @@
> > +Subject: [PATCH] Fix bug caused by missing types.h file.
> > +
> > +Fix the following error:
> > +../ell-0.35/ell/dhcp-private.h:75:2: error: unknown type name '__be32'
> > +| 75 | __be32 xid;
> > +| | ^~~~~~
> > +| ../ell-0.35/ell/dhcp-private.h:76:2: error: unknown type name '__be16'
> > +| 76 | __be16 secs;
> > +| | ^~~~~~
> > +| ../ell-0.35/ell/dhcp-private.h:77:2: error: unknown type name '__be16'
> > +| 77 | __be16 flags;
> > +| | ^~~~~~
> > +| ../ell-0.35/ell/dhcp-private.h:85:2: error: unknown type name '__be32'
> > +| 85 | __be32 magic;
> > +
> > +Signed-off-by: Zang Ruochen <zangrc.fnst@cn.fujitsu.com>
> > +---
> > + ell/dhcp-private.h | 1 +
> > + ell/dhcp6-private.h | 1 +
> > + 2 files changed, 2 insertions(+)
> > +
> > +diff --git a/ell/dhcp-private.h b/ell/dhcp-private.h
> > +index 204e54e..b418535 100644
> > +--- a/ell/dhcp-private.h
> > ++++ b/ell/dhcp-private.h
> > +@@ -19,6 +19,7 @@
> > + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
> 02110-1301 USA
> > + *
> > + */
> > ++#include <linux/types.h>
> > +
> > + struct l_dhcp_client;
> > + struct l_dhcp_server;
> > +diff --git a/ell/dhcp6-private.h b/ell/dhcp6-private.h
> > +index 2bbd1d3..14dd85c 100644
> > +--- a/ell/dhcp6-private.h
> > ++++ b/ell/dhcp6-private.h
> > +@@ -19,6 +19,7 @@
> > + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
> 02110-1301 USA
> > + *
> > + */
> > ++#include <linux/types.h>
> > +
> > + struct l_dhcp6_client;
> > +
> > +--
> > +2.25.1
> > +
> > diff --git
> a/meta/recipes-core/ell/ell/0001-Fix-the-bug-caused-by-using-functions-not-provided-b.patch
> b/meta/recipes-core/ell/ell/0001-Fix-the-bug-caused-by-using-functions-not-provided-b.patch
> > new file mode 100644
> > index 0000000000..da0018a8df
> > --- /dev/null
> > +++
> b/meta/recipes-core/ell/ell/0001-Fix-the-bug-caused-by-using-functions-not-provided-b.patch
> > @@ -0,0 +1,26 @@
> > +Subject: [PATCH] Fix the bug caused by using functions not provided by
> musl.
> > +
> > +Fix the following error:
> > +/usr/src/debug/ell/0.35-r0/build/../ell-0.35/ell/pem.c:227: undefined
> reference to `rawmemchr'
> > +
> > +Signed-off-by: Zang Ruochen <zangrc.fnst@cn.fujitsu.com>
> > +---
> > + ell/pem.c | 2 +-
> > + 1 file changed, 1 insertion(+), 1 deletion(-)
> > +
> > +diff --git a/ell/pem.c b/ell/pem.c
> > +index 790f2c2..27d47a0 100644
> > +--- a/ell/pem.c
> > ++++ b/ell/pem.c
> > +@@ -224,7 +224,7 @@ static uint8_t *pem_load_buffer(const void *buf,
> size_t buf_len,
> > +
> > + /* Check that each header line has a key and a colon */
> > + while (start < end) {
> > +- const char *lf = rawmemchr(start, '\n');
> > ++ const char *lf = strchr(start, '\n');
>
> Lets make this patch like below
>
> #if defined(__GLIBC__)
> const char *lf = rawmemchr(start, '\n');
> #else
> const char *lf = memchr(start, '\n', end - start);
> #endif
>
>
> > + const char *colon = memchr(start, ':', lf - start);
> > +
> > + if (!colon)
> > +--
> > +2.25.1
> > +
> > diff --git a/meta/recipes-core/ell/ell_0.33.bb b/meta/recipes-core/ell/
> ell_0.35.bb
> > similarity index 70%
> > rename from meta/recipes-core/ell/ell_0.33.bb
> > rename to meta/recipes-core/ell/ell_0.35.bb
> > index 2fa05104fb..718b01f5cb 100644
> > --- a/meta/recipes-core/ell/ell_0.33.bb
> > +++ b/meta/recipes-core/ell/ell_0.35.bb
> > @@ -13,8 +13,13 @@ DEPENDS = "dbus"
> >
> > inherit autotools pkgconfig
> >
> > -SRC_URI = "
> https://mirrors.edge.kernel.org/pub/linux/libs/${BPN}/${BPN}-${PV}.tar.xz"
> > -SRC_URI[sha256sum] =
> "d9e40e641164150394b74b719b9726fc734f24b2cde679cf5f3be6915c34eded"
> > +SRC_URI = "
> https://mirrors.edge.kernel.org/pub/linux/libs/${BPN}/${BPN}-${PV}.tar.xz
> \
> > + file://0001-Fix-bug-caused-by-missing-types.h-file.patch \
> > +"
> > +
> > +SRC_URI_append_libc-musl =
> "file://0001-Fix-the-bug-caused-by-using-functions-not-provided-b.patch"
>
> Provided the patch is done like I mentioned this patch is not needed to
> be musl specific anymore.
>
> > +
> > +SRC_URI[sha256sum] =
> "2bfe9da7781f65f1cb1595a5a068a3ae74d4b68b74f287c6f0c892cfe623913f"
> >
> > do_configure_prepend () {
> > mkdir -p ${S}/build-aux
> >
> >
> >
> >
> >
>
>
>
>
[-- Attachment #2: Type: text/html, Size: 8422 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-12-25 8:12 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-25 1:30 [OE-core] [PATCH] ell: upgrade 0.33 -> 0.35 zangrc
2020-12-25 3:42 ` Khem Raj
2020-12-25 7:41 ` Alexander Kanavin
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.