From patchwork Mon Jan 27 08:54:35 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Jansa X-Patchwork-Id: 56142 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 0E98FC0218F for ; Mon, 27 Jan 2025 08:54:49 +0000 (UTC) Received: from mail-ej1-f47.google.com (mail-ej1-f47.google.com [209.85.218.47]) by mx.groups.io with SMTP id smtpd.web11.47416.1737968082530720252 for ; Mon, 27 Jan 2025 00:54:42 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20230601 header.b=aD3PwCRi; spf=pass (domain: gmail.com, ip: 209.85.218.47, mailfrom: martin.jansa@gmail.com) Received: by mail-ej1-f47.google.com with SMTP id a640c23a62f3a-ab2b29dfc65so669263866b.1 for ; Mon, 27 Jan 2025 00:54:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1737968081; x=1738572881; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=SdxxLRSUsILSxyTCV8RmdqQS/RcPmsciQap9rHqjF7c=; b=aD3PwCRihiZdELWvszDJy/zUiDhoVKFT3TgdymFoSrCL3770r1s1OTeZwwWgKaCnaR cdcox6Oa0qMW6US+SP4sEqS0KO79WvfYNnku+l6rB8uPAET3NBQRBnZnuR2PzAAuLG7O 0ulq7F84B1WAYE9syBqJDBzNs7GozBmaRwdjUNhSk3JfOWj0OwDak40rIYLKT6o8mUUA uxSlo0jS2qjJL9NpuOT84snF4gT8NDwi81jjIF6B1JBuXd2gqz8mkhLDMT7RuXUBJu/Z bDV1RQ9FDmut6Qnrv5K8O1Jq6JHUxv7Dj/BOu/a7uwwOXjnNhPVU3vgNN2pWorC+jtuv hPhQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737968081; x=1738572881; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=SdxxLRSUsILSxyTCV8RmdqQS/RcPmsciQap9rHqjF7c=; b=X8NluX85GHWY4bPfcNJ8AdC6Q+3K19oUdP16vJqNsncnd3UMu3YIlpC5TH+UU5lS5J EUCZvgf/2xuDq2nI5ed6qEZM4Dnr+OtYGJMj8egyIDJlFhZFzVIrz5gu09z32gpBQEdz YUuJl1O538GUpnfnb/izosm3hzdtXahTNyDkZruVeNupLUmouTKhfZkt4CGpouYCjaeQ RoqNjtXiF3r16L8qgYdhgGGGzSrhgvteu6MFj6HYBqUh38rV7rVunkum2uUPb/tPqDSx rEY7OZT+P1UlPgsh0NcX7COe4q/0e9EL8ESZH+RrM3GmD8FInqV1fAEuNF8OrpOKpI7V a05A== X-Gm-Message-State: AOJu0YyszJdif9wBBqNCvvPkiO9BNINBYC62Gld3S6bB+HcCeMiq6X+A iRq00B8a3QoDgkm+0H0zzO68ieRH5bHWUllganSgMr5i8g59YSdaYNq+1Q== X-Gm-Gg: ASbGncskmJTtSIz9SJsJSYq7iJqpYY0L9jbSRgECChVSkup9a85/tzpNVOMtaDO44vV k50AGJhe+SYZ2moBU5GnL+y/nYYYaF5lvLJcxV9ov9WjuINdxqgZXfYOEWXMwT13DXJnE/bbTDI tYSwDbPNZMHTEPjTXbGoZN0FBefyBu15+MDox7t7rSpyX64bZ+RsUwDsjf0BX9tPbHEhf6lD7CG 1Eq462pETJ6VSc9e4Ht257SurBwB9Hx3EJLyo5H3sd3xXjsaixrS+Iz4XIrrjASLgYCyr6GThnF C/IDJs9pYGGq/EZwo8XcxDe+G90hIQzPuWIRAg== X-Google-Smtp-Source: AGHT+IEzKuxwPeiWMZEV6vKOO7JkZ0TlT/VcGPlKQ8L38Rk6DFFsJD8Zn7Q4vB3RwnG1BN656nRkrg== X-Received: by 2002:a17:907:706:b0:ab3:2b9a:4a5a with SMTP id a640c23a62f3a-ab38b3c6a1emr4277631666b.51.1737968080598; Mon, 27 Jan 2025 00:54:40 -0800 (PST) Received: from localhost (ip-109-238-218-228.aim-net.cz. [109.238.218.228]) by smtp.gmail.com with UTF8SMTPSA id a640c23a62f3a-ab676116b23sm552406666b.178.2025.01.27.00.54.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Jan 2025 00:54:40 -0800 (PST) From: Martin Jansa To: openembedded-devel@lists.openembedded.org Cc: akuster808@gmail.com, Zhang Peng , Khem Raj Subject: [meta-oe][scarthgap][PATCH 1/3] lapack: fix TMPDIR reference in do_package_qa Date: Mon, 27 Jan 2025 09:54:35 +0100 Message-ID: <20250127085437.54643-1-martin.jansa@gmail.com> X-Mailer: git-send-email 2.48.1 MIME-Version: 1.0 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 ; Mon, 27 Jan 2025 08:54:49 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-devel/message/115106 From: Zhang Peng When building the `lapack` package, the following QA error occurs: "File /usr/lib64/libblas.so.3.12.0 in package lapack contains reference to TMPDIR [buildpaths]" The issue arises because the `xerbla.o` object file embeds the absolute host path of `xerbla.f`. This occurs during compilation, where the build command in `build.make` (generated by CMake) specifies: `gfortran -c /xerbla.f -o`. As a result, the absolute path is included in `xerbla.o`. Unfortunately, `gfortran` does not support flags like `-fdebug-prefix-map` or `-ffile-prefix-map` to remove such paths. To resolve this, the fix involves replacing the absolute path of `xerbla.f` in the generated `build.make` file with a relative path before the compilation step. This ensures that the resulting `xerbla.o` does not contain any references to TMPDIR, passing the `do_package_qa` check. For ptest code, the solution is to replace `${WORKDIR}` with `../../..` in the generated `build.make` files located in the TESTING directory. Signed-off-by: Zhang Peng Signed-off-by: Khem Raj --- .../recipes-devtools/lapack/lapack_3.12.0.bb | 31 +++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/meta-oe/recipes-devtools/lapack/lapack_3.12.0.bb b/meta-oe/recipes-devtools/lapack/lapack_3.12.0.bb index fef9d3a80e..4357515b71 100644 --- a/meta-oe/recipes-devtools/lapack/lapack_3.12.0.bb +++ b/meta-oe/recipes-devtools/lapack/lapack_3.12.0.bb @@ -33,6 +33,37 @@ OECMAKE_GENERATOR = "Unix Makefiles" inherit cmake pkgconfig ptest EXCLUDE_FROM_WORLD = "1" +# The `xerbla.o` file contains an absolute path in `xerbla.f.o`, but the options +# `-fdebug-prefix-map` and `-ffile-prefix-map` cannot be used because gfortran does not support them. +# To address this issue, we manually replace the absolute path with a relative path +# in the generated `build.make` file. +# +# An issue has been reported: https://github.com/Reference-LAPACK/lapack/issues/1087, +# requesting a fix in the source code. +# +# This workaround resolves the TMPDIR [buildpaths] issue by converting the absolute path +# of `xerbla.f` to a relative path. The steps are as follows: +# +# 1. Locate all `build.make` files after the `do_configure` step is completed. +# 2. Compute the relative path for `xerbla.f` based on the current build directory. +# 3. Replace the absolute path with the calculated relative path in the `build.make` files +# +# Additionally, when ptests are enabled, apply a simpler workaround for ptest code: +# - Replace occurrences of `${WORKDIR}` in all `build.make` files under the TESTING directory, excluding +# the MATGEN subdirectory, with a relative path prefix of `"../../.."`. +do_configure:append(){ + for file in `find ${B} -name build.make`; do + sed -i -e "s#\(.*-c \).*\(/xerbla\.f \)#\1$(grep '\-c .*xerbla\.f' $file | awk -F'cd ' '{print $2}'| \ + awk '{src=$1; sub(/.*-c /, ""); sub(/xerbla\.f.*/, ""); obj=$0; print src, obj}' | \ + while read src obj; do echo "$(realpath --relative-to="$src" "$obj")"; done)\2#g" $file + done + if (${@bb.utils.contains('PTEST_ENABLED', '1', 'true', 'false', d)});then + for file in `find . -name build.make -path '*TESTING*' -not -path '*MATGEN*'`; do + sed -i -e "s#\(.*-c \)\(${WORKDIR}\)\(.*.[f|F] \)#\1../../..\3#g" $file + done + fi +} + do_install_ptest () { rsync -a ${B}/TESTING ${D}${PTEST_PATH} \ --exclude CMakeFiles \ From patchwork Mon Jan 27 08:54:36 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Jansa X-Patchwork-Id: 56143 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 146F2C02191 for ; Mon, 27 Jan 2025 08:54:49 +0000 (UTC) Received: from mail-ej1-f54.google.com (mail-ej1-f54.google.com [209.85.218.54]) by mx.groups.io with SMTP id smtpd.web11.47419.1737968083575297754 for ; Mon, 27 Jan 2025 00:54:43 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20230601 header.b=U/0E4FCT; spf=pass (domain: gmail.com, ip: 209.85.218.54, mailfrom: martin.jansa@gmail.com) Received: by mail-ej1-f54.google.com with SMTP id a640c23a62f3a-aaee2c5ee6eso866100166b.1 for ; Mon, 27 Jan 2025 00:54:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1737968082; x=1738572882; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=sgL/MWkyPWn8EMnrS+R2bO/mPx+210UH3ezVRBlcidk=; b=U/0E4FCTpwTk/k/xW6uFDfccmwxdZkXz/9MCkbqSDyjkbLT0sozkV9cHJaHVSdlFl9 gZH3HSSe0ttZNvYStIP+0D/UZi6EF8VBOkIup5wFjCZpt/aVArGdmG18NDb51A3om+YL vc2Rx9+pHvSp6fYxK12jl/1gn87HKJ2dtRuuZYBune5hkxG27xOT2+g910Wczg7gY7jY nw3wZU4kWj/M55F/w7eqZ6JXCAKHmVTvxtu4MMJB+iwsQaclwroyD1/ZI5w0EPP2ojVx vED1XDeyUWhChejp2k3SJs/uNCYhMIrusU6/cVmqTavbuwvtG1BrcmSLlJO6GlIOjGiT JN1Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737968082; x=1738572882; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=sgL/MWkyPWn8EMnrS+R2bO/mPx+210UH3ezVRBlcidk=; b=Z/mpCXe3JDZKXIk2AJo7CuzGRcNRRhStT+tBqzPr4OwylpIiMhYGSZ+R73PDKu4Z+R /XD0n5NdJ29Vkh5nWVtixcWRUzzc0vG/EysPF6T9Y5yvWqMXyR8gD0Gt87TWvy9p4fu5 E+X+Rs+ZoNvYsqzmx4h7IKOzGqbVeoVwWL0lLkT7Ei9qx+VLispQ+Dw+WuQ/9pJrC6ky HKm4G4h4zlh/OEokuIWoudyqM/9nPM3BBxXzstKMaR2a5iPQ/3MyrwRCrdan7Nj5+UIU JG+Em4vaMH9ePqWOCKqt0ZRp6NgNagsJMRlgpkVtfVIzvbKipI7ze0HBeKxz1zfa2/g+ dUaw== X-Gm-Message-State: AOJu0YwWrOdrwZVyc9GuwJUKAwXHvmAAYt/Bb6Qf1ZA3067weL281bH9 Rdk8SJ/5VYBbjZwbGBicx8lA+SFebiIXhrbVvlKEGn5vMqXkbD/q/E+N4g== X-Gm-Gg: ASbGncuGAfrJBTagGz6bUhs9YfQiZjk2gGKVQO6tjhkOilBBfbOGpbdIxSjtDl5v063 4y7JjRE08FD3jYvoV544OzDHQ+TVCz/YAIrQ3aRRB4jVx+m0P+JWyZjQrlFt9ssJujQU+VRno57 qjyaog3VE0U4uRV4CQgKsDW0msp4OE1zRnofX+cuENtYbMMzrhAz7jBGSYuvHHhq3qxBRwm9AvT pnHyGCiZdyesaz04PloHJ3a1dPrQk+rHQTH01Sew+NWfnqVYEDdL33yr/kC9wAOWB1APHBeYH7k YKw4vz8+cc8QhjQJrTsp6i+8u1eYNZZOIzLbEMegAWBQmDPz X-Google-Smtp-Source: AGHT+IGxvuB1A3yW2FH8Hvz7ZtSnXzbVc5x3iXbCDFZBDxGPSscrfGCxb4WVy4e5qtGJJXVfe3bJwg== X-Received: by 2002:a17:907:60d2:b0:aa6:82ea:69d6 with SMTP id a640c23a62f3a-ab38b10cfbfmr3432063466b.18.1737968081592; Mon, 27 Jan 2025 00:54:41 -0800 (PST) Received: from localhost (ip-109-238-218-228.aim-net.cz. [109.238.218.228]) by smtp.gmail.com with UTF8SMTPSA id a640c23a62f3a-ab6760b76b7sm542137466b.87.2025.01.27.00.54.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Jan 2025 00:54:41 -0800 (PST) From: Martin Jansa To: openembedded-devel@lists.openembedded.org Cc: akuster808@gmail.com, Martin Jansa Subject: [meta-oe][scarthgap][PATCH 2/3] lapack: add PACKAGECONFIG for cblas Date: Mon, 27 Jan 2025 09:54:36 +0100 Message-ID: <20250127085437.54643-2-martin.jansa@gmail.com> X-Mailer: git-send-email 2.48.1 In-Reply-To: <20250127085437.54643-1-martin.jansa@gmail.com> References: <20250127085437.54643-1-martin.jansa@gmail.com> MIME-Version: 1.0 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 ; Mon, 27 Jan 2025 08:54:49 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-devel/message/115107 Signed-off-by: Martin Jansa --- meta-oe/recipes-devtools/lapack/lapack_3.12.0.bb | 1 + 1 file changed, 1 insertion(+) diff --git a/meta-oe/recipes-devtools/lapack/lapack_3.12.0.bb b/meta-oe/recipes-devtools/lapack/lapack_3.12.0.bb index 4357515b71..aafcdef681 100644 --- a/meta-oe/recipes-devtools/lapack/lapack_3.12.0.bb +++ b/meta-oe/recipes-devtools/lapack/lapack_3.12.0.bb @@ -24,6 +24,7 @@ S = "${WORKDIR}/git" PACKAGECONFIG ?= "" PACKAGECONFIG[lapacke] = "-DLAPACKE=ON,-DLAPACKE=OFF" +PACKAGECONFIG[cblas] = "-DCBLAS=ON,-DCBLAS=OFF" EXTRA_OECMAKE = " -DBUILD_SHARED_LIBS=ON \ ${@bb.utils.contains('PTEST_ENABLED', '1', ' -DBUILD_TESTING=ON', '', d)} \ From patchwork Mon Jan 27 08:54:37 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Jansa X-Patchwork-Id: 56141 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 0E95BC0218C for ; Mon, 27 Jan 2025 08:54:49 +0000 (UTC) Received: from mail-ej1-f50.google.com (mail-ej1-f50.google.com [209.85.218.50]) by mx.groups.io with SMTP id smtpd.web11.47420.1737968084595706857 for ; Mon, 27 Jan 2025 00:54:44 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20230601 header.b=FNXdp2OY; spf=pass (domain: gmail.com, ip: 209.85.218.50, mailfrom: martin.jansa@gmail.com) Received: by mail-ej1-f50.google.com with SMTP id a640c23a62f3a-aaf900cc7fbso666770866b.3 for ; Mon, 27 Jan 2025 00:54:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1737968083; x=1738572883; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=x/APBb2q/AqCfEO+JT1Q+/Y+2hQMGowRnoBEY08AELk=; b=FNXdp2OYTUNDuPHOTRva5P/fcYvla0xBdDh9OCU0wuPYhNIXl1sEoVBN5iC5RN0u+B fjbGzlDYe0V8w1Xo59z/FlD2uu44qZTtmM1o+UAHS+Hr61t5ANwL9cuoujJdgWx5c/Kj 6+NyOyGL2U2cGYYzxE700rdnOw0cbC7lPuq1LxVYCUp2Cy48tj9qVaU3VlMruvwtkFyS 0bYY607/sebm3bM5+SW8l/iKcr+E+YmBP397VaP+Sj0Z451qEl3cgIzcY4qU+i0ZkOFU JQTVTX+CP9ght8FbD8UfGvayBYeuvCku3zf6fECjNfoU63YGrnXQAjI4cllh5exfkOm+ CeDg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737968083; x=1738572883; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=x/APBb2q/AqCfEO+JT1Q+/Y+2hQMGowRnoBEY08AELk=; b=a9nYKKARNR41hLGobr69h/5/VGY6w8bD5FFDvpouq9p6Y+l687EtNmvQZZ8CwFKKt4 sFdXSBColYgiuKm8IV2J7r+CgAVSvTOjAInFIHWa7FtDDdNxmpredl9wd2eb11XtK2jd +aeLHmQvlWil6tpuMcaM/1GsRncJwui1YyCWbNL438kRudDi9vi/uviWzP5oAgqO6c5u 0VpqvOKewSweUtWHZmHqm1lT4GQ9BFCIJltabWobDZSnM45lPTclyH6eIejIggBA/2+s 59Y+2YIVj/kRAs4PeoMgEjUYdgPp6x/dut1lGUzJ9JtXrtWk4fUcpFxHHMMAJnLdgX7R j4Bg== X-Gm-Message-State: AOJu0YzsUX7CAGHiuicJXLU4ZzuzPD095cf/q0OfNqgeLi2VL7rwLapQ IxzB9/Lpeo2Tdgq6z53P/10PtVQY0IFyYOeaKag+rDC8TLOxXQpHROx+iw== X-Gm-Gg: ASbGncuPjI05JDlPvGuTR3BwDkjuwHBDetfFWuxdNfcNRaJHAd2g4v8w9710JET/wlm gaeGDcxTJEdrNYUzmxVHfddK8PxmjL/UGJNfkfiAD/yYmbrt49PjB2JV3SGUSBhox8Pz+dCNb0E PhAHN8ybwFsQ6CyJCsvNxdLfQ/gr2swZT1NPh3+EZ3Qgqg/HXoANXAFVQ8Ol7fEgsCBEmcEqzPj hych8zlMqqANu8zkGz0C+ff5PAQDTUqWtMQU4PR3wl3whT9t5ExdflkonB6WuepsGz1SzX33gfh Vkd818CPd9sWBBbZmEWsz4YVZVOAAVm4nCgKRQ== X-Google-Smtp-Source: AGHT+IEmYKgyHVy3Mhty32ao9amLJzldUvsC0UjDg0CqSvcm+lR6qV0yNmOh/Nx88JgzPJgdj52ZLw== X-Received: by 2002:a17:907:da6:b0:ab6:5413:fb13 with SMTP id a640c23a62f3a-ab65413fbb1mr2014823066b.23.1737968082864; Mon, 27 Jan 2025 00:54:42 -0800 (PST) Received: from localhost (ip-109-238-218-228.aim-net.cz. [109.238.218.228]) by smtp.gmail.com with UTF8SMTPSA id a640c23a62f3a-ab6760fbbbasm550008066b.146.2025.01.27.00.54.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Jan 2025 00:54:42 -0800 (PST) From: Martin Jansa To: openembedded-devel@lists.openembedded.org Cc: akuster808@gmail.com, Martin Jansa Subject: [meta-oe][scarthgap][PATCH 3/3] lapack: fix buildpaths in ptest also when CBLAS is enabled Date: Mon, 27 Jan 2025 09:54:37 +0100 Message-ID: <20250127085437.54643-3-martin.jansa@gmail.com> X-Mailer: git-send-email 2.48.1 In-Reply-To: <20250127085437.54643-1-martin.jansa@gmail.com> References: <20250127085437.54643-1-martin.jansa@gmail.com> MIME-Version: 1.0 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 ; Mon, 27 Jan 2025 08:54:49 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-devel/message/115108 ERROR: lapack-3.12.0-r0 do_package_qa: QA Issue: File /usr/lib/lapack/ptest/bin/xccblat3 in package lapack-ptest contains reference to TMPDIR File /usr/lib/lapack/ptest/bin/xdcblat3 in package lapack-ptest contains reference to TMPDIR File /usr/lib/lapack/ptest/bin/xdcblat1 in package lapack-ptest contains reference to TMPDIR File /usr/lib/lapack/ptest/bin/xscblat1 in package lapack-ptest contains reference to TMPDIR File /usr/lib/lapack/ptest/bin/xccblat2 in package lapack-ptest contains reference to TMPDIR File /usr/lib/lapack/ptest/bin/xzcblat2 in package lapack-ptest contains reference to TMPDIR File /usr/lib/lapack/ptest/bin/xzcblat1 in package lapack-ptest contains reference to TMPDIR File /usr/lib/lapack/ptest/bin/xccblat1 in package lapack-ptest contains reference to TMPDIR File /usr/lib/lapack/ptest/bin/xdcblat2 in package lapack-ptest contains reference to TMPDIR File /usr/lib/lapack/ptest/bin/xscblat2 in package lapack-ptest contains reference to TMPDIR File /usr/lib/lapack/ptest/bin/xscblat3 in package lapack-ptest contains reference to TMPDIR File /usr/lib/lapack/ptest/bin/xzcblat3 in package lapack-ptest contains reference to TMPDIR [buildpaths] Signed-off-by: Martin Jansa --- .../recipes-devtools/lapack/lapack_3.12.0.bb | 23 ++++++++++++++----- 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/meta-oe/recipes-devtools/lapack/lapack_3.12.0.bb b/meta-oe/recipes-devtools/lapack/lapack_3.12.0.bb index aafcdef681..4845d34106 100644 --- a/meta-oe/recipes-devtools/lapack/lapack_3.12.0.bb +++ b/meta-oe/recipes-devtools/lapack/lapack_3.12.0.bb @@ -35,7 +35,12 @@ inherit cmake pkgconfig ptest EXCLUDE_FROM_WORLD = "1" # The `xerbla.o` file contains an absolute path in `xerbla.f.o`, but the options -# `-fdebug-prefix-map` and `-ffile-prefix-map` cannot be used because gfortran does not support them. +# `-fdebug-prefix-map` and `-ffile-prefix-map` cannot be used because gfortran does +# not support them. And we cannot easily change CMake to use relative paths, because +# it will convert them to absolute paths when generating Unix Makefiles or Ninja: +# https://gitlab.kitware.com/cmake/community/-/wikis/FAQ#why-does-cmake-use-full-paths-or-can-i-copy-my-build-tree +# https://gitlab.kitware.com/cmake/cmake/-/issues/13894 +# # To address this issue, we manually replace the absolute path with a relative path # in the generated `build.make` file. # @@ -46,7 +51,7 @@ EXCLUDE_FROM_WORLD = "1" # of `xerbla.f` to a relative path. The steps are as follows: # # 1. Locate all `build.make` files after the `do_configure` step is completed. -# 2. Compute the relative path for `xerbla.f` based on the current build directory. +# 2. Compute the relative path for various `*.f` files based on the current build directory. # 3. Replace the absolute path with the calculated relative path in the `build.make` files # # Additionally, when ptests are enabled, apply a simpler workaround for ptest code: @@ -54,11 +59,17 @@ EXCLUDE_FROM_WORLD = "1" # the MATGEN subdirectory, with a relative path prefix of `"../../.."`. do_configure:append(){ for file in `find ${B} -name build.make`; do - sed -i -e "s#\(.*-c \).*\(/xerbla\.f \)#\1$(grep '\-c .*xerbla\.f' $file | awk -F'cd ' '{print $2}'| \ - awk '{src=$1; sub(/.*-c /, ""); sub(/xerbla\.f.*/, ""); obj=$0; print src, obj}' | \ - while read src obj; do echo "$(realpath --relative-to="$src" "$obj")"; done)\2#g" $file + # Replacing all .f files found with: + # for f in $(find ${S} -name \*.f -printf " %f" | sort -u); do + # would be more reliable with other optional PACKAGECONFIGs, but also very slow as there are + # ~ 3500 of them and this loop takes around 20 minutes + for f in xerbla c_cblat1 c_cblat2 c_cblat3 c_dblat1 c_dblat2 c_dblat3 c_sblat1 c_sblat2 c_sblat3 c_zblat1 c_zblat2 c_zblat3; do + sed -i -e "s#\(.*-c \).*\(/$f\.f \)#\1$(grep "\-c .*$f\.f" $file | awk -F'cd ' '{print $2}'| \ + awk "{src=\$1; sub(/.*-c /, \"\"); sub(/$f\.f.*/, \"\"); obj=\$0; print src, obj}" | \ + while read src obj; do echo "$(realpath --relative-to="$src" "$obj")"; done)\2#g" $file + done done - if (${@bb.utils.contains('PTEST_ENABLED', '1', 'true', 'false', d)});then + if ${@bb.utils.contains('PTEST_ENABLED', '1', 'true', 'false', d)} ; then for file in `find . -name build.make -path '*TESTING*' -not -path '*MATGEN*'`; do sed -i -e "s#\(.*-c \)\(${WORKDIR}\)\(.*.[f|F] \)#\1../../..\3#g" $file done