From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 1D7E1A0C4B for ; Wed, 27 Oct 2021 18:45:32 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 12F02410F7; Wed, 27 Oct 2021 18:45:32 +0200 (CEST) Received: from mail-lj1-f178.google.com (mail-lj1-f178.google.com [209.85.208.178]) by mails.dpdk.org (Postfix) with ESMTP id 2BC7840DDA; Wed, 27 Oct 2021 18:45:30 +0200 (CEST) Received: by mail-lj1-f178.google.com with SMTP id 17so2569264ljq.0; Wed, 27 Oct 2021 09:45:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=d6kGjW5ilOtN2DAqHvEa63LySXmRpieeoi5NDnBrP/4=; b=H1MH3Um85ygSg3lGruOiTSwrXa2lqxmG9o3Y7E8nxM+2Sk5XmxPyzUJJt4X8LrQGc7 varKR8T2MCrSk65FCGsX7geEjovx5tNe1jQQRMpXINRu2HeJ7HCSYzgfHc+m25Z5u4SE 8kPhWveLXSnLlpqBEWn5L1bEje7A/frGLMW1xKj579VrcP33MM/z7cUUJEFSem/b4CM1 +YNE5VvszAl0K3hQnfavTeci6N3bL367RRDYR5wEIXhYr56eoSC7BaM85XTPSyLmsSW2 lk8K7XKC9BQ4+ICE4ojOpkLNa+tBQbSJoLd25QK5IC+FSD3MRO0SgQJu2Qa2jexlByVS dDZw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=d6kGjW5ilOtN2DAqHvEa63LySXmRpieeoi5NDnBrP/4=; b=NNsYXUin76PiUeVwDPCkxiiUrVbaYi8oJgBz0GG6IhYAvIZshZGNAkMLHkMioRv8ui 5t5ScVorKA75HgcSQ3TLI6iWq0bJIslXcTd6HP2JnphJSju0TElZkEn0lRxROHwWTQ53 Ta/rbaRxEGPf0nKSzUfRUTwHbJTfSVBXZl8NbXJZon1sADpmR9KOHPu38xzmLlkraisc ch7OuGF3F5he0/MNc3u2NRrKucVS/EO71I7UQoIa5eUiMNFRVpOcE1twsTPzkxY5oyI9 yWtt+q4fNgPRSB9VykSG6LTYXXmI401fQgImQtI2N+ZdmWxn61QbXeCKp5+pZfGpJsSa BYgg== X-Gm-Message-State: AOAM533yiQep3E7Ez7osyGFmh3yU/moDJjiEDmYflwevN5xRjsZziNw5 Q9mNSpGmcHuiZ2UWly/P/DE= X-Google-Smtp-Source: ABdhPJw2F687SFOyrMFrM66I/LPntYnXnyuwYhAwO5AS8T5PVwVmbtJFINSa6gbTlNIAvTQtNp+SJA== X-Received: by 2002:a2e:161c:: with SMTP id w28mr10526609ljd.132.1635353129612; Wed, 27 Oct 2021 09:45:29 -0700 (PDT) Received: from sovereign (broadband-37-110-65-23.ip.moscow.rt.ru. [37.110.65.23]) by smtp.gmail.com with ESMTPSA id l13sm49199lfh.270.2021.10.27.09.45.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Oct 2021 09:45:29 -0700 (PDT) Date: Wed, 27 Oct 2021 19:45:28 +0300 From: Dmitry Kozlyuk To: Bruce Richardson Cc: dev@dpdk.org, stable@dpdk.org, Michal Berger , thomas@monjalon.net Message-ID: <20211027194528.51329515@sovereign> In-Reply-To: References: <20211026193239.113745-1-dmitry.kozliuk@gmail.com> X-Mailer: Claws Mail 3.18.0 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-stable] [PATCH] buildtools: fix build with meson 0.60 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" 2021-10-27 17:16 (UTC+0100), Bruce Richardson: > On Tue, Oct 26, 2021 at 10:32:39PM +0300, Dmitry Kozlyuk wrote: > > Meson 0.60 switched the format of uninstalled static libraries > > to thin archives, that is, they contain only paths to object files, > > not the files themselves. Files cannot be extracted in this case, > > resulting in build errors: > > > > ar: `x' cannot be used on thin archives. > > > > Handle thin archives when invoking pmdinfogen > > by directly using the files referenced in the archive. > > > > Bugzilla ID: 836 > > Fixes: e6e9730c7066 ("buildtools: support object file extraction for Windows") > > Cc: stable@dpdk.org > > > > Reported-by: Michal Berger > > Signed-off-by: Dmitry Kozlyuk > > --- > > buildtools/gen-pmdinfo-cfile.py | 23 ++++++++++++++--------- > > 1 file changed, 14 insertions(+), 9 deletions(-) > > > > Here is an alternative fix that works in my testing, based on my earlier > suggestion: > > Regards, > /Bruce > > diff --git a/buildtools/gen-pmdinfo-cfile.py b/buildtools/gen-pmdinfo-cfile.py > index 58fe3ad152..5fbd51658a 100644 > --- a/buildtools/gen-pmdinfo-cfile.py > +++ b/buildtools/gen-pmdinfo-cfile.py > @@ -9,12 +9,13 @@ > > _, tmp_root, ar, archive, output, *pmdinfogen = sys.argv > with tempfile.TemporaryDirectory(dir=tmp_root) as temp: > - run_ar = lambda command: subprocess.run( > - [ar, command, os.path.abspath(archive)], > - stdout=subprocess.PIPE, check=True, cwd=temp > - ) > - # Don't use "ar p", because its output is corrupted on Windows. > - run_ar("x") > - names = run_ar("t").stdout.decode().splitlines() > - paths = [os.path.join(temp, name) for name in names] > + paths = [] > + for name in subprocess.run([ar, "t", archive], stdout=subprocess.PIPE, > + check=True).stdout.decode().splitlines(): > + if os.path.exists(name): > + paths.append(name) > + else: > + subprocess.run([ar, "x", os.path.abspath(archive), name], > + check=True, cwd=temp) > + paths.append(os.path.join(temp, name)) > subprocess.run(pmdinfogen + paths + [output], check=True) > It buys with simplicity. I hoped to avoid creating temporary directories in vain when all archives are thin, but maybe it's not that important.