From patchwork Fri Jul 13 17:21:30 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Khem Raj X-Patchwork-Id: 141941 Delivered-To: patch@linaro.org Received: by 2002:a2e:9754:0:0:0:0:0 with SMTP id f20-v6csp1056827ljj; Fri, 13 Jul 2018 10:21:45 -0700 (PDT) X-Google-Smtp-Source: AAOMgpcbOrZEMLdfJBCFxMe9DU5qSK2l3gwKaOGL6njQBY+f0xIc8FEh4DVA3au+mfZkkbjxRvPT X-Received: by 2002:a62:1e81:: with SMTP id e123-v6mr7947210pfe.188.1531502505465; Fri, 13 Jul 2018 10:21:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531502505; cv=none; d=google.com; s=arc-20160816; b=FieLI76yXwnhvoQSmMWFPWJJNVAkCfK0R2AXGxpuZCgZtphOQbGTnYlvkW3RgjdIpL yJvT7oD7X0kwUPEOSoQsp4H7HpTZYHDu8fAl9Nb52hucZbdT3K/p9QjVor8D8EnhrtBc PCU8UFYPabUESDI1G1LHNrNQXZGXTn8pzP0jLEAdrwi13174hHKqkjiAbljsonoeWSee 0snYNgvPOCGaEkU6Ndp/8UPXd2NYgHDcUpkFEBlIERCYWxVk7HhrN+leF4hsVo2M7qqV UQEgodP97s/pEy4YYM3eSS75ReGKlBqJ2d/4h9gCRArUkGpPVfSYp5CpNR1UdTBh0xsr KOfw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:sender:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:message-id:date:to:from:dkim-signature :delivered-to:arc-authentication-results; bh=0/W7j7Vbiq19qyZI4kq94ji7PjpuAPaCv8BXpE0rx9g=; b=VnnCkMm8ToUmliYa1CfVdxDI36+QF7g+fDAmWF8HMrUl8MOdI/zuzfGl3f6lkNJosM 6NkpQWK+bMa1BZGq/+xNvUGAjX0D9xN2sRQMO1OdFhZ5bw89EI6RbDQSL5cQpKikantx BNnn7fhwQPkGAe/2MLOm3JxLBhFBvsKY7aCht4hXA1obD4lrBDUcjNJrxSCEFqkgBzze bm5OpH4fYodEOgLuioP4wj2Mt+UtDsSJniCf/WEKzBYXxk02He/PPlsKjaStJOToNmdh NECl2qGd+yvVUwTGLG4cmRgAC2GSx72hv3q3rnWSXWI3g27AtDcGhYjROrP1QKPsq83f R/tw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=teLhXBgG; spf=pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-core-bounces@lists.openembedded.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from mail.openembedded.org (mail.openembedded.org. [140.211.169.62]) by mx.google.com with ESMTP id q66-v6si12918951pfk.268.2018.07.13.10.21.45; Fri, 13 Jul 2018 10:21:45 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) client-ip=140.211.169.62; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=teLhXBgG; spf=pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-core-bounces@lists.openembedded.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from layers.openembedded.org (localhost [127.0.0.1]) by mail.openembedded.org (Postfix) with ESMTP id AE6C378882; Fri, 13 Jul 2018 17:21:40 +0000 (UTC) X-Original-To: openembedded-core@lists.openembedded.org Delivered-To: openembedded-core@lists.openembedded.org Received: from mail-pf0-f171.google.com (mail-pf0-f171.google.com [209.85.192.171]) by mail.openembedded.org (Postfix) with ESMTP id C734C78862 for ; Fri, 13 Jul 2018 17:21:38 +0000 (UTC) Received: by mail-pf0-f171.google.com with SMTP id u16-v6so22985237pfh.3 for ; Fri, 13 Jul 2018 10:21:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=UBeguqz7dKQ52zghW8wv8l05Rwe2CxvdISfZVTCQ/k0=; b=teLhXBgGQ74O/vgWUKN/Olfo6VvQtsQNEl3nRw80/rcJ6ClIUfLEBxqnZofQxznysN gxHfjxbwqUZJMB/MMLH5Aqx63PlQ+xTj6JIhGADLomr2O/FgJCtAbYVNDUeEsOi/7VV0 xjvm9Yfh/MUt2e+pb6dJdj4HdkhopOXjA6bZLgcDIjbTt1SXQDgIpA3zn9q4Gk/+QTA9 NUcA6Va2sYraYJGSu1pFw1PeFoJgVd+DyWUxAlFp6aaAA/4bI3iP2hiDWza6sg4A4YLY ie/imlO6hy1w66mvuqOP8jicD6Plb/Xn+4V9aR5O/rzsXLbWpiBqKdsj0s4a+I4HmHFa 2PMA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=UBeguqz7dKQ52zghW8wv8l05Rwe2CxvdISfZVTCQ/k0=; b=mywoHQ7AqJEBzkak4/LUv+Cb6o4tGZpNhPQzdCvWWeC8WRLqWc4F1reJzfIdugiiYy R4u8JP7/Xly7gz3ss7mC5VM/ZC9k2Gb8aC7TttWMBGa9leNzPmZ6+ZQT8AGVmvoxFwBY xgN04DRjHHpD77rFalICUaa0s24ZpkpPqIy2bVQC0VviknZ7Cvo3ExbYYhMR6DO9nqZ5 vbqf40BairWuv8j4pz551SK9lkkQLeiSCSpxklkZDulYJZdCkieZCBZfqg797IhUs74R tAq5mE4p6lgsl9qc7pcC50XJ/uRXBs7edmEZFhNuL7eVZZ3OsJOzxsf6QytBM6YOds3L gDQw== X-Gm-Message-State: AOUpUlE3FGXob0iWBcH6+m5nHIInSPZPhPTMpyZ9YksBJN2xnSR4LN8n QfaUme692UsnGl2KQjKRWpHrEA== X-Received: by 2002:a63:1546:: with SMTP id 6-v6mr6949735pgv.271.1531502499431; Fri, 13 Jul 2018 10:21:39 -0700 (PDT) Received: from localhost.localdomain ([2601:646:877f:9499::1736]) by smtp.gmail.com with ESMTPSA id a15-v6sm29564453pfe.32.2018.07.13.10.21.38 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 13 Jul 2018 10:21:38 -0700 (PDT) From: Khem Raj To: openembedded-core@lists.openembedded.org Date: Fri, 13 Jul 2018 10:21:30 -0700 Message-Id: <20180713172130.14962-1-raj.khem@gmail.com> X-Mailer: git-send-email 2.18.0 Subject: [OE-core] [PATCH V2] mesa: Fix bild with wayland and egl X-BeenThere: openembedded-core@lists.openembedded.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Patches and discussions about the oe-core layer List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: openembedded-core-bounces@lists.openembedded.org Errors-To: openembedded-core-bounces@lists.openembedded.org When we have wayland enabled with egl then it enables the wayland plugin which actually fails to build because its not finding wayland-protocol xml templates in proper location which is recipe sysroot since we are cross compiling Fixes build errors e.g. make[4]: *** No rule to make target `//usr/share/wayland-protocols/unstable/linux-dmabuf/linux-dmabuf-unstable-v1.xml', needed by `drivers/dri2/linux-dmabuf-unstable-v1-client-protocol.h'. Stop. make[4]: *** Waiting for unfinished jobs.... Signed-off-by: Khem Raj --- ...ss-compile-WAYLAND_PROTOCOLS_DATADIR.patch | 24 +++++++++++++++++++ meta/recipes-graphics/mesa/mesa.inc | 2 ++ meta/recipes-graphics/mesa/mesa_18.1.3.bb | 1 + 3 files changed, 27 insertions(+) create mode 100644 meta/recipes-graphics/mesa/files/cross-compile-WAYLAND_PROTOCOLS_DATADIR.patch -- 2.18.0 -- _______________________________________________ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core diff --git a/meta/recipes-graphics/mesa/files/cross-compile-WAYLAND_PROTOCOLS_DATADIR.patch b/meta/recipes-graphics/mesa/files/cross-compile-WAYLAND_PROTOCOLS_DATADIR.patch new file mode 100644 index 0000000000..b4e3c4995f --- /dev/null +++ b/meta/recipes-graphics/mesa/files/cross-compile-WAYLAND_PROTOCOLS_DATADIR.patch @@ -0,0 +1,24 @@ +use PKG_CHECK_VAR for defining WAYLAND_PROTOCOLS_DATADIR + +This allows to override the wayland-protocols pkgdatadir with the +WAYLAND_PROTOCOLS_DATADIR from environment. + +pkgconfig would return an absolute path in /usr/share/wayland-protocols +for the pkgdatadir value, which is not suitable for cross-compiling. + +Signed-off-by: Khem Raj +Upstream-Status: Pending + +Index: mesa-18.1.2/configure.ac +=================================================================== +--- mesa-18.1.2.orig/configure.ac ++++ mesa-18.1.2/configure.ac +@@ -1808,7 +1808,7 @@ for plat in $platforms; do + PKG_CHECK_MODULES([WAYLAND_CLIENT], [wayland-client >= $WAYLAND_REQUIRED]) + PKG_CHECK_MODULES([WAYLAND_SERVER], [wayland-server >= $WAYLAND_REQUIRED]) + PKG_CHECK_MODULES([WAYLAND_PROTOCOLS], [wayland-protocols >= $WAYLAND_PROTOCOLS_REQUIRED]) +- WAYLAND_PROTOCOLS_DATADIR=`$PKG_CONFIG --variable=pkgdatadir wayland-protocols` ++ PKG_CHECK_VAR([WAYLAND_PROTOCOLS_DATADIR], [wayland-protocols >= $WAYLAND_PROTOCOLS_REQUIRED], pkgdatadir) + + AC_PATH_PROG([WAYLAND_SCANNER], [wayland-scanner], [:]) + diff --git a/meta/recipes-graphics/mesa/mesa.inc b/meta/recipes-graphics/mesa/mesa.inc index 6d61e09bc5..860a2d94cc 100644 --- a/meta/recipes-graphics/mesa/mesa.inc +++ b/meta/recipes-graphics/mesa/mesa.inc @@ -110,6 +110,8 @@ FULL_OPTIMIZATION_append = " -fno-omit-frame-pointer" CFLAGS_append_armv5 = " -DMISSING_64BIT_ATOMICS" +EXTRA_OEMAKE += "WAYLAND_PROTOCOLS_DATADIR=${STAGING_DATADIR}/wayland-protocols" + # Remove the mesa dependency on mesa-dev, as mesa is empty RDEPENDS_${PN}-dev = "" diff --git a/meta/recipes-graphics/mesa/mesa_18.1.3.bb b/meta/recipes-graphics/mesa/mesa_18.1.3.bb index 1c76f4b1b1..d72f5d0b6d 100644 --- a/meta/recipes-graphics/mesa/mesa_18.1.3.bb +++ b/meta/recipes-graphics/mesa/mesa_18.1.3.bb @@ -8,6 +8,7 @@ SRC_URI = "https://mesa.freedesktop.org/archive/mesa-${PV}.tar.xz \ file://0006-Use-Python-3-to-execute-the-scripts.patch \ file://0007-dri-i965-Add-missing-time.h-include.patch \ file://0008-egl-fix-build-race-in-automake.patch \ + file://cross-compile-WAYLAND_PROTOCOLS_DATADIR.patch \ " SRC_URI[md5sum] = "b34273403a605f6f98ead00f0bdf8e0b"