* [Buildroot] [PATCH 1/2] mtd: fix musl build issue
@ 2016-08-12 18:15 Rahul Bedarkar
2016-08-12 18:15 ` [Buildroot] [PATCH 2/2] wayland: " Rahul Bedarkar
0 siblings, 1 reply; 5+ messages in thread
From: Rahul Bedarkar @ 2016-08-12 18:15 UTC (permalink / raw)
To: buildroot
With musl C library, we get following build error
integck.c:37:28: fatal error: bits/stdio_lim.h: No such file or directory
#include <bits/stdio_lim.h>
^
compilation terminated.
make[2]: *** [integck] Error 1
Header <bits/stdio_lim.h> is not available in musl C library. However
<stdio.h> has all definition that <bits/stdio_lim.h> supposed to be
providing. Moreover <bits/stdio_lim.h> shouldn't be included directly
instead we should be using <stdio.h>.
Since we already include <stdio.h> and in case of uClibc or glibc
<bits/stdio_lim.h> gets included internally, we can safely remove it.
Fixes:
http://autobuild.buildroot.net/results/175/1754861457af520480cc34d7d2d0edff2868ff66/
Signed-off-by: Rahul Bedarkar <rahul.bedarkar@imgtec.com>
---
| 45 ++++++++++++++++++++++
1 file changed, 45 insertions(+)
create mode 100644 package/mtd/0003-fs-tests-integrity-don-t-include-header-bits-stdio_l.patch
--git a/package/mtd/0003-fs-tests-integrity-don-t-include-header-bits-stdio_l.patch b/package/mtd/0003-fs-tests-integrity-don-t-include-header-bits-stdio_l.patch
new file mode 100644
index 0000000..5c0a552
--- /dev/null
+++ b/package/mtd/0003-fs-tests-integrity-don-t-include-header-bits-stdio_l.patch
@@ -0,0 +1,45 @@
+From 600ab10e3b452cdffc6c82770b0bb2ff5c23ad70 Mon Sep 17 00:00:00 2001
+From: Rahul Bedarkar <rahul.bedarkar@imgtec.com>
+Date: Fri, 12 Aug 2016 22:59:35 +0530
+Subject: [PATCH 1/1] fs-tests: integrity: don't include header
+ <bits/stdio_lim.h>
+
+With musl C library, we get following build error
+
+integck.c:37:28: fatal error: bits/stdio_lim.h: No such file or directory
+ #include <bits/stdio_lim.h>
+ ^
+compilation terminated.
+make[2]: *** [integck] Error 1
+
+Header <bits/stdio_lim.h> is not available in musl C library. However
+<stdio.h> has all definition that <bits/stdio_lim.h> supposed to be
+providing. Moreover <bits/stdio_lim.h> shouldn't be included directly
+instead we should be using <stdio.h>.
+
+Since we already include <stdio.h> and in case of uClibc or glibc
+<bits/stdio_lim.h> gets included internally, we can safely remove it.
+
+This build issue is found by Buildroot autobuilder
+http://autobuild.buildroot.net/results/175/1754861457af520480cc34d7d2d0edff2868ff66/
+
+Signed-off-by: Rahul Bedarkar <rahul.bedarkar@imgtec.com>
+---
+ tests/fs-tests/integrity/integck.c | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/tests/fs-tests/integrity/integck.c b/tests/fs-tests/integrity/integck.c
+index 6ef817e..0bb9711 100644
+--- a/tests/fs-tests/integrity/integck.c
++++ b/tests/fs-tests/integrity/integck.c
+@@ -34,7 +34,6 @@
+ #ifdef INTEGCK_DEBUG
+ #include <execinfo.h>
+ #endif
+-#include <bits/stdio_lim.h>
+ #include <sys/mman.h>
+ #include <sys/vfs.h>
+ #include <sys/mount.h>
+--
+2.6.2
+
--
2.6.2
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [Buildroot] [PATCH 2/2] wayland: fix musl build issue
2016-08-12 18:15 [Buildroot] [PATCH 1/2] mtd: fix musl build issue Rahul Bedarkar
@ 2016-08-12 18:15 ` Rahul Bedarkar
2016-08-13 2:08 ` Khem Raj
2016-08-14 14:26 ` Yann E. MORIN
0 siblings, 2 replies; 5+ messages in thread
From: Rahul Bedarkar @ 2016-08-12 18:15 UTC (permalink / raw)
To: buildroot
With musl C library, we see following build failure.
src/scanner.c: In function 'find_enumeration':
src/scanner.c:811:2: error: unknown type name 'uint'
uint idx = 0, j;
^
uint is defined in <sys/types.h> header. It is usually included by <stdlib.h>
but in musl stdlib.h doesn't include it.
In scanner.c, <expat.h> includes <stdlib.h> then it includes <sys/types.h> in
case of other C libraries. <sys/types.h> from musl defines uint only if
_GNU_SOURCE or _BSD_SOURCE is defined. Instead of including <sys/types.h> and
defining either _GNU_SOURCE or _BSD_SOURCE, use unsigned int instead of uint.
Fixes:
http://autobuild.buildroot.net/results/fcf/fcf6dd3bd31f92eadbcae17338e5887a23e43ff9/
Signed-off-by: Rahul Bedarkar <rahul.bedarkar@imgtec.com>
---
.../0002-use-unsigned-int-instead-of-uint.patch | 33 ++++++++++++++++++++++
1 file changed, 33 insertions(+)
create mode 100644 package/wayland/0002-use-unsigned-int-instead-of-uint.patch
diff --git a/package/wayland/0002-use-unsigned-int-instead-of-uint.patch b/package/wayland/0002-use-unsigned-int-instead-of-uint.patch
new file mode 100644
index 0000000..0f649e2
--- /dev/null
+++ b/package/wayland/0002-use-unsigned-int-instead-of-uint.patch
@@ -0,0 +1,33 @@
+scanner: use unsigned int instead of uint
+
+With musl C library, we see following build failure.
+
+src/scanner.c: In function 'find_enumeration':
+src/scanner.c:811:2: error: unknown type name 'uint'
+ uint idx = 0, j;
+ ^
+
+uint is defined in <sys/types.h> header. It is usually included by <stdlib.h>
+but in musl stdlib.h doesn't include it.
+
+In scanner.c, <expat.h> includes <stdlib.h> then it includes <sys/types.h> in
+case of other C libraries. <sys/types.h> from musl defines uint only if
+_GNU_SOURCE or _BSD_SOURCE is defined. Instead of including <sys/types.h> and
+defining either _GNU_SOURCE or _BSD_SOURCE, use unsigned int instead of uint.
+
+This build issue is found by Buildroot autobuilder
+http://autobuild.buildroot.net/results/fcf/fcf6dd3bd31f92eadbcae17338e5887a23e43ff9/
+
+Signed-off-by: Rahul Bedarkar <rahul.bedarkar@imgtec.com>
+
+--- wayland-1.11.0/src/scanner.c.old 2016-08-12 23:19:39.944279494 +0530
++++ wayland-1.11.0/src/scanner.c 2016-08-12 23:19:57.236279457 +0530
+@@ -808,7 +808,7 @@ find_enumeration(struct protocol *protoc
+ struct interface *i;
+ struct enumeration *e;
+ char *enum_name;
+- uint idx = 0, j;
++ unsigned int idx = 0, j;
+
+ for (j = 0; j + 1 < strlen(enum_attribute); j++) {
+ if (enum_attribute[j] == '.') {
--
2.6.2
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [Buildroot] [PATCH 2/2] wayland: fix musl build issue
2016-08-12 18:15 ` [Buildroot] [PATCH 2/2] wayland: " Rahul Bedarkar
@ 2016-08-13 2:08 ` Khem Raj
2016-08-14 14:26 ` Yann E. MORIN
1 sibling, 0 replies; 5+ messages in thread
From: Khem Raj @ 2016-08-13 2:08 UTC (permalink / raw)
To: buildroot
On Fri, Aug 12, 2016 at 11:15 AM, Rahul Bedarkar
<rahul.bedarkar@imgtec.com> wrote:
> With musl C library, we see following build failure.
>
> src/scanner.c: In function 'find_enumeration':
> src/scanner.c:811:2: error: unknown type name 'uint'
> uint idx = 0, j;
> ^
>
> uint is defined in <sys/types.h> header. It is usually included by <stdlib.h>
> but in musl stdlib.h doesn't include it.
>
> In scanner.c, <expat.h> includes <stdlib.h> then it includes <sys/types.h> in
> case of other C libraries. <sys/types.h> from musl defines uint only if
> _GNU_SOURCE or _BSD_SOURCE is defined. Instead of including <sys/types.h> and
> defining either _GNU_SOURCE or _BSD_SOURCE, use unsigned int instead of uint.
>
you might backport the upstreamed fix instead
https://cgit.freedesktop.org/wayland/wayland/commit/?id=6750b47d9e0d3074d2e56aa36c476493f533d696
> Fixes:
>
> http://autobuild.buildroot.net/results/fcf/fcf6dd3bd31f92eadbcae17338e5887a23e43ff9/
>
> Signed-off-by: Rahul Bedarkar <rahul.bedarkar@imgtec.com>
> ---
> .../0002-use-unsigned-int-instead-of-uint.patch | 33 ++++++++++++++++++++++
> 1 file changed, 33 insertions(+)
> create mode 100644 package/wayland/0002-use-unsigned-int-instead-of-uint.patch
>
> diff --git a/package/wayland/0002-use-unsigned-int-instead-of-uint.patch b/package/wayland/0002-use-unsigned-int-instead-of-uint.patch
> new file mode 100644
> index 0000000..0f649e2
> --- /dev/null
> +++ b/package/wayland/0002-use-unsigned-int-instead-of-uint.patch
> @@ -0,0 +1,33 @@
> +scanner: use unsigned int instead of uint
> +
> +With musl C library, we see following build failure.
> +
> +src/scanner.c: In function 'find_enumeration':
> +src/scanner.c:811:2: error: unknown type name 'uint'
> + uint idx = 0, j;
> + ^
> +
> +uint is defined in <sys/types.h> header. It is usually included by <stdlib.h>
> +but in musl stdlib.h doesn't include it.
> +
> +In scanner.c, <expat.h> includes <stdlib.h> then it includes <sys/types.h> in
> +case of other C libraries. <sys/types.h> from musl defines uint only if
> +_GNU_SOURCE or _BSD_SOURCE is defined. Instead of including <sys/types.h> and
> +defining either _GNU_SOURCE or _BSD_SOURCE, use unsigned int instead of uint.
> +
> +This build issue is found by Buildroot autobuilder
> +http://autobuild.buildroot.net/results/fcf/fcf6dd3bd31f92eadbcae17338e5887a23e43ff9/
> +
> +Signed-off-by: Rahul Bedarkar <rahul.bedarkar@imgtec.com>
> +
> +--- wayland-1.11.0/src/scanner.c.old 2016-08-12 23:19:39.944279494 +0530
> ++++ wayland-1.11.0/src/scanner.c 2016-08-12 23:19:57.236279457 +0530
> +@@ -808,7 +808,7 @@ find_enumeration(struct protocol *protoc
> + struct interface *i;
> + struct enumeration *e;
> + char *enum_name;
> +- uint idx = 0, j;
> ++ unsigned int idx = 0, j;
> +
> + for (j = 0; j + 1 < strlen(enum_attribute); j++) {
> + if (enum_attribute[j] == '.') {
> --
> 2.6.2
>
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Buildroot] [PATCH 2/2] wayland: fix musl build issue
2016-08-12 18:15 ` [Buildroot] [PATCH 2/2] wayland: " Rahul Bedarkar
2016-08-13 2:08 ` Khem Raj
@ 2016-08-14 14:26 ` Yann E. MORIN
2016-08-15 5:37 ` Rahul Bedarkar
1 sibling, 1 reply; 5+ messages in thread
From: Yann E. MORIN @ 2016-08-14 14:26 UTC (permalink / raw)
To: buildroot
Rahul, All,
On 2016-08-12 23:45 +0530, Rahul Bedarkar spake thusly:
> With musl C library, we see following build failure.
>
> src/scanner.c: In function 'find_enumeration':
> src/scanner.c:811:2: error: unknown type name 'uint'
> uint idx = 0, j;
> ^
>
> uint is defined in <sys/types.h> header. It is usually included by <stdlib.h>
> but in musl stdlib.h doesn't include it.
As commented by Khem, there is an upstream patch, so it's better to
backport it.
Consequently, I've marked this as "Changes Requested" in our Patchwork.
Care to respin, please? Thanks!
Regards,
Yann E. MORIN.
> In scanner.c, <expat.h> includes <stdlib.h> then it includes <sys/types.h> in
> case of other C libraries. <sys/types.h> from musl defines uint only if
> _GNU_SOURCE or _BSD_SOURCE is defined. Instead of including <sys/types.h> and
> defining either _GNU_SOURCE or _BSD_SOURCE, use unsigned int instead of uint.
>
> Fixes:
>
> http://autobuild.buildroot.net/results/fcf/fcf6dd3bd31f92eadbcae17338e5887a23e43ff9/
>
> Signed-off-by: Rahul Bedarkar <rahul.bedarkar@imgtec.com>
> ---
> .../0002-use-unsigned-int-instead-of-uint.patch | 33 ++++++++++++++++++++++
> 1 file changed, 33 insertions(+)
> create mode 100644 package/wayland/0002-use-unsigned-int-instead-of-uint.patch
>
> diff --git a/package/wayland/0002-use-unsigned-int-instead-of-uint.patch b/package/wayland/0002-use-unsigned-int-instead-of-uint.patch
> new file mode 100644
> index 0000000..0f649e2
> --- /dev/null
> +++ b/package/wayland/0002-use-unsigned-int-instead-of-uint.patch
> @@ -0,0 +1,33 @@
> +scanner: use unsigned int instead of uint
> +
> +With musl C library, we see following build failure.
> +
> +src/scanner.c: In function 'find_enumeration':
> +src/scanner.c:811:2: error: unknown type name 'uint'
> + uint idx = 0, j;
> + ^
> +
> +uint is defined in <sys/types.h> header. It is usually included by <stdlib.h>
> +but in musl stdlib.h doesn't include it.
> +
> +In scanner.c, <expat.h> includes <stdlib.h> then it includes <sys/types.h> in
> +case of other C libraries. <sys/types.h> from musl defines uint only if
> +_GNU_SOURCE or _BSD_SOURCE is defined. Instead of including <sys/types.h> and
> +defining either _GNU_SOURCE or _BSD_SOURCE, use unsigned int instead of uint.
> +
> +This build issue is found by Buildroot autobuilder
> +http://autobuild.buildroot.net/results/fcf/fcf6dd3bd31f92eadbcae17338e5887a23e43ff9/
> +
> +Signed-off-by: Rahul Bedarkar <rahul.bedarkar@imgtec.com>
> +
> +--- wayland-1.11.0/src/scanner.c.old 2016-08-12 23:19:39.944279494 +0530
> ++++ wayland-1.11.0/src/scanner.c 2016-08-12 23:19:57.236279457 +0530
> +@@ -808,7 +808,7 @@ find_enumeration(struct protocol *protoc
> + struct interface *i;
> + struct enumeration *e;
> + char *enum_name;
> +- uint idx = 0, j;
> ++ unsigned int idx = 0, j;
> +
> + for (j = 0; j + 1 < strlen(enum_attribute); j++) {
> + if (enum_attribute[j] == '.') {
> --
> 2.6.2
>
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
--
.-----------------.--------------------.------------------.--------------------.
| 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. |
'------------------------------^-------^------------------^--------------------'
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Buildroot] [PATCH 2/2] wayland: fix musl build issue
2016-08-14 14:26 ` Yann E. MORIN
@ 2016-08-15 5:37 ` Rahul Bedarkar
0 siblings, 0 replies; 5+ messages in thread
From: Rahul Bedarkar @ 2016-08-15 5:37 UTC (permalink / raw)
To: buildroot
Hi,
On Sunday 14 August 2016 07:56 PM, Yann E. MORIN wrote:
> Rahul, All,
>
> On 2016-08-12 23:45 +0530, Rahul Bedarkar spake thusly:
>> With musl C library, we see following build failure.
>>
>> src/scanner.c: In function 'find_enumeration':
>> src/scanner.c:811:2: error: unknown type name 'uint'
>> uint idx = 0, j;
>> ^
>>
>> uint is defined in <sys/types.h> header. It is usually included by <stdlib.h>
>> but in musl stdlib.h doesn't include it.
>
> As commented by Khem, there is an upstream patch, so it's better to
> backport it.
>
> Consequently, I've marked this as "Changes Requested" in our Patchwork.
>
> Care to respin, please? Thanks!
Thanks Yann, Khem,
I will send v2.
Regards,
Rahul
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2016-08-15 5:37 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-08-12 18:15 [Buildroot] [PATCH 1/2] mtd: fix musl build issue Rahul Bedarkar
2016-08-12 18:15 ` [Buildroot] [PATCH 2/2] wayland: " Rahul Bedarkar
2016-08-13 2:08 ` Khem Raj
2016-08-14 14:26 ` Yann E. MORIN
2016-08-15 5:37 ` Rahul Bedarkar
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox