[yocto] ***SPAM*** [meta-raspberrypi][PATCH 3/4] userland: Adjust include location for pthreads-headers

Herve Jourdain herve.jourdain at neuf.fr
Thu Aug 13 20:15:50 PDT 2015


Hi Khem,

It's OK to me to change all of them, but for the EGL detection just the
vcos_platform[_types].h are mandatory to fix...
I've tested that with my patch - which just provides those 2 - on several
packages, and it works fine with only those it seems.

There seems to be some apparently "non-consistent" include policies in
userland, but Alex raised my attention to the fact that it seems to be a
"feature", and a potentially contentious issue - at least, in the past.

Best regards,

Herve

-----Original Message-----
From: Khem Raj [mailto:raj.khem at gmail.com] 
Sent: vendredi 14 août 2015 04:57
To: Herve Jourdain <herve.jourdain at neuf.fr>
Cc: yocto at yoctoproject.org; Andrei Gherzan <andrei at gherzan.ro>;
petter at technux.se; Alex J Lennon <ajlennon at dynamicdevices.co.uk>
Subject: Re: ***SPAM*** [yocto] [meta-raspberrypi][PATCH 3/4] userland:
Adjust include location for pthreads-headers


> On Aug 13, 2015, at 7:00 PM, Herve Jourdain <herve.jourdain at neuf.fr>
wrote:
> 
> Hi Khem,
> 
> I have submitted a patch similar to this one, but yours is more 
> elegant in the way it provides the patch - you do a sed in the 
> install_append, while I was just literally providing a patch file, which
is bigger.
> So I personally would vote for this one.
> 
> I have one question, though: for me, only modifying the #include 
> "vcos_platform.h" and #include "vcos_platform_types.h" was enough to 
> make it work for everything I tested.
> What is the part that requires also modifying #include
"vcos_futex_mutex.h”?

Just look at the includes, they logically won’t work so I went ahead and
changed all locations of the reference to files under threads/ folder, which
is complete fix then.

> 
> Best regards,
> 
> Herve
> 
> -----Original Message-----
> From: yocto-bounces at yoctoproject.org 
> [mailto:yocto-bounces at yoctoproject.org]
> On Behalf Of Khem Raj
> Sent: vendredi 14 août 2015 02:41
> To: yocto at yoctoproject.org
> Subject: ***SPAM*** [yocto] [meta-raspberrypi][PATCH 3/4] userland: 
> Adjust include location for pthreads-headers
> 
> vcos headers include headers like "vcos_platform.h" "vcos_futex_mutex.h"
> "vcos_platform_types.h" and these headers are different based on 
> platform/OSes. e.g. OS targets that support pthreads these headers 
> should come from pthreads/ folder but not for others. So one would add 
> right -I option for every package that accesses them directly or 
> indirectly. so if a software does #include <EGL/egl.h> then it will 
> break
> 
> | In file included from
> /mnt/home/kraj/work/angstrom/build/tmp-angstrom-glibc/sysroots/raspber
> rypi2/ usr/include/interface/vcos/vcos_assert.h:149:0,
> |                  from
> /mnt/home/kraj/work/angstrom/build/tmp-angstrom-glibc/sysroots/raspber
> rypi2/ usr/include/interface/vcos/vcos.h:114,
> |                  from
> /mnt/home/kraj/work/angstrom/build/tmp-angstrom-glibc/sysroots/raspber
> rypi2/ usr/include/interface/vmcs_host/vc_dispmanx.h:33,
> |                  from
> /mnt/home/kraj/work/angstrom/build/tmp-angstrom-glibc/sysroots/raspber
> rypi2/
> usr/include/EGL/eglplatform.h:110,
> |                  from
> /mnt/home/kraj/work/angstrom/build/tmp-angstrom-glibc/sysroots/raspber
> rypi2/
> usr/include/EGL/egl.h:36,
> |                  from
> /mnt/home/kraj/work/angstrom/build/tmp-angstrom-glibc/work/armv7at2hf-
> vfp-ne 
> on-angstrom-linux-gnueabi/weston/1.8.0-r0/weston-1.8.0/clients/../shar
> ed/pla
> tform.h:29,
> |                  from
> /mnt/home/kraj/work/angstrom/build/tmp-angstrom-glibc/work/armv7at2hf-
> vfp-ne 
> on-angstrom-linux-gnueabi/weston/1.8.0-r0/weston-1.8.0/clients/window.
> h:33,
> |                  from
> /mnt/home/kraj/work/angstrom/build/tmp-angstrom-glibc/work/armv7at2hf-
> vfp-ne
> on-angstrom-linux-gnueabi/weston/1.8.0-r0/weston-1.8.0/clients/eventde
> mo.c:4
> 0:
> |
> /mnt/home/kraj/work/angstrom/build/tmp-angstrom-glibc/sysroots/raspber
> rypi2/
> usr/include/interface/vcos/vcos_types.h:38:33:
> fatal error: vcos_platform_types.h: No such file or directory
> |  #include "vcos_platform_types.h"
> |                                  ^
> | compilation terminated.
> 
> This is wrong, it should not happen since doing simple #include 
> <EGL/egl.h> should not demand manual addition of some internal paths 
> tobe added to -I flags.
> 
> This patch fixes the headers which refer to headers inside pthreads/ 
> folder to prefix them with pthreads/ so we dont have to specify 
> additional paths
> 
> This fixes weston on rpi and I believe there are more patches now to
> 
> recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_%.bbappend
> recipes-multimedia/omxplayer/omxplayer_git.bb
> 
> which can be removed as well
> 
> Signed-off-by: Khem Raj <raj.khem at gmail.com>
> ---
> recipes-graphics/userland/userland_git.bb | 8 ++++++++
> 1 file changed, 8 insertions(+)
> 
> diff --git a/recipes-graphics/userland/userland_git.bb
> b/recipes-graphics/userland/userland_git.bb
> index 6c7200c..188237a 100644
> --- a/recipes-graphics/userland/userland_git.bb
> +++ b/recipes-graphics/userland/userland_git.bb
> @@ -37,6 +37,14 @@ PACKAGECONFIG[wayland] =
"-DBUILD_WAYLAND=TRUE,,wayland,"
> 
> CFLAGS_append = " -fPIC"
> 
> +do_install_append () {
> +	for f in `find ${D}${includedir}/interface/vcos/ -name "*.h"`; do
> +		sed -i 's/include "vcos_platform.h"/include
> "pthreads\/vcos_platform.h"/g' ${f}
> +		sed -i 's/include "vcos_futex_mutex.h"/include
> "pthreads\/vcos_futex_mutex.h"/g' ${f}
> +		sed -i 's/include "vcos_platform_types.h"/include
> "pthreads\/vcos_platform_types.h"/g' ${f}
> +	done
> +}
> +
> # Shared libs from userland package  build aren't versioned, so we 
> need  # to force the .so files into the runtime package (and keep them  
> # out of -dev package).
> --
> 2.1.4
> 
> --
> _______________________________________________
> yocto mailing list
> yocto at yoctoproject.org
> https://lists.yoctoproject.org/listinfo/yocto
> 




More information about the yocto mailing list