All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] rpi-userland: Add patches to fix compilation with musl libc
@ 2014-09-12  1:45 Maarten ter Huurne
  2014-09-12  7:32 ` Thomas Petazzoni
  0 siblings, 1 reply; 17+ messages in thread
From: Maarten ter Huurne @ 2014-09-12  1:45 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Maarten ter Huurne <maarten@treewalker.org>
---
 .../rpi-userland-003-disable-timer_t-typedef.patch | 22 ++++++++++++++++++++++
 .../rpi-userland-004-include-for-HZ.patch          | 19 +++++++++++++++++++
 ...land-005-do-not-check-__USE_FILE_OFFSET64.patch | 16 ++++++++++++++++
 package/rpi-userland/rpi-userland-006-mode_t.patch | 13 +++++++++++++
 4 files changed, 70 insertions(+)
 create mode 100644 package/rpi-userland/rpi-userland-003-disable-timer_t-typedef.patch
 create mode 100644 package/rpi-userland/rpi-userland-004-include-for-HZ.patch
 create mode 100644 package/rpi-userland/rpi-userland-005-do-not-check-__USE_FILE_OFFSET64.patch
 create mode 100644 package/rpi-userland/rpi-userland-006-mode_t.patch

diff --git a/package/rpi-userland/rpi-userland-003-disable-timer_t-typedef.patch b/package/rpi-userland/rpi-userland-003-disable-timer_t-typedef.patch
new file mode 100644
index 0000000..e51a93f
--- /dev/null
+++ b/package/rpi-userland/rpi-userland-003-disable-timer_t-typedef.patch
@@ -0,0 +1,22 @@
+I don't know which platform is missing the timer_t definition, but it would
+be better to check for that platform specifically instead of explicitly
+excluding platforms that do have it.
+
+This fixes compilation with musl libc, which does define timer_t but does
+not define __timer_t.
+
+Note that _HAVE_TIMER_T suggests it would prevent breakage, but it is
+unrealistic to expect every application to set that macro. Not even all CMake
+files in the userland package itself set it...
+
+--- userland-f9e6f9f3def8dc18dc0092cd695ccf53b8ba3efe.org/interface/vcos/pthreads/vcos_platform.h	2014-08-05 19:43:53.000000000 +0200
++++ rpi-userland-f9e6f9f3def8dc18dc0092cd695ccf53b8ba3efe/interface/vcos/pthreads/vcos_platform.h	2014-09-11 21:04:36.418943953 +0200
+@@ -120,7 +120,7 @@
+ 
+ #define VCOS_ONCE_INIT        PTHREAD_ONCE_INIT
+ 
+-#if defined(__arm__) && !defined(_HAVE_TIMER_T) && !defined(ANDROID)
++#if 0
+ typedef __timer_t timer_t;
+ #endif
+ typedef struct VCOS_TIMER_T
diff --git a/package/rpi-userland/rpi-userland-004-include-for-HZ.patch b/package/rpi-userland/rpi-userland-004-include-for-HZ.patch
new file mode 100644
index 0000000..484aebe
--- /dev/null
+++ b/package/rpi-userland/rpi-userland-004-include-for-HZ.patch
@@ -0,0 +1,19 @@
+There is no guarantee that <sys/param.h> defines HZ. And in musl libc, it
+doesn't. Since this is a Linux-specific constant, include the Linux-specific
+header for it.
+
+Note that HZ as defined by the system headers is the default value of HZ (100),
+which might differ from the actual value of HZ in the kernel config. Ideally
+userland would not use HZ at all and do all timing in milliseconds instead.
+
+--- userland-f9e6f9f3def8dc18dc0092cd695ccf53b8ba3efe.org/interface/vcos/pthreads/vcos_pthreads.c	2014-08-05 19:43:53.000000000 +0200
++++ rpi-userland-f9e6f9f3def8dc18dc0092cd695ccf53b8ba3efe/interface/vcos/pthreads/vcos_pthreads.c	2014-09-11 21:49:48.497827644 +0200
+@@ -33,7 +33,7 @@
+ #include <stdlib.h>
+ #include <stdio.h>
+ #include <sys/time.h>
+-#include <sys/param.h>
++#include <linux/param.h>
+ 
+ /* Cygwin doesn't always have prctl.h and it doesn't have PR_SET_NAME */
+ #if defined( __linux__ )
diff --git a/package/rpi-userland/rpi-userland-005-do-not-check-__USE_FILE_OFFSET64.patch b/package/rpi-userland/rpi-userland-005-do-not-check-__USE_FILE_OFFSET64.patch
new file mode 100644
index 0000000..6a1ab47
--- /dev/null
+++ b/package/rpi-userland/rpi-userland-005-do-not-check-__USE_FILE_OFFSET64.patch
@@ -0,0 +1,16 @@
+This looks like a sanity check that 64-bit file offset definitions were indeed
+provided by the included headers. But __USE_FILE_OFFSET64 is an internal
+define of glibc, so don't perform this check when compiling with a different
+libc.
+
+--- userland-f9e6f9f3def8dc18dc0092cd695ccf53b8ba3efe.org/interface/vmcs_host/linux/vcfilesys.c	2014-08-05 19:43:53.000000000 +0200
++++ rpi-userland-f9e6f9f3def8dc18dc0092cd695ccf53b8ba3efe/interface/vmcs_host/linux/vcfilesys.c	2014-09-11 22:01:51.016328294 +0200
+@@ -49,7 +49,7 @@
+ #include <ctype.h>
+ #include <limits.h>
+ 
+-#if !defined(ANDROID) && !defined( __USE_FILE_OFFSET64 )
++#if defined(__GLIBC__) && !defined( __USE_FILE_OFFSET64 )
+ #error   "__USE_FILE_OFFSET64 isn't defined"
+ #endif
+ 
diff --git a/package/rpi-userland/rpi-userland-006-mode_t.patch b/package/rpi-userland/rpi-userland-006-mode_t.patch
new file mode 100644
index 0000000..6045ade
--- /dev/null
+++ b/package/rpi-userland/rpi-userland-006-mode_t.patch
@@ -0,0 +1,13 @@
+The type of "st_mode" in "struct stat" is just "mode_t", not "__mode_t".
+
+--- userland-f9e6f9f3def8dc18dc0092cd695ccf53b8ba3efe.org/interface/vmcs_host/linux/vcfilesys.c	2014-08-05 19:43:53.000000000 +0200
++++ rpi-userland-f9e6f9f3def8dc18dc0092cd695ccf53b8ba3efe/interface/vmcs_host/linux/vcfilesys.c	2014-09-12 00:28:46.553861915 +0200
+@@ -916,7 +916,7 @@
+ 
+    if (pathbuf)
+    {
+-      __mode_t mode = 0;
++      mode_t mode = 0;
+       struct stat sb;
+ 
+       backslash_to_slash(pathbuf);
-- 
1.8.4.5

^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [Buildroot] [PATCH] rpi-userland: Add patches to fix compilation with musl libc
  2014-09-12  1:45 [Buildroot] [PATCH] rpi-userland: Add patches to fix compilation with musl libc Maarten ter Huurne
@ 2014-09-12  7:32 ` Thomas Petazzoni
  2014-09-12 14:56   ` Maarten ter Huurne
  0 siblings, 1 reply; 17+ messages in thread
From: Thomas Petazzoni @ 2014-09-12  7:32 UTC (permalink / raw)
  To: buildroot

Dear Maarten ter Huurne,

On Fri, 12 Sep 2014 03:45:39 +0200, Maarten ter Huurne wrote:
> Signed-off-by: Maarten ter Huurne <maarten@treewalker.org>
> ---
>  .../rpi-userland-003-disable-timer_t-typedef.patch | 22 ++++++++++++++++++++++
>  .../rpi-userland-004-include-for-HZ.patch          | 19 +++++++++++++++++++
>  ...land-005-do-not-check-__USE_FILE_OFFSET64.patch | 16 ++++++++++++++++
>  package/rpi-userland/rpi-userland-006-mode_t.patch | 13 +++++++++++++
>  4 files changed, 70 insertions(+)
>  create mode 100644 package/rpi-userland/rpi-userland-003-disable-timer_t-typedef.patch
>  create mode 100644 package/rpi-userland/rpi-userland-004-include-for-HZ.patch
>  create mode 100644 package/rpi-userland/rpi-userland-005-do-not-check-__USE_FILE_OFFSET64.patch
>  create mode 100644 package/rpi-userland/rpi-userland-006-mode_t.patch

Thanks. The naming of the patch files as well as the descriptions are
good, but each patch is missing a SoB line, which we require. See
http://buildroot.org/downloads/manual/manual.html#_format_and_licensing_of_the_package_patches.

> diff --git a/package/rpi-userland/rpi-userland-003-disable-timer_t-typedef.patch b/package/rpi-userland/rpi-userland-003-disable-timer_t-typedef.patch
> new file mode 100644
> index 0000000..e51a93f
> --- /dev/null
> +++ b/package/rpi-userland/rpi-userland-003-disable-timer_t-typedef.patch
> @@ -0,0 +1,22 @@
> +I don't know which platform is missing the timer_t definition, but it would
> +be better to check for that platform specifically instead of explicitly
> +excluding platforms that do have it.
> +
> +This fixes compilation with musl libc, which does define timer_t but does
> +not define __timer_t.
> +
> +Note that _HAVE_TIMER_T suggests it would prevent breakage, but it is
> +unrealistic to expect every application to set that macro. Not even all CMake
> +files in the userland package itself set it...
> +
> +--- userland-f9e6f9f3def8dc18dc0092cd695ccf53b8ba3efe.org/interface/vcos/pthreads/vcos_platform.h	2014-08-05 19:43:53.000000000 +0200
> ++++ rpi-userland-f9e6f9f3def8dc18dc0092cd695ccf53b8ba3efe/interface/vcos/pthreads/vcos_platform.h	2014-09-11 21:04:36.418943953 +0200
> +@@ -120,7 +120,7 @@
> + 
> + #define VCOS_ONCE_INIT        PTHREAD_ONCE_INIT
> + 
> +-#if defined(__arm__) && !defined(_HAVE_TIMER_T) && !defined(ANDROID)
> ++#if 0
> + typedef __timer_t timer_t;
> + #endif
> + typedef struct VCOS_TIMER_T

I'm just not entirely convinced by this one: it should be the job of
the rpi-userland build system to check for timer_t, and define
HAVE_TIMER_T accordingly. It's definitely not the job of each and every
application to set that macro, but really rpi-userland's build system.

Also, could you submit those patches upstream? We don't like much to
carry a lot of patches in Buildroot, so the more patches can be merged
upstream, the better.

Thanks a lot!

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 17+ messages in thread

* [Buildroot] [PATCH] rpi-userland: Add patches to fix compilation with musl libc
  2014-09-12  7:32 ` Thomas Petazzoni
@ 2014-09-12 14:56   ` Maarten ter Huurne
  2014-09-12 15:11     ` Thomas Petazzoni
  0 siblings, 1 reply; 17+ messages in thread
From: Maarten ter Huurne @ 2014-09-12 14:56 UTC (permalink / raw)
  To: buildroot

On Friday 12 September 2014 09:32:53 Thomas Petazzoni wrote:

> Thanks. The naming of the patch files as well as the descriptions are
> good, but each patch is missing a SoB line, which we require. See
> http://buildroot.org/downloads/manual/manual.html#_format_and_licensing_of
> _the_package_patches.

I'll add those and resubmit.

> > diff --git
> > a/package/rpi-userland/rpi-userland-003-disable-timer_t-typedef.patch
> > b/package/rpi-userland/rpi-userland-003-disable-timer_t-typedef.patch
> > new file mode 100644
> > index 0000000..e51a93f
> > --- /dev/null
> > +++
> > b/package/rpi-userland/rpi-userland-003-disable-timer_t-typedef.patch
> > @@ -0,0 +1,22 @@
> > +I don't know which platform is missing the timer_t definition, but it
> > would +be better to check for that platform specifically instead of
> > explicitly +excluding platforms that do have it.
> > +
> > +This fixes compilation with musl libc, which does define timer_t but
> > does +not define __timer_t.
> > +
> > +Note that _HAVE_TIMER_T suggests it would prevent breakage, but it is
> > +unrealistic to expect every application to set that macro. Not even all
> > CMake +files in the userland package itself set it...
> > +
> > +---
> > userland-f9e6f9f3def8dc18dc0092cd695ccf53b8ba3efe.org/interface/vcos/pt
> > hreads/vcos_platform.h	2014-08-05 19:43:53.000000000 +0200 ++++
> > rpi-userland-f9e6f9f3def8dc18dc0092cd695ccf53b8ba3efe/interface/vcos/pt
> > hreads/vcos_platform.h	2014-09-11 21:04:36.418943953 +0200 +@@ -120,7
> > +120,7 @@
> > +
> > + #define VCOS_ONCE_INIT        PTHREAD_ONCE_INIT
> > +
> > +-#if defined(__arm__) && !defined(_HAVE_TIMER_T) && !defined(ANDROID)
> > ++#if 0
> > + typedef __timer_t timer_t;
> > + #endif
> > + typedef struct VCOS_TIMER_T
> 
> I'm just not entirely convinced by this one: it should be the job of
> the rpi-userland build system to check for timer_t, and define
> HAVE_TIMER_T accordingly. It's definitely not the job of each and every
> application to set that macro, but really rpi-userland's build system.

That's what you'd expect from the HAVE_* name, but there isn't a timer_h 
check in the rpi-userland build system. There is a hardcoded "CFLAGS+=-
D_HAVE_TIMER_T" for a single application inside rpi-userland, the other 
applications don't define it.

The reason I wrote "every application" is that this header can be indirectly 
included by applications using EGL:

$ output/host/usr/bin/pkg-config --cflags egl
-I/home/mth/pi/buildroot/output/host/usr/arm-pingux-linux-
musleabihf/sysroot/usr/include/
-I/home/mth/pi/buildroot/output/host/usr/arm-pingux-linux-
musleabihf/sysroot/usr/include/interface/vcos/pthreads/
-I/home/mth/pi/buildroot/output/host/usr/arm-pingux-linux-
musleabihf/sysroot/usr/include/interface/vmcs_host/linux/

In theory -D_HAVE_TIMER_H could be added to Cflags in egl.pc, but that might 
interfere with application packages. At least in the context of Buildroot, 
where none of the supported libcs require this typedef, disabling this check 
is the safest approach, in my opinion.

Also I wonder if there really is a platform on which this typedef helps: it 
would only help on a platform that does implement POSIX timers (it's an 
optional feature), but for some reason doesn't define timer_t. It just 
doesn't sound very likely...

Looking at the header again, I see it doesn't actually use timer_t anywhere. 
In fact, nowhere in the entire rpi_userland package is timer_t used. So the 
whole check + typedef can just be removed.

> Also, could you submit those patches upstream? We don't like much to
> carry a lot of patches in Buildroot, so the more patches can be merged
> upstream, the better.

https://github.com/raspberrypi/userland/issues/202
https://github.com/raspberrypi/userland/pull/201

Bye,
		Maarten

^ permalink raw reply	[flat|nested] 17+ messages in thread

* [Buildroot] [PATCH] rpi-userland: Add patches to fix compilation with musl libc
  2014-09-12 14:56   ` Maarten ter Huurne
@ 2014-09-12 15:11     ` Thomas Petazzoni
  2014-09-12 17:01       ` Maarten ter Huurne
  0 siblings, 1 reply; 17+ messages in thread
From: Thomas Petazzoni @ 2014-09-12 15:11 UTC (permalink / raw)
  To: buildroot

Dear Maarten ter Huurne,

On Fri, 12 Sep 2014 16:56:37 +0200, Maarten ter Huurne wrote:

> That's what you'd expect from the HAVE_* name, but there isn't a timer_h 
> check in the rpi-userland build system. There is a hardcoded "CFLAGS+=-
> D_HAVE_TIMER_T" for a single application inside rpi-userland, the other 
> applications don't define it.
> 
> The reason I wrote "every application" is that this header can be indirectly 
> included by applications using EGL:
> 
> $ output/host/usr/bin/pkg-config --cflags egl
> -I/home/mth/pi/buildroot/output/host/usr/arm-pingux-linux-
> musleabihf/sysroot/usr/include/
> -I/home/mth/pi/buildroot/output/host/usr/arm-pingux-linux-
> musleabihf/sysroot/usr/include/interface/vcos/pthreads/
> -I/home/mth/pi/buildroot/output/host/usr/arm-pingux-linux-
> musleabihf/sysroot/usr/include/interface/vmcs_host/linux/
> 
> In theory -D_HAVE_TIMER_H could be added to Cflags in egl.pc, but that might 
> interfere with application packages. At least in the context of Buildroot, 
> where none of the supported libcs require this typedef, disabling this check 
> is the safest approach, in my opinion.
> 
> Also I wonder if there really is a platform on which this typedef helps: it 
> would only help on a platform that does implement POSIX timers (it's an 
> optional feature), but for some reason doesn't define timer_t. It just 
> doesn't sound very likely...
> 
> Looking at the header again, I see it doesn't actually use timer_t anywhere. 
> In fact, nowhere in the entire rpi_userland package is timer_t used. So the 
> whole check + typedef can just be removed.

Ok, thanks a lot for the explanation. Then just remove the definition,
and submit the patch upstream.

> 
> > Also, could you submit those patches upstream? We don't like much to
> > carry a lot of patches in Buildroot, so the more patches can be merged
> > upstream, the better.
> 
> https://github.com/raspberrypi/userland/issues/202
> https://github.com/raspberrypi/userland/pull/201

Great!

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 17+ messages in thread

* [Buildroot] [PATCH] rpi-userland: Add patches to fix compilation with musl libc
  2014-09-12 15:11     ` Thomas Petazzoni
@ 2014-09-12 17:01       ` Maarten ter Huurne
  2014-10-17 15:57         ` [Buildroot] [PATCH v3] rpi-userland: bump revision for musl compile fixes Maarten ter Huurne
  0 siblings, 1 reply; 17+ messages in thread
From: Maarten ter Huurne @ 2014-09-12 17:01 UTC (permalink / raw)
  To: buildroot

Also submitted upstream:
https://github.com/raspberrypi/userland/pull/201

Signed-off-by: Maarten ter Huurne <maarten@treewalker.org>
---
 .../rpi-userland-003-remove-timer_t-typedef.patch  | 58 ++++++++++++++++++++++
 .../rpi-userland-004-include-for-HZ.patch          | 35 +++++++++++++
 ...land-005-do-not-check-__USE_FILE_OFFSET64.patch | 32 ++++++++++++
 package/rpi-userland/rpi-userland-006-mode_t.patch | 28 +++++++++++
 4 files changed, 153 insertions(+)
 create mode 100644 package/rpi-userland/rpi-userland-003-remove-timer_t-typedef.patch
 create mode 100644 package/rpi-userland/rpi-userland-004-include-for-HZ.patch
 create mode 100644 package/rpi-userland/rpi-userland-005-do-not-check-__USE_FILE_OFFSET64.patch
 create mode 100644 package/rpi-userland/rpi-userland-006-mode_t.patch

diff --git a/package/rpi-userland/rpi-userland-003-remove-timer_t-typedef.patch b/package/rpi-userland/rpi-userland-003-remove-timer_t-typedef.patch
new file mode 100644
index 0000000..a6f8458
--- /dev/null
+++ b/package/rpi-userland/rpi-userland-003-remove-timer_t-typedef.patch
@@ -0,0 +1,58 @@
+From c8a01064bdd1fc923b1da1a72f1fca5bb20130b6 Mon Sep 17 00:00:00 2001
+From: Maarten ter Huurne <maarten@treewalker.org>
+Date: Fri, 12 Sep 2014 18:28:51 +0200
+Subject: [PATCH] vcos: Remove timer_t fallback definition
+
+The timer_t type is not used anywhere in the code. The fallback typedef
+can break builds though on systems where timer_t exists but is not an
+alias for __timer_t, such as systems using the musl libc.
+
+Signed-off-by: Maarten ter Huurne <maarten@treewalker.org>
+---
+ host_applications/linux/apps/hello_pi/CMakeLists.txt       | 2 +-
+ host_applications/linux/apps/hello_pi/libs/vgfont/Makefile | 1 -
+ interface/vcos/pthreads/vcos_platform.h                    | 3 ---
+ 3 files changed, 1 insertion(+), 5 deletions(-)
+
+diff --git a/host_applications/linux/apps/hello_pi/CMakeLists.txt b/host_applications/linux/apps/hello_pi/CMakeLists.txt
+index efb0bf4..d9b0eaf 100644
+--- a/host_applications/linux/apps/hello_pi/CMakeLists.txt
++++ b/host_applications/linux/apps/hello_pi/CMakeLists.txt
+@@ -24,7 +24,7 @@ add_subdirectory(hello_teapot)
+ 
+ if(BUILD_FONT)
+ set(VGFONT_SRCS libs/vgfont/font.c libs/vgfont/vgft.c libs/vgfont/graphics.c)
+-set_source_files_properties(${VGFONT_SRCS} PROPERTIES COMPILE_DEFINITIONS "_HAVE_TIMER_T")
++set_source_files_properties(${VGFONT_SRCS} PROPERTIES COMPILE_DEFINITIONS)
+ add_library(vgfont ${VGFONT_SRCS})
+ 
+ add_subdirectory(hello_font)
+diff --git a/host_applications/linux/apps/hello_pi/libs/vgfont/Makefile b/host_applications/linux/apps/hello_pi/libs/vgfont/Makefile
+index d04fb08..1e2a22b 100755
+--- a/host_applications/linux/apps/hello_pi/libs/vgfont/Makefile
++++ b/host_applications/linux/apps/hello_pi/libs/vgfont/Makefile
+@@ -2,7 +2,6 @@ OBJS=font.o vgft.o graphics.o
+ LIB=libvgfont.a
+ 
+ INCLUDES+=-I$(SDKSTAGE)/usr/include/freetype2 -I$(SDKSTAGE)/usr/include -I$(SDKSTAGE)/usr/include/arm-linux-gnueabi
+-CFLAGS+=-D_HAVE_TIMER_T
+ 
+ include ../../Makefile.include
+ 
+diff --git a/interface/vcos/pthreads/vcos_platform.h b/interface/vcos/pthreads/vcos_platform.h
+index 468098b..2095e25 100755
+--- a/interface/vcos/pthreads/vcos_platform.h
++++ b/interface/vcos/pthreads/vcos_platform.h
+@@ -120,9 +120,6 @@ typedef struct
+ 
+ #define VCOS_ONCE_INIT        PTHREAD_ONCE_INIT
+ 
+-#if defined(__arm__) && !defined(_HAVE_TIMER_T) && !defined(ANDROID)
+-typedef __timer_t timer_t;
+-#endif
+ typedef struct VCOS_TIMER_T
+ {
+    pthread_t thread;                      /**< id of the timer thread */
+-- 
+1.8.4.5
+
diff --git a/package/rpi-userland/rpi-userland-004-include-for-HZ.patch b/package/rpi-userland/rpi-userland-004-include-for-HZ.patch
new file mode 100644
index 0000000..5001780
--- /dev/null
+++ b/package/rpi-userland/rpi-userland-004-include-for-HZ.patch
@@ -0,0 +1,35 @@
+From 16ff117cc92067990ccedeba1f59797aa10669b2 Mon Sep 17 00:00:00 2001
+From: Maarten ter Huurne <maarten@treewalker.org>
+Date: Fri, 12 Sep 2014 04:24:30 +0200
+Subject: [PATCH] vcos: Fixed include for "HZ"
+
+There is no guarantee that <sys/param.h> defines HZ. And in musl libc,
+it doesn't. Since this is a Linux-specific constant, include the
+Linux-specific header for it.
+
+Note that HZ as defined by the system headers is the default value of
+HZ (100), which might differ from the actual value of HZ in the kernel
+config. Ideally userland would not use HZ at all and do all timing in
+milliseconds instead.
+
+Signed-off-by: Maarten ter Huurne <maarten@treewalker.org>
+---
+ interface/vcos/pthreads/vcos_pthreads.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/interface/vcos/pthreads/vcos_pthreads.c b/interface/vcos/pthreads/vcos_pthreads.c
+index 668f647..fdc8bc4 100644
+--- a/interface/vcos/pthreads/vcos_pthreads.c
++++ b/interface/vcos/pthreads/vcos_pthreads.c
+@@ -33,7 +33,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ #include <stdlib.h>
+ #include <stdio.h>
+ #include <sys/time.h>
+-#include <sys/param.h>
++#include <linux/param.h>
+ 
+ /* Cygwin doesn't always have prctl.h and it doesn't have PR_SET_NAME */
+ #if defined( __linux__ )
+-- 
+1.8.4.5
+
diff --git a/package/rpi-userland/rpi-userland-005-do-not-check-__USE_FILE_OFFSET64.patch b/package/rpi-userland/rpi-userland-005-do-not-check-__USE_FILE_OFFSET64.patch
new file mode 100644
index 0000000..2c8e93e
--- /dev/null
+++ b/package/rpi-userland/rpi-userland-005-do-not-check-__USE_FILE_OFFSET64.patch
@@ -0,0 +1,32 @@
+From a54f5fd6fab5a968636e8efc12820a65c58d00e0 Mon Sep 17 00:00:00 2001
+From: Maarten ter Huurne <maarten@treewalker.org>
+Date: Fri, 12 Sep 2014 04:27:06 +0200
+Subject: [PATCH] vmcs_host: Only check __USE_FILE_OFFSET64 when compiling
+ against glibc
+
+This looks like a sanity check that 64-bit file offset definitions were
+indeed provided by the included headers. But __USE_FILE_OFFSET64 is an
+internal define of glibc, so don't perform this check when compiling
+with a different libc.
+
+Signed-off-by: Maarten ter Huurne <maarten@treewalker.org>
+---
+ interface/vmcs_host/linux/vcfilesys.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/interface/vmcs_host/linux/vcfilesys.c b/interface/vmcs_host/linux/vcfilesys.c
+index ab65e3e..5f31f6c 100644
+--- a/interface/vmcs_host/linux/vcfilesys.c
++++ b/interface/vmcs_host/linux/vcfilesys.c
+@@ -49,7 +49,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ #include <ctype.h>
+ #include <limits.h>
+ 
+-#if !defined(ANDROID) && !defined( __USE_FILE_OFFSET64 )
++#if defined(__GLIBC__) && !defined( __USE_FILE_OFFSET64 )
+ #error   "__USE_FILE_OFFSET64 isn't defined"
+ #endif
+ 
+-- 
+1.8.4.5
+
diff --git a/package/rpi-userland/rpi-userland-006-mode_t.patch b/package/rpi-userland/rpi-userland-006-mode_t.patch
new file mode 100644
index 0000000..b6199f3
--- /dev/null
+++ b/package/rpi-userland/rpi-userland-006-mode_t.patch
@@ -0,0 +1,28 @@
+From 8cdd8539d1074ab70bf904986fc38761320de563 Mon Sep 17 00:00:00 2001
+From: Maarten ter Huurne <maarten@treewalker.org>
+Date: Fri, 12 Sep 2014 04:28:41 +0200
+Subject: [PATCH] vmcs_host: Correct type name for file mode
+
+The type of "st_mode" in "struct stat" is "mode_t", not "__mode_t".
+
+Signed-off-by: Maarten ter Huurne <maarten@treewalker.org>
+---
+ interface/vmcs_host/linux/vcfilesys.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/interface/vmcs_host/linux/vcfilesys.c b/interface/vmcs_host/linux/vcfilesys.c
+index 5f31f6c..53c7486 100644
+--- a/interface/vmcs_host/linux/vcfilesys.c
++++ b/interface/vmcs_host/linux/vcfilesys.c
+@@ -916,7 +916,7 @@ int vc_hostfs_set_attr(const char *path, fattributes_t attr)
+ 
+    if (pathbuf)
+    {
+-      __mode_t mode = 0;
++      mode_t mode = 0;
+       struct stat sb;
+ 
+       backslash_to_slash(pathbuf);
+-- 
+1.8.4.5
+
-- 
1.8.4.5

^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [Buildroot] [PATCH v3] rpi-userland: bump revision for musl compile fixes
  2014-09-12 17:01       ` Maarten ter Huurne
@ 2014-10-17 15:57         ` Maarten ter Huurne
  2014-10-17 20:31           ` Yann E. MORIN
  2014-10-18 11:05           ` Yann E. MORIN
  0 siblings, 2 replies; 17+ messages in thread
From: Maarten ter Huurne @ 2014-10-17 15:57 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Maarten ter Huurne <maarten@treewalker.org>
---
The second version of this patch was missing the "v2" label; this is
the third version.

The changes from v2, plus an additional change I made later were merged
upstream. This patch bumps the git revision to the merge commit.

rpi-userland-002-remove-faulty-assert.patch had to be updated to match
other changes in the code that are pulled in by the version bump.
I checked that the updated patch compiles fine, but I have no idea
whether it is still needed to fix or work around a runtime problem.

 .../rpi-userland-002-remove-faulty-assert.patch    | 25 ++++++++++++----------
 package/rpi-userland/rpi-userland.mk               |  2 +-
 2 files changed, 15 insertions(+), 12 deletions(-)

diff --git a/package/rpi-userland/rpi-userland-002-remove-faulty-assert.patch b/package/rpi-userland/rpi-userland-002-remove-faulty-assert.patch
index c23c43a..450f287 100644
--- a/package/rpi-userland/rpi-userland-002-remove-faulty-assert.patch
+++ b/package/rpi-userland/rpi-userland-002-remove-faulty-assert.patch
@@ -3,19 +3,22 @@ interface: remove faulty assert() to make weston happy at runtime
 This was removed after a discussion on IRC with the weston guys
 ('daniels' on irc.freenode.net/#wayland).
 
+Rebased on 4333d6d by Maarten ter Huurne <maarten@treewalker.org>.
+
 Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
 ---
 Upstream status: no, will be pushed by weston guys later.
 If not, I'll do it.
 
-diff -durN rpi-userland-77d32cd.orig/interface/vmcs_host/vc_vchi_dispmanx.c rpi-userland-77d32cd/interface/vmcs_host/vc_vchi_dispmanx.c
---- rpi-userland-77d32cd.orig/interface/vmcs_host/vc_vchi_dispmanx.c	2013-10-04 17:43:44.000000000 +0200
-+++ rpi-userland-77d32cd/interface/vmcs_host/vc_vchi_dispmanx.c	2013-10-08 22:28:51.611433539 +0200
-@@ -1187,7 +1187,6 @@
-          continue;
-    
-       if(dispmanx_client.update_callback ) {
--         vcos_assert( dispmanx_client.pending_update_handle == (DISPMANX_UPDATE_HANDLE_T) dispmanx_client.notify_buffer[1]);
-          dispmanx_client.update_callback((DISPMANX_UPDATE_HANDLE_T) dispmanx_client.notify_buffer[1], dispmanx_client.update_callback_param);
-       }
-    }
+diff --git a/interface/vmcs_host/vc_vchi_dispmanx.c b/interface/vmcs_host/vc_vchi_dispmanx.c
+index 85b373c..59a01f8 100755
+--- a/interface/vmcs_host/vc_vchi_dispmanx.c
++++ b/interface/vmcs_host/vc_vchi_dispmanx.c
+@@ -1296,7 +1296,6 @@ static void *dispmanx_notify_func( void *arg ) {
+          // Decrement the use count - the corresponding "use" is in vc_dispmanx_update_submit.
+          vchi_service_release(dispmanx_client.notify_handle[0]);
+          if (dispmanx_client.update_callback ) {
+-            vcos_assert( dispmanx_client.pending_update_handle == handle);
+             dispmanx_client.update_callback(handle, dispmanx_client.update_callback_param);
+          }
+       } else {
diff --git a/package/rpi-userland/rpi-userland.mk b/package/rpi-userland/rpi-userland.mk
index c738b62..8a71f93 100644
--- a/package/rpi-userland/rpi-userland.mk
+++ b/package/rpi-userland/rpi-userland.mk
@@ -4,7 +4,7 @@
 #
 ################################################################################
 
-RPI_USERLAND_VERSION = ffcc4bd7c4875b71376c4240116e251652c9bec0
+RPI_USERLAND_VERSION = 4333d6d023a1f0dcc763d0706a1fe6523f9b6005
 RPI_USERLAND_SITE = $(call github,raspberrypi,userland,$(RPI_USERLAND_VERSION))
 RPI_USERLAND_LICENSE = BSD-3c
 RPI_USERLAND_LICENSE_FILES = LICENCE
-- 
1.8.4.5

^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [Buildroot] [PATCH v3] rpi-userland: bump revision for musl compile fixes
  2014-10-17 15:57         ` [Buildroot] [PATCH v3] rpi-userland: bump revision for musl compile fixes Maarten ter Huurne
@ 2014-10-17 20:31           ` Yann E. MORIN
  2014-10-18 11:05           ` Yann E. MORIN
  1 sibling, 0 replies; 17+ messages in thread
From: Yann E. MORIN @ 2014-10-17 20:31 UTC (permalink / raw)
  To: buildroot

Maarten, All,

On 2014-10-17 17:57 +0200, Maarten ter Huurne spake thusly:
> Signed-off-by: Maarten ter Huurne <maarten@treewalker.org>
> ---
> The second version of this patch was missing the "v2" label; this is
> the third version.
> 
> The changes from v2, plus an additional change I made later were merged
> upstream. This patch bumps the git revision to the merge commit.
> 
> rpi-userland-002-remove-faulty-assert.patch had to be updated to match
> other changes in the code that are pulled in by the version bump.
> I checked that the updated patch compiles fine, but I have no idea
> whether it is still needed to fix or work around a runtime problem.

I have a way to test it, so I'll report whether it is still needed.
Basically, running weston was segfaulting always, at the very start.
So I'll try to reproduce; if it still segfaults without the patch, we'll
keep it, otherwise we'll drop it.

From what I read in the new code, it seems the assert makes much more
sense now than it did before...

I'll mark http://patchwork.ozlabs.org/patch/388745/ as superseded.

Thanks for the detailed explanations, that helped me catch it! :-)
I'll report back later tonight, so I hold my ack until then.

Regards,
Yann E. MORIN.

>  .../rpi-userland-002-remove-faulty-assert.patch    | 25 ++++++++++++----------
>  package/rpi-userland/rpi-userland.mk               |  2 +-
>  2 files changed, 15 insertions(+), 12 deletions(-)
> 
> diff --git a/package/rpi-userland/rpi-userland-002-remove-faulty-assert.patch b/package/rpi-userland/rpi-userland-002-remove-faulty-assert.patch
> index c23c43a..450f287 100644
> --- a/package/rpi-userland/rpi-userland-002-remove-faulty-assert.patch
> +++ b/package/rpi-userland/rpi-userland-002-remove-faulty-assert.patch
> @@ -3,19 +3,22 @@ interface: remove faulty assert() to make weston happy at runtime
>  This was removed after a discussion on IRC with the weston guys
>  ('daniels' on irc.freenode.net/#wayland).
>  
> +Rebased on 4333d6d by Maarten ter Huurne <maarten@treewalker.org>.
> +
>  Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
>  ---
>  Upstream status: no, will be pushed by weston guys later.
>  If not, I'll do it.
>  
> -diff -durN rpi-userland-77d32cd.orig/interface/vmcs_host/vc_vchi_dispmanx.c rpi-userland-77d32cd/interface/vmcs_host/vc_vchi_dispmanx.c
> ---- rpi-userland-77d32cd.orig/interface/vmcs_host/vc_vchi_dispmanx.c	2013-10-04 17:43:44.000000000 +0200
> -+++ rpi-userland-77d32cd/interface/vmcs_host/vc_vchi_dispmanx.c	2013-10-08 22:28:51.611433539 +0200
> -@@ -1187,7 +1187,6 @@
> -          continue;
> -    
> -       if(dispmanx_client.update_callback ) {
> --         vcos_assert( dispmanx_client.pending_update_handle == (DISPMANX_UPDATE_HANDLE_T) dispmanx_client.notify_buffer[1]);
> -          dispmanx_client.update_callback((DISPMANX_UPDATE_HANDLE_T) dispmanx_client.notify_buffer[1], dispmanx_client.update_callback_param);
> -       }
> -    }
> +diff --git a/interface/vmcs_host/vc_vchi_dispmanx.c b/interface/vmcs_host/vc_vchi_dispmanx.c
> +index 85b373c..59a01f8 100755
> +--- a/interface/vmcs_host/vc_vchi_dispmanx.c
> ++++ b/interface/vmcs_host/vc_vchi_dispmanx.c
> +@@ -1296,7 +1296,6 @@ static void *dispmanx_notify_func( void *arg ) {
> +          // Decrement the use count - the corresponding "use" is in vc_dispmanx_update_submit.
> +          vchi_service_release(dispmanx_client.notify_handle[0]);
> +          if (dispmanx_client.update_callback ) {
> +-            vcos_assert( dispmanx_client.pending_update_handle == handle);
> +             dispmanx_client.update_callback(handle, dispmanx_client.update_callback_param);
> +          }
> +       } else {
> diff --git a/package/rpi-userland/rpi-userland.mk b/package/rpi-userland/rpi-userland.mk
> index c738b62..8a71f93 100644
> --- a/package/rpi-userland/rpi-userland.mk
> +++ b/package/rpi-userland/rpi-userland.mk
> @@ -4,7 +4,7 @@
>  #
>  ################################################################################
>  
> -RPI_USERLAND_VERSION = ffcc4bd7c4875b71376c4240116e251652c9bec0
> +RPI_USERLAND_VERSION = 4333d6d023a1f0dcc763d0706a1fe6523f9b6005
>  RPI_USERLAND_SITE = $(call github,raspberrypi,userland,$(RPI_USERLAND_VERSION))
>  RPI_USERLAND_LICENSE = BSD-3c
>  RPI_USERLAND_LICENSE_FILES = LICENCE
> -- 
> 1.8.4.5
> 

-- 
.-----------------.--------------------.------------------.--------------------.
|  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] 17+ messages in thread

* [Buildroot] [PATCH v3] rpi-userland: bump revision for musl compile fixes
  2014-10-17 15:57         ` [Buildroot] [PATCH v3] rpi-userland: bump revision for musl compile fixes Maarten ter Huurne
  2014-10-17 20:31           ` Yann E. MORIN
@ 2014-10-18 11:05           ` Yann E. MORIN
  2014-10-18 11:34             ` Yann E. MORIN
  1 sibling, 1 reply; 17+ messages in thread
From: Yann E. MORIN @ 2014-10-18 11:05 UTC (permalink / raw)
  To: buildroot

Marten, All,

On 2014-10-17 17:57 +0200, Maarten ter Huurne spake thusly:
> Signed-off-by: Maarten ter Huurne <maarten@treewalker.org>
> ---
> The second version of this patch was missing the "v2" label; this is
> the third version.
> 
> The changes from v2, plus an additional change I made later were merged
> upstream. This patch bumps the git revision to the merge commit.
> 
> rpi-userland-002-remove-faulty-assert.patch had to be updated to match
> other changes in the code that are pulled in by the version bump.
> I checked that the updated patch compiles fine, but I have no idea
> whether it is still needed to fix or work around a runtime problem.

So, I have tested this bump: weston on the rpi no longer works, with or
without the asser patch.

So, I NAK this bump for now.

I'll see to bisect rpi-userland to see where it breaks.

Regards,
Yann E. MORIN.

>  .../rpi-userland-002-remove-faulty-assert.patch    | 25 ++++++++++++----------
>  package/rpi-userland/rpi-userland.mk               |  2 +-
>  2 files changed, 15 insertions(+), 12 deletions(-)
> 
> diff --git a/package/rpi-userland/rpi-userland-002-remove-faulty-assert.patch b/package/rpi-userland/rpi-userland-002-remove-faulty-assert.patch
> index c23c43a..450f287 100644
> --- a/package/rpi-userland/rpi-userland-002-remove-faulty-assert.patch
> +++ b/package/rpi-userland/rpi-userland-002-remove-faulty-assert.patch
> @@ -3,19 +3,22 @@ interface: remove faulty assert() to make weston happy at runtime
>  This was removed after a discussion on IRC with the weston guys
>  ('daniels' on irc.freenode.net/#wayland).
>  
> +Rebased on 4333d6d by Maarten ter Huurne <maarten@treewalker.org>.
> +
>  Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
>  ---
>  Upstream status: no, will be pushed by weston guys later.
>  If not, I'll do it.
>  
> -diff -durN rpi-userland-77d32cd.orig/interface/vmcs_host/vc_vchi_dispmanx.c rpi-userland-77d32cd/interface/vmcs_host/vc_vchi_dispmanx.c
> ---- rpi-userland-77d32cd.orig/interface/vmcs_host/vc_vchi_dispmanx.c	2013-10-04 17:43:44.000000000 +0200
> -+++ rpi-userland-77d32cd/interface/vmcs_host/vc_vchi_dispmanx.c	2013-10-08 22:28:51.611433539 +0200
> -@@ -1187,7 +1187,6 @@
> -          continue;
> -    
> -       if(dispmanx_client.update_callback ) {
> --         vcos_assert( dispmanx_client.pending_update_handle == (DISPMANX_UPDATE_HANDLE_T) dispmanx_client.notify_buffer[1]);
> -          dispmanx_client.update_callback((DISPMANX_UPDATE_HANDLE_T) dispmanx_client.notify_buffer[1], dispmanx_client.update_callback_param);
> -       }
> -    }
> +diff --git a/interface/vmcs_host/vc_vchi_dispmanx.c b/interface/vmcs_host/vc_vchi_dispmanx.c
> +index 85b373c..59a01f8 100755
> +--- a/interface/vmcs_host/vc_vchi_dispmanx.c
> ++++ b/interface/vmcs_host/vc_vchi_dispmanx.c
> +@@ -1296,7 +1296,6 @@ static void *dispmanx_notify_func( void *arg ) {
> +          // Decrement the use count - the corresponding "use" is in vc_dispmanx_update_submit.
> +          vchi_service_release(dispmanx_client.notify_handle[0]);
> +          if (dispmanx_client.update_callback ) {
> +-            vcos_assert( dispmanx_client.pending_update_handle == handle);
> +             dispmanx_client.update_callback(handle, dispmanx_client.update_callback_param);
> +          }
> +       } else {
> diff --git a/package/rpi-userland/rpi-userland.mk b/package/rpi-userland/rpi-userland.mk
> index c738b62..8a71f93 100644
> --- a/package/rpi-userland/rpi-userland.mk
> +++ b/package/rpi-userland/rpi-userland.mk
> @@ -4,7 +4,7 @@
>  #
>  ################################################################################
>  
> -RPI_USERLAND_VERSION = ffcc4bd7c4875b71376c4240116e251652c9bec0
> +RPI_USERLAND_VERSION = 4333d6d023a1f0dcc763d0706a1fe6523f9b6005
>  RPI_USERLAND_SITE = $(call github,raspberrypi,userland,$(RPI_USERLAND_VERSION))
>  RPI_USERLAND_LICENSE = BSD-3c
>  RPI_USERLAND_LICENSE_FILES = LICENCE
> -- 
> 1.8.4.5
> 

-- 
.-----------------.--------------------.------------------.--------------------.
|  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] 17+ messages in thread

* [Buildroot] [PATCH v3] rpi-userland: bump revision for musl compile fixes
  2014-10-18 11:05           ` Yann E. MORIN
@ 2014-10-18 11:34             ` Yann E. MORIN
  2014-10-18 12:15               ` Maarten ter Huurne
  0 siblings, 1 reply; 17+ messages in thread
From: Yann E. MORIN @ 2014-10-18 11:34 UTC (permalink / raw)
  To: buildroot

Maarten, All,

On 2014-10-18 13:05 +0200, Yann E. MORIN spake thusly:
> On 2014-10-17 17:57 +0200, Maarten ter Huurne spake thusly:
> > Signed-off-by: Maarten ter Huurne <maarten@treewalker.org>
> > ---
> > The second version of this patch was missing the "v2" label; this is
> > the third version.
> > 
> > The changes from v2, plus an additional change I made later were merged
> > upstream. This patch bumps the git revision to the merge commit.
> > 
> > rpi-userland-002-remove-faulty-assert.patch had to be updated to match
> > other changes in the code that are pulled in by the version bump.
> > I checked that the updated patch compiles fine, but I have no idea
> > whether it is still needed to fix or work around a runtime problem.
> 
> So, I have tested this bump: weston on the rpi no longer works, with or
> without the asser patch.
> 
> So, I NAK this bump for now.
> 
> I'll see to bisect rpi-userland to see where it breaks.

The culprit is:
    66338d3 vc_dispmanx: Fix vsync service use counting

Unfortunately, weston has yet no fix for that, and I could not spot any
fix for rpi-userland either... :-/

So, still NAK for this bump. We can still bump it up to ba753c1 as this
still works, but is not enough to get the musl fixes.

Maybe we could just hide it for musl for now?

Regards,
Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  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] 17+ messages in thread

* [Buildroot] [PATCH v3] rpi-userland: bump revision for musl compile fixes
  2014-10-18 11:34             ` Yann E. MORIN
@ 2014-10-18 12:15               ` Maarten ter Huurne
  2014-10-18 13:02                 ` Yann E. MORIN
  0 siblings, 1 reply; 17+ messages in thread
From: Maarten ter Huurne @ 2014-10-18 12:15 UTC (permalink / raw)
  To: buildroot

On Saturday 18 October 2014 13:34:46 Yann E. MORIN wrote:
> Maarten, All,
> 
> On 2014-10-18 13:05 +0200, Yann E. MORIN spake thusly:
> > On 2014-10-17 17:57 +0200, Maarten ter Huurne spake thusly:
> > > Signed-off-by: Maarten ter Huurne <maarten@treewalker.org>
> > > ---
> > > The second version of this patch was missing the "v2" label; this is
> > > the third version.
> > > 
> > > The changes from v2, plus an additional change I made later were
> > > merged
> > > upstream. This patch bumps the git revision to the merge commit.
> > > 
> > > rpi-userland-002-remove-faulty-assert.patch had to be updated to match
> > > other changes in the code that are pulled in by the version bump.
> > > I checked that the updated patch compiles fine, but I have no idea
> > > whether it is still needed to fix or work around a runtime problem.
> > 
> > So, I have tested this bump: weston on the rpi no longer works, with or
> > without the asser patch.
> > 
> > So, I NAK this bump for now.
> > 
> > I'll see to bisect rpi-userland to see where it breaks.
> 
> The culprit is:
>     66338d3 vc_dispmanx: Fix vsync service use counting
> 
> Unfortunately, weston has yet no fix for that, and I could not spot any
> fix for rpi-userland either... :-/

That commit is less than a week old; rpi-userland might not be aware of the 
problem. Will you or the Weston devs file a bug for it or alert the author?

By the way, 66338d3 is the commit that gives a NULL handle a special 
meaning. If the assert no longer triggers, perhaps the assert used to 
trigger on the handle being NULL by accident?

> So, still NAK for this bump. We can still bump it up to ba753c1 as this
> still works, but is not enough to get the musl fixes.
> 
> Maybe we could just hide it for musl for now?

I think it would be a pity to hide it when we have a fix for the musl 
compile problem.

The only differences between the the proposed bump (4333d6d) and the last 
working version (ba753c1) are the commit that breaks Weston (66338d3) and 
the musl compile fixes. So I could create a v4 patch which bumps the version 
to 4333d6d and contains a patch to revert 66338d3.

Alternatively, I could create a v4 patch which bumps the version to ba753c1 
and adds the musl compile fixes as separate patches. While the number of 
patches would be greater (5 vs 1), the number of changed lines would be 
smaller, since most of the compile fixes change one line each.

Or I could create a v4 patch which bumps the version to ba753c1 and adds the 
musl compile fixes as a single patch. Since we know they have been accepted 
upstream in the same merge commit (4333d6d), we can drop all of them at the 
same time once we can safely bump beyond that merge commit.

At the moment I prefer bumping to ba753c1 + squashed musl compile fixes, but 
I'd like a second opinion.

Bye,
		Maarten

^ permalink raw reply	[flat|nested] 17+ messages in thread

* [Buildroot] [PATCH v3] rpi-userland: bump revision for musl compile fixes
  2014-10-18 12:15               ` Maarten ter Huurne
@ 2014-10-18 13:02                 ` Yann E. MORIN
  2014-10-18 16:46                   ` Maarten ter Huurne
  0 siblings, 1 reply; 17+ messages in thread
From: Yann E. MORIN @ 2014-10-18 13:02 UTC (permalink / raw)
  To: buildroot

Maarten, All,

On 2014-10-18 14:15 +0200, Maarten ter Huurne spake thusly:
> On Saturday 18 October 2014 13:34:46 Yann E. MORIN wrote:
> > Maarten, All,
> > 
> > On 2014-10-18 13:05 +0200, Yann E. MORIN spake thusly:
> > > On 2014-10-17 17:57 +0200, Maarten ter Huurne spake thusly:
> > > > Signed-off-by: Maarten ter Huurne <maarten@treewalker.org>
> > > > ---
> > > > The second version of this patch was missing the "v2" label; this is
> > > > the third version.
> > > > 
> > > > The changes from v2, plus an additional change I made later were
> > > > merged
> > > > upstream. This patch bumps the git revision to the merge commit.
> > > > 
> > > > rpi-userland-002-remove-faulty-assert.patch had to be updated to match
> > > > other changes in the code that are pulled in by the version bump.
> > > > I checked that the updated patch compiles fine, but I have no idea
> > > > whether it is still needed to fix or work around a runtime problem.
> > > 
> > > So, I have tested this bump: weston on the rpi no longer works, with or
> > > without the asser patch.
> > > 
> > > So, I NAK this bump for now.
> > > 
> > > I'll see to bisect rpi-userland to see where it breaks.
> > 
> > The culprit is:
> >     66338d3 vc_dispmanx: Fix vsync service use counting
> > 
> > Unfortunately, weston has yet no fix for that, and I could not spot any
> > fix for rpi-userland either... :-/
> 
> That commit is less than a week old; rpi-userland might not be aware of the 
> problem. Will you or the Weston devs file a bug for it or alert the author?

I've asked on #wayland to see if they are aware of the issue.
I'll probably fill a bug in either project depending on how the wayland
guys reply.

> By the way, 66338d3 is the commit that gives a NULL handle a special 
> meaning. If the assert no longer triggers, perhaps the assert used to 
> trigger on the handle being NULL by accident?

Yes, the assert fired because of a NULL pointer dereference (IIRC).

> > So, still NAK for this bump. We can still bump it up to ba753c1 as this
> > still works, but is not enough to get the musl fixes.
> > 
> > Maybe we could just hide it for musl for now?
> 
> I think it would be a pity to hide it when we have a fix for the musl 
> compile problem.
> 
> The only differences between the the proposed bump (4333d6d) and the last 
> working version (ba753c1) are the commit that breaks Weston (66338d3) and 
> the musl compile fixes. So I could create a v4 patch which bumps the version 
> to 4333d6d and contains a patch to revert 66338d3.
> 
> Alternatively, I could create a v4 patch which bumps the version to ba753c1 
> and adds the musl compile fixes as separate patches. While the number of 
> patches would be greater (5 vs 1), the number of changed lines would be 
> smaller, since most of the compile fixes change one line each.
> 
> Or I could create a v4 patch which bumps the version to ba753c1 and adds the 
> musl compile fixes as a single patch. Since we know they have been accepted 
> upstream in the same merge commit (4333d6d), we can drop all of them at the 
> same time once we can safely bump beyond that merge commit.
> 
> At the moment I prefer bumping to ba753c1 + squashed musl compile fixes, but 
> I'd like a second opinion.

Well, I do not want to have weston break. weston is, as far as I can
see, the only package in Buildroot that can make use of rpi-userland.
Breaking it is out of the equation.

If the backport on-top of ba753c1 is easy, then that's OK for me. The
patches are upstream, so it's OK to bundle them until either
rpi-userland or/and weston upstream fix the issue.

Regards,
Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  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] 17+ messages in thread

* [Buildroot] [PATCH v3] rpi-userland: bump revision for musl compile fixes
  2014-10-18 13:02                 ` Yann E. MORIN
@ 2014-10-18 16:46                   ` Maarten ter Huurne
  2014-10-18 17:16                     ` Yann E. MORIN
  2014-10-18 17:58                     ` [Buildroot] [PATCH v4] rpi-userland: bump revision and add patch to fix compile with musl Maarten ter Huurne
  0 siblings, 2 replies; 17+ messages in thread
From: Maarten ter Huurne @ 2014-10-18 16:46 UTC (permalink / raw)
  To: buildroot

On Saturday 18 October 2014 15:02:48 Yann E. MORIN wrote:
> Maarten, All,
> 
> On 2014-10-18 14:15 +0200, Maarten ter Huurne spake thusly:
> > On Saturday 18 October 2014 13:34:46 Yann E. MORIN wrote:
> > > So, still NAK for this bump. We can still bump it up to ba753c1 as
> > > this
> > > still works, but is not enough to get the musl fixes.
> > > 
> > > Maybe we could just hide it for musl for now?
> > 
> > I think it would be a pity to hide it when we have a fix for the musl
> > compile problem.
> > 
> > The only differences between the the proposed bump (4333d6d) and the
> > last
> > working version (ba753c1) are the commit that breaks Weston (66338d3)
> > and
> > the musl compile fixes. So I could create a v4 patch which bumps the
> > version to 4333d6d and contains a patch to revert 66338d3.
> > 
> > Alternatively, I could create a v4 patch which bumps the version to
> > ba753c1 and adds the musl compile fixes as separate patches. While the
> > number of patches would be greater (5 vs 1), the number of changed
> > lines would be smaller, since most of the compile fixes change one line
> > each.
> > 
> > Or I could create a v4 patch which bumps the version to ba753c1 and adds
> > the musl compile fixes as a single patch. Since we know they have been
> > accepted upstream in the same merge commit (4333d6d), we can drop all
> > of them at the same time once we can safely bump beyond that merge
> > commit.
> > 
> > At the moment I prefer bumping to ba753c1 + squashed musl compile fixes,
> > but I'd like a second opinion.
> 
> Well, I do not want to have weston break. weston is, as far as I can
> see, the only package in Buildroot that can make use of rpi-userland.
> Breaking it is out of the equation.

rpi-userland provides GL ES (BR2_PACKAGE_HAS_LIBGLES) among other features, 
so there are several more packages that depend on it. I needed it as a 
dependency for SDL2 (not in Buildroot yet).

But I agree that breaking one package to fix another is not progress.

> If the backport on-top of ba753c1 is easy, then that's OK for me. The
> patches are upstream, so it's OK to bundle them until either
> rpi-userland or/and weston upstream fix the issue.

I have a git clone of rpi-userland set up already to be able to submit the 
patches upstream, so creating a combined patch is not much work. I'll do 
that.

Bye,
		Maarten

^ permalink raw reply	[flat|nested] 17+ messages in thread

* [Buildroot] [PATCH v3] rpi-userland: bump revision for musl compile fixes
  2014-10-18 16:46                   ` Maarten ter Huurne
@ 2014-10-18 17:16                     ` Yann E. MORIN
  2014-10-18 17:22                       ` Maarten ter Huurne
  2014-10-18 17:58                     ` [Buildroot] [PATCH v4] rpi-userland: bump revision and add patch to fix compile with musl Maarten ter Huurne
  1 sibling, 1 reply; 17+ messages in thread
From: Yann E. MORIN @ 2014-10-18 17:16 UTC (permalink / raw)
  To: buildroot

Maarten, All,

On 2014-10-18 18:46 +0200, Maarten ter Huurne spake thusly:
> On Saturday 18 October 2014 15:02:48 Yann E. MORIN wrote:
> > Well, I do not want to have weston break. weston is, as far as I can
> > see, the only package in Buildroot that can make use of rpi-userland.
> > Breaking it is out of the equation.
> 
> rpi-userland provides GL ES (BR2_PACKAGE_HAS_LIBGLES) among other features, 
> so there are several more packages that depend on it.

Right, I forgot about that...

[--SNIP--[
> I have a git clone of rpi-userland set up already to be able to submit the 
> patches upstream, so creating a combined patch is not much work. I'll do 
> that.

So, I take it you have a fix for this issue?

Regards,
Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  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] 17+ messages in thread

* [Buildroot] [PATCH v3] rpi-userland: bump revision for musl compile fixes
  2014-10-18 17:16                     ` Yann E. MORIN
@ 2014-10-18 17:22                       ` Maarten ter Huurne
  0 siblings, 0 replies; 17+ messages in thread
From: Maarten ter Huurne @ 2014-10-18 17:22 UTC (permalink / raw)
  To: buildroot

On Saturday 18 October 2014 19:16:05 Yann E. MORIN wrote:
> On 2014-10-18 18:46 +0200, Maarten ter Huurne spake thusly:
> > I have a git clone of rpi-userland set up already to be able to submit
> > the patches upstream, so creating a combined patch is not much work.
> > I'll do that.
> 
> So, I take it you have a fix for this issue?

I have a fix for the musl compile problems, not for the Weston problem.

Bye,
		Maarten

^ permalink raw reply	[flat|nested] 17+ messages in thread

* [Buildroot] [PATCH v4] rpi-userland: bump revision and add patch to fix compile with musl
  2014-10-18 16:46                   ` Maarten ter Huurne
  2014-10-18 17:16                     ` Yann E. MORIN
@ 2014-10-18 17:58                     ` Maarten ter Huurne
  2014-10-19 10:32                       ` Yann E. MORIN
  2014-10-19 14:37                       ` Thomas Petazzoni
  1 sibling, 2 replies; 17+ messages in thread
From: Maarten ter Huurne @ 2014-10-18 17:58 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Maarten ter Huurne <maarten@treewalker.org>
---
 .../rpi-userland-003-fix-musl-compile.patch        | 113 +++++++++++++++++++++
 package/rpi-userland/rpi-userland.mk               |   2 +-
 2 files changed, 114 insertions(+), 1 deletion(-)
 create mode 100644 package/rpi-userland/rpi-userland-003-fix-musl-compile.patch

diff --git a/package/rpi-userland/rpi-userland-003-fix-musl-compile.patch b/package/rpi-userland/rpi-userland-003-fix-musl-compile.patch
new file mode 100644
index 0000000..f960482
--- /dev/null
+++ b/package/rpi-userland/rpi-userland-003-fix-musl-compile.patch
@@ -0,0 +1,113 @@
+From 198d93fab0659f7a548329d742de8b3e27cfd977 Mon Sep 17 00:00:00 2001
+From: Maarten ter Huurne <maarten@treewalker.org>
+Date: Fri, 12 Sep 2014 18:28:51 +0200
+Subject: [PATCH] Combined musl compile fixes
+
+The individual patches and their descriptions can be found here:
+https://github.com/raspberrypi/userland/pull/201
+
+Upstream status: accepted (4333d6d)
+However, bumping to that revision is currently not an option since that
+also pulls in 66338d3 which breaks Weston:
+http://lists.busybox.net/pipermail/buildroot/2014-October/109309.html
+
+Signed-off-by: Maarten ter Huurne <maarten@treewalker.org>
+---
+ containers/CMakeLists.txt                                  | 2 +-
+ host_applications/linux/apps/hello_pi/CMakeLists.txt       | 2 +-
+ host_applications/linux/apps/hello_pi/libs/vgfont/Makefile | 1 -
+ interface/vcos/pthreads/vcos_platform.h                    | 3 ---
+ interface/vcos/pthreads/vcos_pthreads.c                    | 2 +-
+ interface/vmcs_host/linux/vcfilesys.c                      | 4 ++--
+ 6 files changed, 5 insertions(+), 9 deletions(-)
+
+diff --git a/containers/CMakeLists.txt b/containers/CMakeLists.txt
+index 721f74f..a29a885 100644
+--- a/containers/CMakeLists.txt
++++ b/containers/CMakeLists.txt
+@@ -13,7 +13,7 @@ add_definitions(-DDL_PATH_PREFIX="${VMCS_PLUGIN_DIR}/")
+ 
+ SET( GCC_COMPILER_FLAGS -Wall -g -O2 -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wcast-qual -Wwrite-strings -Wundef )
+ SET( GCC_COMPILER_FLAGS ${GCC_COMPILER_FLAGS} -Wextra )#-Wno-missing-field-initializers )
+-SET( GCC_COMPILER_FLAGS ${GCC_COMPILER_FLAGS} -D__STDC_VERSION__=199901L )
++SET( GCC_COMPILER_FLAGS ${GCC_COMPILER_FLAGS} -std=c99 -D_POSIX_C_SOURCE=199309L )
+ SET( GCC_COMPILER_FLAGS ${GCC_COMPILER_FLAGS} -Wno-missing-field-initializers )
+ SET( GCC_COMPILER_FLAGS ${GCC_COMPILER_FLAGS} -Wno-unused-value )
+ 
+diff --git a/host_applications/linux/apps/hello_pi/CMakeLists.txt b/host_applications/linux/apps/hello_pi/CMakeLists.txt
+index ab4dae3..f2c6aef 100644
+--- a/host_applications/linux/apps/hello_pi/CMakeLists.txt
++++ b/host_applications/linux/apps/hello_pi/CMakeLists.txt
+@@ -24,7 +24,7 @@ add_subdirectory(hello_teapot)
+ 
+ if(BUILD_FONT)
+ set(VGFONT_SRCS libs/vgfont/font.c libs/vgfont/vgft.c libs/vgfont/graphics.c)
+-set_source_files_properties(${VGFONT_SRCS} PROPERTIES COMPILE_DEFINITIONS "_HAVE_TIMER_T")
++set_source_files_properties(${VGFONT_SRCS} PROPERTIES COMPILE_DEFINITIONS)
+ add_library(vgfont ${VGFONT_SRCS})
+ 
+ add_subdirectory(hello_font)
+diff --git a/host_applications/linux/apps/hello_pi/libs/vgfont/Makefile b/host_applications/linux/apps/hello_pi/libs/vgfont/Makefile
+index d04fb08..1e2a22b 100755
+--- a/host_applications/linux/apps/hello_pi/libs/vgfont/Makefile
++++ b/host_applications/linux/apps/hello_pi/libs/vgfont/Makefile
+@@ -2,7 +2,6 @@ OBJS=font.o vgft.o graphics.o
+ LIB=libvgfont.a
+ 
+ INCLUDES+=-I$(SDKSTAGE)/usr/include/freetype2 -I$(SDKSTAGE)/usr/include -I$(SDKSTAGE)/usr/include/arm-linux-gnueabi
+-CFLAGS+=-D_HAVE_TIMER_T
+ 
+ include ../../Makefile.include
+ 
+diff --git a/interface/vcos/pthreads/vcos_platform.h b/interface/vcos/pthreads/vcos_platform.h
+index 468098b..2095e25 100755
+--- a/interface/vcos/pthreads/vcos_platform.h
++++ b/interface/vcos/pthreads/vcos_platform.h
+@@ -120,9 +120,6 @@ typedef struct
+ 
+ #define VCOS_ONCE_INIT        PTHREAD_ONCE_INIT
+ 
+-#if defined(__arm__) && !defined(_HAVE_TIMER_T) && !defined(ANDROID)
+-typedef __timer_t timer_t;
+-#endif
+ typedef struct VCOS_TIMER_T
+ {
+    pthread_t thread;                      /**< id of the timer thread */
+diff --git a/interface/vcos/pthreads/vcos_pthreads.c b/interface/vcos/pthreads/vcos_pthreads.c
+index 668f647..fdc8bc4 100644
+--- a/interface/vcos/pthreads/vcos_pthreads.c
++++ b/interface/vcos/pthreads/vcos_pthreads.c
+@@ -33,7 +33,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ #include <stdlib.h>
+ #include <stdio.h>
+ #include <sys/time.h>
+-#include <sys/param.h>
++#include <linux/param.h>
+ 
+ /* Cygwin doesn't always have prctl.h and it doesn't have PR_SET_NAME */
+ #if defined( __linux__ )
+diff --git a/interface/vmcs_host/linux/vcfilesys.c b/interface/vmcs_host/linux/vcfilesys.c
+index ab65e3e..53c7486 100644
+--- a/interface/vmcs_host/linux/vcfilesys.c
++++ b/interface/vmcs_host/linux/vcfilesys.c
+@@ -49,7 +49,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ #include <ctype.h>
+ #include <limits.h>
+ 
+-#if !defined(ANDROID) && !defined( __USE_FILE_OFFSET64 )
++#if defined(__GLIBC__) && !defined( __USE_FILE_OFFSET64 )
+ #error   "__USE_FILE_OFFSET64 isn't defined"
+ #endif
+ 
+@@ -916,7 +916,7 @@ int vc_hostfs_set_attr(const char *path, fattributes_t attr)
+ 
+    if (pathbuf)
+    {
+-      __mode_t mode = 0;
++      mode_t mode = 0;
+       struct stat sb;
+ 
+       backslash_to_slash(pathbuf);
+-- 
+1.8.4.5
+
diff --git a/package/rpi-userland/rpi-userland.mk b/package/rpi-userland/rpi-userland.mk
index c738b62..feac277 100644
--- a/package/rpi-userland/rpi-userland.mk
+++ b/package/rpi-userland/rpi-userland.mk
@@ -4,7 +4,7 @@
 #
 ################################################################################
 
-RPI_USERLAND_VERSION = ffcc4bd7c4875b71376c4240116e251652c9bec0
+RPI_USERLAND_VERSION = ba753c1a7f68d7a2e00edaf03364eef001e233ef
 RPI_USERLAND_SITE = $(call github,raspberrypi,userland,$(RPI_USERLAND_VERSION))
 RPI_USERLAND_LICENSE = BSD-3c
 RPI_USERLAND_LICENSE_FILES = LICENCE
-- 
1.8.4.5

^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [Buildroot] [PATCH v4] rpi-userland: bump revision and add patch to fix compile with musl
  2014-10-18 17:58                     ` [Buildroot] [PATCH v4] rpi-userland: bump revision and add patch to fix compile with musl Maarten ter Huurne
@ 2014-10-19 10:32                       ` Yann E. MORIN
  2014-10-19 14:37                       ` Thomas Petazzoni
  1 sibling, 0 replies; 17+ messages in thread
From: Yann E. MORIN @ 2014-10-19 10:32 UTC (permalink / raw)
  To: buildroot

Maarten, All,

On 2014-10-18 19:58 +0200, Maarten ter Huurne spake thusly:
> Signed-off-by: Maarten ter Huurne <maarten@treewalker.org>

I would have liked that the explanation from the patch be repeated in
the commit log, something like:

    We can not bump to the latest cset, because it breaks weston. So we
    add a patch to backport upstream fixes for musl:
        http://lists.busybox.net/pipermail/buildroot/2014-October/109309.html
        https://github.com/raspberrypi/userland/pull/201

Otherwise:

Acked-by: "Yann E. MORIN" <yann.morin.1998@free.fr>

Regards,
Yann E. MORIN.

> ---
>  .../rpi-userland-003-fix-musl-compile.patch        | 113 +++++++++++++++++++++
>  package/rpi-userland/rpi-userland.mk               |   2 +-
>  2 files changed, 114 insertions(+), 1 deletion(-)
>  create mode 100644 package/rpi-userland/rpi-userland-003-fix-musl-compile.patch
> 
> diff --git a/package/rpi-userland/rpi-userland-003-fix-musl-compile.patch b/package/rpi-userland/rpi-userland-003-fix-musl-compile.patch
> new file mode 100644
> index 0000000..f960482
> --- /dev/null
> +++ b/package/rpi-userland/rpi-userland-003-fix-musl-compile.patch
> @@ -0,0 +1,113 @@
> +From 198d93fab0659f7a548329d742de8b3e27cfd977 Mon Sep 17 00:00:00 2001
> +From: Maarten ter Huurne <maarten@treewalker.org>
> +Date: Fri, 12 Sep 2014 18:28:51 +0200
> +Subject: [PATCH] Combined musl compile fixes
> +
> +The individual patches and their descriptions can be found here:
> +https://github.com/raspberrypi/userland/pull/201
> +
> +Upstream status: accepted (4333d6d)
> +However, bumping to that revision is currently not an option since that
> +also pulls in 66338d3 which breaks Weston:
> +http://lists.busybox.net/pipermail/buildroot/2014-October/109309.html
> +
> +Signed-off-by: Maarten ter Huurne <maarten@treewalker.org>
> +---
> + containers/CMakeLists.txt                                  | 2 +-
> + host_applications/linux/apps/hello_pi/CMakeLists.txt       | 2 +-
> + host_applications/linux/apps/hello_pi/libs/vgfont/Makefile | 1 -
> + interface/vcos/pthreads/vcos_platform.h                    | 3 ---
> + interface/vcos/pthreads/vcos_pthreads.c                    | 2 +-
> + interface/vmcs_host/linux/vcfilesys.c                      | 4 ++--
> + 6 files changed, 5 insertions(+), 9 deletions(-)
> +
> +diff --git a/containers/CMakeLists.txt b/containers/CMakeLists.txt
> +index 721f74f..a29a885 100644
> +--- a/containers/CMakeLists.txt
> ++++ b/containers/CMakeLists.txt
> +@@ -13,7 +13,7 @@ add_definitions(-DDL_PATH_PREFIX="${VMCS_PLUGIN_DIR}/")
> + 
> + SET( GCC_COMPILER_FLAGS -Wall -g -O2 -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wcast-qual -Wwrite-strings -Wundef )
> + SET( GCC_COMPILER_FLAGS ${GCC_COMPILER_FLAGS} -Wextra )#-Wno-missing-field-initializers )
> +-SET( GCC_COMPILER_FLAGS ${GCC_COMPILER_FLAGS} -D__STDC_VERSION__=199901L )
> ++SET( GCC_COMPILER_FLAGS ${GCC_COMPILER_FLAGS} -std=c99 -D_POSIX_C_SOURCE=199309L )
> + SET( GCC_COMPILER_FLAGS ${GCC_COMPILER_FLAGS} -Wno-missing-field-initializers )
> + SET( GCC_COMPILER_FLAGS ${GCC_COMPILER_FLAGS} -Wno-unused-value )
> + 
> +diff --git a/host_applications/linux/apps/hello_pi/CMakeLists.txt b/host_applications/linux/apps/hello_pi/CMakeLists.txt
> +index ab4dae3..f2c6aef 100644
> +--- a/host_applications/linux/apps/hello_pi/CMakeLists.txt
> ++++ b/host_applications/linux/apps/hello_pi/CMakeLists.txt
> +@@ -24,7 +24,7 @@ add_subdirectory(hello_teapot)
> + 
> + if(BUILD_FONT)
> + set(VGFONT_SRCS libs/vgfont/font.c libs/vgfont/vgft.c libs/vgfont/graphics.c)
> +-set_source_files_properties(${VGFONT_SRCS} PROPERTIES COMPILE_DEFINITIONS "_HAVE_TIMER_T")
> ++set_source_files_properties(${VGFONT_SRCS} PROPERTIES COMPILE_DEFINITIONS)
> + add_library(vgfont ${VGFONT_SRCS})
> + 
> + add_subdirectory(hello_font)
> +diff --git a/host_applications/linux/apps/hello_pi/libs/vgfont/Makefile b/host_applications/linux/apps/hello_pi/libs/vgfont/Makefile
> +index d04fb08..1e2a22b 100755
> +--- a/host_applications/linux/apps/hello_pi/libs/vgfont/Makefile
> ++++ b/host_applications/linux/apps/hello_pi/libs/vgfont/Makefile
> +@@ -2,7 +2,6 @@ OBJS=font.o vgft.o graphics.o
> + LIB=libvgfont.a
> + 
> + INCLUDES+=-I$(SDKSTAGE)/usr/include/freetype2 -I$(SDKSTAGE)/usr/include -I$(SDKSTAGE)/usr/include/arm-linux-gnueabi
> +-CFLAGS+=-D_HAVE_TIMER_T
> + 
> + include ../../Makefile.include
> + 
> +diff --git a/interface/vcos/pthreads/vcos_platform.h b/interface/vcos/pthreads/vcos_platform.h
> +index 468098b..2095e25 100755
> +--- a/interface/vcos/pthreads/vcos_platform.h
> ++++ b/interface/vcos/pthreads/vcos_platform.h
> +@@ -120,9 +120,6 @@ typedef struct
> + 
> + #define VCOS_ONCE_INIT        PTHREAD_ONCE_INIT
> + 
> +-#if defined(__arm__) && !defined(_HAVE_TIMER_T) && !defined(ANDROID)
> +-typedef __timer_t timer_t;
> +-#endif
> + typedef struct VCOS_TIMER_T
> + {
> +    pthread_t thread;                      /**< id of the timer thread */
> +diff --git a/interface/vcos/pthreads/vcos_pthreads.c b/interface/vcos/pthreads/vcos_pthreads.c
> +index 668f647..fdc8bc4 100644
> +--- a/interface/vcos/pthreads/vcos_pthreads.c
> ++++ b/interface/vcos/pthreads/vcos_pthreads.c
> +@@ -33,7 +33,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
> + #include <stdlib.h>
> + #include <stdio.h>
> + #include <sys/time.h>
> +-#include <sys/param.h>
> ++#include <linux/param.h>
> + 
> + /* Cygwin doesn't always have prctl.h and it doesn't have PR_SET_NAME */
> + #if defined( __linux__ )
> +diff --git a/interface/vmcs_host/linux/vcfilesys.c b/interface/vmcs_host/linux/vcfilesys.c
> +index ab65e3e..53c7486 100644
> +--- a/interface/vmcs_host/linux/vcfilesys.c
> ++++ b/interface/vmcs_host/linux/vcfilesys.c
> +@@ -49,7 +49,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
> + #include <ctype.h>
> + #include <limits.h>
> + 
> +-#if !defined(ANDROID) && !defined( __USE_FILE_OFFSET64 )
> ++#if defined(__GLIBC__) && !defined( __USE_FILE_OFFSET64 )
> + #error   "__USE_FILE_OFFSET64 isn't defined"
> + #endif
> + 
> +@@ -916,7 +916,7 @@ int vc_hostfs_set_attr(const char *path, fattributes_t attr)
> + 
> +    if (pathbuf)
> +    {
> +-      __mode_t mode = 0;
> ++      mode_t mode = 0;
> +       struct stat sb;
> + 
> +       backslash_to_slash(pathbuf);
> +-- 
> +1.8.4.5
> +
> diff --git a/package/rpi-userland/rpi-userland.mk b/package/rpi-userland/rpi-userland.mk
> index c738b62..feac277 100644
> --- a/package/rpi-userland/rpi-userland.mk
> +++ b/package/rpi-userland/rpi-userland.mk
> @@ -4,7 +4,7 @@
>  #
>  ################################################################################
>  
> -RPI_USERLAND_VERSION = ffcc4bd7c4875b71376c4240116e251652c9bec0
> +RPI_USERLAND_VERSION = ba753c1a7f68d7a2e00edaf03364eef001e233ef
>  RPI_USERLAND_SITE = $(call github,raspberrypi,userland,$(RPI_USERLAND_VERSION))
>  RPI_USERLAND_LICENSE = BSD-3c
>  RPI_USERLAND_LICENSE_FILES = LICENCE
> -- 
> 1.8.4.5
> 

-- 
.-----------------.--------------------.------------------.--------------------.
|  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] 17+ messages in thread

* [Buildroot] [PATCH v4] rpi-userland: bump revision and add patch to fix compile with musl
  2014-10-18 17:58                     ` [Buildroot] [PATCH v4] rpi-userland: bump revision and add patch to fix compile with musl Maarten ter Huurne
  2014-10-19 10:32                       ` Yann E. MORIN
@ 2014-10-19 14:37                       ` Thomas Petazzoni
  1 sibling, 0 replies; 17+ messages in thread
From: Thomas Petazzoni @ 2014-10-19 14:37 UTC (permalink / raw)
  To: buildroot

Dear Maarten ter Huurne,

On Sat, 18 Oct 2014 19:58:37 +0200, Maarten ter Huurne wrote:
> Signed-off-by: Maarten ter Huurne <maarten@treewalker.org>
> ---
>  .../rpi-userland-003-fix-musl-compile.patch        | 113 +++++++++++++++++++++
>  package/rpi-userland/rpi-userland.mk               |   2 +-
>  2 files changed, 114 insertions(+), 1 deletion(-)
>  create mode 100644 package/rpi-userland/rpi-userland-003-fix-musl-compile.patch

Thanks, applied, after adjusting the commit log as suggested by Yann.

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2014-10-19 14:37 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-09-12  1:45 [Buildroot] [PATCH] rpi-userland: Add patches to fix compilation with musl libc Maarten ter Huurne
2014-09-12  7:32 ` Thomas Petazzoni
2014-09-12 14:56   ` Maarten ter Huurne
2014-09-12 15:11     ` Thomas Petazzoni
2014-09-12 17:01       ` Maarten ter Huurne
2014-10-17 15:57         ` [Buildroot] [PATCH v3] rpi-userland: bump revision for musl compile fixes Maarten ter Huurne
2014-10-17 20:31           ` Yann E. MORIN
2014-10-18 11:05           ` Yann E. MORIN
2014-10-18 11:34             ` Yann E. MORIN
2014-10-18 12:15               ` Maarten ter Huurne
2014-10-18 13:02                 ` Yann E. MORIN
2014-10-18 16:46                   ` Maarten ter Huurne
2014-10-18 17:16                     ` Yann E. MORIN
2014-10-18 17:22                       ` Maarten ter Huurne
2014-10-18 17:58                     ` [Buildroot] [PATCH v4] rpi-userland: bump revision and add patch to fix compile with musl Maarten ter Huurne
2014-10-19 10:32                       ` Yann E. MORIN
2014-10-19 14:37                       ` Thomas Petazzoni

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.