DPDK patches and discussions
 help / color / mirror / Atom feed
From: Ric Li <ricmli@outlook.com>
To: Bruce Richardson <bruce.richardson@intel.com>
Cc: dev@dpdk.org
Subject: Re: [PATCH 1/2] build: fix list_dir_globs failure in MSYS2
Date: Tue, 19 Sep 2023 20:19:50 +0800	[thread overview]
Message-ID: <TYAP286MB03008BAB8400F1E6971A2991CCFAA@TYAP286MB0300.JPNP286.PROD.OUTLOOK.COM> (raw)
In-Reply-To: <ZQlX3ZY2OdWyTVur@bricha3-MOBL.ger.corp.intel.com>



On 2023/9/19 16:12, Bruce Richardson wrote:
> On Sat, Sep 16, 2023 at 09:15:19PM +0800, Ric Li wrote:
>> When running 'meson build' in MSYS2,
>> "list-dir-globs.py * failed with status 1".
>>
>> Signed-off-by: Ric Li <ricmli@outlook.com>
>> ---
>>  app/meson.build | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/app/meson.build b/app/meson.build
>> index e4bf5c531c..73e5138301 100644
>> --- a/app/meson.build
>> +++ b/app/meson.build
>> @@ -11,7 +11,7 @@ disable_apps = run_command(list_dir_globs, disable_apps, check: true).stdout().s
>>  enable_apps = ',' + get_option('enable_apps')
>>  enable_apps = run_command(list_dir_globs, enable_apps, check: true).stdout().split()
>>  if enable_apps.length() == 0
>> -    enable_apps = run_command(list_dir_globs, '*', check: true).stdout().split()
>> +    enable_apps = run_command(list_dir_globs, '*/', check: true).stdout().split()
>>  endif
>>  
> 
> Do we know more about why this particular failure is happening with MSYS2?
> Can you try running the script manually to see what the specific python
> error is, and if we can make the script more robust generally?
> 

Running the script manually showed nothing but the Usage log.
The arguments here are not accepted by this python script.

MSYS2 does mention some command line parsing issues, see:
https://www.msys2.org/wiki/Porting/
"Windows programs parse the command line themselves,
it isn't parsed for them by the calling process, as on Linux.
This means that if wildcards (glob patterns) are to be accepted by the program,
it has to be able to expand them somehow."

> In terms of the fix, I actually think we should not be using a glob here at
> all. Since we already have the list of apps present in the file, I think
> that we should move the app list to the top of the file and then change the
> code to be:
> 
> if enable_apps.length() == 0
>     enable_apps = apps
> endif
> 
> This sidesteps any issues with globbing, and also makes the code a bit
> faster as we don't have to shell-out to a python script.
> 
> /Bruce

That sounds reasonable. I'll test it and provide an update to the patch.

Thanks,
Ric

  reply	other threads:[~2023-09-19 12:20 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-16 13:15 Ric Li
2023-09-19  8:12 ` Bruce Richardson
2023-09-19 12:19   ` Ric Li [this message]
2023-09-20 14:18 ` [PATCH v2 " Ric Li
2023-09-20 15:07   ` Bruce Richardson
2023-10-11 15:27   ` Thomas Monjalon
2023-10-11 15:34     ` Bruce Richardson
2023-10-24 16:08       ` Ric Li
2024-02-18 13:45         ` Thomas Monjalon
     [not found] ` <20230920141846.2187-1-ricmli@outlook.com>
2023-09-20 14:18   ` [PATCH v2 2/2] doc: add MSYS2 building guide Ric Li

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=TYAP286MB03008BAB8400F1E6971A2991CCFAA@TYAP286MB0300.JPNP286.PROD.OUTLOOK.COM \
    --to=ricmli@outlook.com \
    --cc=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).