[OE-core] [PATCH] linux-libc-headers: exclude drm headers from sysroot

Khem Raj raj.khem at gmail.com
Thu Aug 6 03:21:12 UTC 2015


On Tue, Aug 4, 2015 at 6:58 AM, Paul Gortmaker
<paul.gortmaker at windriver.com> wrote:
> While diagnosing a problem with xf86-video-intel I noticed we had two
> copies of drm headers in the sysroot; one from here and one from
> the libdrm package.   The xf86-video-intel turned out to be another
> thing, but that doesn't mean we want two copies in the sysroot with
> different content and luck of include path indicating which one we
> get.
>
> This one landed in usr/include/drm and the libdrm one put its files
> at usr/include/libdrm, so there was no obvious over-write conflict.
>
> The obvious risk here would be unearthing implicit dependencies on
> the libdrm; things trying to build before it has populated the sysroot
> but two full highly parallel builds containing a full desktop graphics
> suite did not show any issues.

I dont think this is needed. Both have different namespace. Packages
needing libdrm one will either use
#include <libdrm/drm.h> or if they use #include <drm.h> will add
appropriate -I=/usr/include/drm or -I=/usr/include/libdrm
to demand for which devel packages they require. if they mix it us
then the package should be fixed. by removing this
from kernel headers we are changing the fundamental API that we have
supported like many other distros.
right now there might be packages which are using kernel-headers
instead of libdrm headers their behavior will silently change or
break.

>
> Cc: Bruce Ashfield <bruce.ashfield at windriver.com>
> Cc: Richard Purdie <richard.purdie at linuxfoundation.org>
> Signed-off-by: Paul Gortmaker <paul.gortmaker at windriver.com>
> ---
>  meta/recipes-kernel/linux-libc-headers/linux-libc-headers.inc | 4 ++++
>  1 file changed, 4 insertions(+)
>
> diff --git a/meta/recipes-kernel/linux-libc-headers/linux-libc-headers.inc b/meta/recipes-kernel/linux-libc-headers/linux-libc-headers.inc
> index 566bc1e6154b..bda9d3f765ed 100644
> --- a/meta/recipes-kernel/linux-libc-headers/linux-libc-headers.inc
> +++ b/meta/recipes-kernel/linux-libc-headers/linux-libc-headers.inc
> @@ -61,6 +61,10 @@ do_install() {
>         # Kernel should not be exporting this header
>         rm -f ${D}${exec_prefix}/include/scsi/scsi.h
>
> +       # if we take drm from the kernel, and a different set from libdrm
> +       # at different paths in the sysroot, then mayhem can result.
> +       rm -rf ${D}${exec_prefix}/include/drm
> +
>         # The ..install.cmd conflicts between various configure runs
>         find ${D}${includedir} -name ..install.cmd | xargs rm -f
>  }
> --
> 1.8.2.3
>
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core at lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core



More information about the Openembedded-core mailing list