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 5137EA0C57; Mon, 1 Nov 2021 18:36:15 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id DF6F940E28; Mon, 1 Nov 2021 18:36:14 +0100 (CET) Received: from mail-lj1-f173.google.com (mail-lj1-f173.google.com [209.85.208.173]) by mails.dpdk.org (Postfix) with ESMTP id 8E3B640DF6; Mon, 1 Nov 2021 18:36:13 +0100 (CET) Received: by mail-lj1-f173.google.com with SMTP id t11so12207646ljh.6; Mon, 01 Nov 2021 10:36:13 -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=7l6USVh7j+qH/GkHBAxEMqPLEov23MN2iptI+PUxcFA=; b=VdjShntVw/V6pp6I11Vp6U/nIqOIAG0VfOSuuiQ+HDAa9kga6wn9g8WwPFPA7X9lTZ BFA7gbU8ZXUiaT84sAiwCS35kWulPXK548bMYVc4sFLiyGZDGhCje+5uZExPojNSVQay Ln2oBMVqyaP9gvxal3D90AuoMwH6vhl7aaiWS80cdHFNYAmR7mSHZzfnLzeHWydeEJsQ uBJYeMrgAFwFwbnMFTqEoTsKw3IwL8gMEdO2dq51xlaSYFrBDrhrgzRg4Nn3Q50XnP3o M6AB7bewVwtReOrX47XJvG7hNsJRS1wpL1F9FiSU2SjIR3x9DAR8qEgMer+nWp+hBepp jq6A== 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=7l6USVh7j+qH/GkHBAxEMqPLEov23MN2iptI+PUxcFA=; b=5jBkR8M6A4T0F2hJ1c+LuYOwfp2TmNEGEDwWfE1+mTU52facwXmcAbr5BD337bzyIw vzRXWadHbAEXYHmAy+yJoR8B8G8A5CMkUTw829vgxd7F3hlnHfLiLyuPnmpdYYgxqYu8 StUYbjyKm7vzOwFX3vV6uNfYO+oJmg5qhtBOQtShsBbVjF6RjdRZhg8b3xkXqzZhx2G9 FNAdqNM8X9YLUDWsfH3lsiBENpeOr4IzhYtWlicMVQe8K1aNEQ1J1Vh52XPKcYe+mMAa enRmwlNJzV8PMdAtrCDyGmSC/LCry8/hcd0TAoSQGZc1fwILfEQqeWHZe47n5Zc6cgfB yDVg== X-Gm-Message-State: AOAM533Ph2pPF0ACcfA8104LQSmNhctpbyBTKx/A9RLh+l2OTzcvO79Y jn2vmR5cIL3eVzPEf7pJ+gs= X-Google-Smtp-Source: ABdhPJx+3DlXqsHVD/pK1bPGnd95rEJkqrlGMF2ibIm5htrw1LJW+uaLPvKb+hLMMiauWLf5rFuIgQ== X-Received: by 2002:a2e:a791:: with SMTP id c17mr4592961ljf.304.1635788173065; Mon, 01 Nov 2021 10:36:13 -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 b15sm1588825ljp.95.2021.11.01.10.36.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 01 Nov 2021 10:36:12 -0700 (PDT) Date: Mon, 1 Nov 2021 20:36:11 +0300 From: Dmitry Kozlyuk To: Bruce Richardson Cc: dev@dpdk.org, stable@dpdk.org, Michal Berger , thomas@monjalon.net Message-ID: <20211101203611.6992072a@sovereign> In-Reply-To: References: <20211026193239.113745-1-dmitry.kozliuk@gmail.com> <20211027194528.51329515@sovereign> 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-dev] [PATCH] buildtools: fix build with meson 0.60 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 2021-11-01 16:54 (UTC+0000), Bruce Richardson: > On Wed, Oct 27, 2021 at 07:45:28PM +0300, Dmitry Kozlyuk wrote: > > 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. > > Since the temp directory is contained within the build directory, I don't > think it matters. If you don't mind then, I'll do up a v2 patch with my > alternative fix and submit that to the list. OK, thank you! I meant the time spent on creating those dirs rather than polluting any place. But it won't be any worse then it is now.