Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 56D4FCD1284 for ; Tue, 2 Apr 2024 16:00:01 +0000 (UTC) Received: from mailout04.t-online.de (mailout04.t-online.de [194.25.134.18]) by mx.groups.io with SMTP id smtpd.web10.15871.1712073597235780992 for ; Tue, 02 Apr 2024 08:59:57 -0700 Authentication-Results: mx.groups.io; dkim=none (message not signed); spf=pass (domain: t-online.de, ip: 194.25.134.18, mailfrom: f_l_k@t-online.de) Received: from fwd70.aul.t-online.de (fwd70.aul.t-online.de [10.223.144.96]) by mailout04.t-online.de (Postfix) with SMTP id 51155239B2 for ; Tue, 2 Apr 2024 17:59:55 +0200 (CEST) Received: from [192.168.178.67] ([84.154.174.110]) by fwd70.t-online.de with (TLSv1.3:TLS_AES_256_GCM_SHA384 encrypted) esmtp id 1rrgYC-24RUMC0; Tue, 2 Apr 2024 17:59:52 +0200 Date: Tue, 02 Apr 2024 17:59:08 +0200 From: Markus Volk Subject: Reproducibility of mesa with opencl feature enabled To: openembedded-devel@lists.openembedded.org Message-Id: X-Mailer: geary/44.1 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="=-Mk0oX+2dtfftxgajCM0R" X-TOI-EXPURGATEID: 150726::1712073592-214FD89A-6AF363E2/0/0 CLEAN NORMAL X-TOI-MSGID: 3ce59861-91e0-40c4-9492-efe815f3040d List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Tue, 02 Apr 2024 16:00:01 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-devel/message/109783 --=-Mk0oX+2dtfftxgajCM0R Content-Type: text/plain; charset=us-ascii; format=flowed I have a question regarding the reproducibility of mesa. When mesa is built with opencl a lot of .so files have buildpath leakage. Since I finally looked into this, I have gained some insights. 1. The leak comes from CLANG_RESOURCE_DIR which contains the path of ${STAGING_DIR_HOST}. In my ninja.build it looks like this: -DCLANG_RESOURCE_DIR="/home/flk/poky/build-hypr/tmp/work/corei7-64-poky-linux/mesa/24.0.2/recipe-sysroot/usr/lib/clang/18.1.0/include 2.The include for this happens here: 3. This include is wrong in any case dep_llvm.version() = 18.0.1 (and should be 18 for current clang) Setting a different path therefore probably does not break anything additionally but helps to remove the build paths from the binaries and the source. What I have done under the assumption that this include is not needed for oe: --- a/src/gallium/frontends/clover/meson.build 2024-02-28 19:29:18.000000000 +0100 +++ b/src/gallium/frontends/clover/meson.build 2024-04-02 13:10:38.351443132 +0200 @@ -66,8 +66,7 @@ clover_cpp_args, clover_opencl_cpp_args, clover_spirv_cpp_args, - '-DCLANG_RESOURCE_DIR="@0@"'.format(join_paths( - dep_llvm.get_variable(cmake : 'LLVM_LIBRARY_DIR', configtool: 'libdir'), 'clang', + '-DCLANG_RESOURCE_DIR="@0@"'.format(join_paths( '/usr/lib/clang', dep_llvm.version(), 'include', )), ], Not vaild, because dep_llvm.version() still != 18 but Because the path was already wrong before, mesa compiled without errors as expected. Is setting CLANG_RESOURCE_DIR really not needed in oe or is this a bug and the missing headers have simply been silently ignored so far? --=-Mk0oX+2dtfftxgajCM0R Content-Type: text/html; charset=us-ascii Content-Transfer-Encoding: quoted-printable
I have a question regarding the re= producibility of mesa.

When mesa is built with ope= ncl a lot of .so files have buildpath leakage. Since I finally looked into = this, I have gained some insights. 

1. The le= ak comes from CLANG_RESOURCE_DIR which contains the path of ${STAGING_DIR_H= OST}.

In my ninja.build it looks like this:
<= div>-DCLANG_RESOURCE_DIR=3D"/home/flk/poky/build-hypr/tmp/work/corei7-64-po= ky-linux/mesa/24.0.2/recipe-sysroot/usr/lib/clang/18.1.0/include
=
2.The include for this happens here:

3. This include is wrong in any case
=
    dep_llvm.version() =3D 18.0.1 (and should be 18 for curr= ent clang)
    Setting a different path therefore proba= bly does not break anything additionally
    but helps = to remove the build paths from the binaries and the source.

<= /div>
What I have done under the assumption that this include is not ne= eded for oe:

--- a/src/gallium/frontends/clov= er/meson.build 2024-02-28 19:29:18.000000000 +0100
+++ b/src/gallium/fronten= ds/clover/meson.build 2024-04-02 13:10:38.351443132 +0200
@@ -66,8 +66,= 7 @@
     clover_cpp_args,
   =  clover_opencl_cpp_args,
     clover_spirv_c= pp_args,
-    '-DCLANG_RESOURCE_DIR=3D"@0@"'.format(joi= n_paths(
-      dep_llvm.get_variable(cmake : 'LLV= M_LIBRARY_DIR', configtool: 'libdir'), 'clang',
+    '-= DCLANG_RESOURCE_DIR=3D"@0@"'.format(join_paths( '/usr/lib/clang',
       dep_llvm.version(), 'include',
 =    )),
   ],

Not vaild, because dep_llvm.version() still !=3D 18 but 
Because the path was already wrong before, mesa compiled witho= ut errors as expected.

Is  setting CLANG_RESO= URCE_DIR really not needed in oe or is this a bug and the missing headers h= ave simply been silently ignored so far?

--=-Mk0oX+2dtfftxgajCM0R--