From: Thomas Monjalon <thomas@monjalon.net>
To: Ric Li <ricmli@outlook.com>
Cc: Bruce Richardson <bruce.richardson@intel.com>,
dev@dpdk.org, david.marchand@redhat.com
Subject: Re: [PATCH v2 1/2] build: fix list_dir_globs failure in MSYS2
Date: Sun, 18 Feb 2024 14:45:20 +0100 [thread overview]
Message-ID: <10465276.VV5PYv0bhD@thomas> (raw)
In-Reply-To: <TYAP286MB0300A5261B2C58282A9ECCB9CCDFA@TYAP286MB0300.JPNP286.PROD.OUTLOOK.COM>
Any update?
Would you like to provide a v3?
24/10/2023 18:08, Ric Li:
>
> On 2023/10/11 23:34, Bruce Richardson wrote:
> > On Wed, Oct 11, 2023 at 05:27:22PM +0200, Thomas Monjalon wrote:
> >> 20/09/2023 16:18, Ric Li:
> >>> When running 'meson setup' on Windows with MSYS2,
> >>> "list-dir-globs.py * failed with status 1".
> >>
> >> We don't know why it is failing?
> >> What about other usages of list_dir_globs in drivers and lib?
>
> Looks lile MSYS2 shell expands this wildcard automatically
> before passing it to the child process.
>
> I print the args in list-dir-globs.py and found that args are
> the expanded dir names, so the len(sys.argv) is larger than 2,
> which makes this script fail. The '*/*' arg in drivers/meson.build
> works well just as expected, and no '*' used in lib.
>
> This is from MSYS2 documentation:
> "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. MinGW-w64
> supplies the correct start-up code, so it happens automatically, in a manner
> compatible with MSVC-compiled programs. If undesirable, the behavior can be
> disabled at program build."
>
> I think this fix is not needed if we can find a way to disable the auto-expanding
> behaviour of the MSYS2 program. I've tried the runtime way by setting
> "MSYS=noglob" envvar but not working here...
>
> >>
> >>> Avoid using globbing to get components for app build
> >>> since they are already listed in the meson file.
> >>
> >> I don't understand the logic.
> >>
> >>> +disable_apps = ',' + get_option('disable_apps')
> >>> +disable_apps = run_command(list_dir_globs, disable_apps, check: true).stdout().split()
> >>
> >> This could fail.>>
> >>> +
> >>> +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 = apps
> >>> +endif
> >>
> >> If nothing is enabled, we enable all?
> >>
> > Yes, if the enable_apps list is empty we should enable everything.
> > However, on reviewing the v2, I missed the fact that this patch is
> > removing the expansion of the disable_apps value.>
> > Given your comment, this check can probably also be improved by checking
> > the get_option('enable_apps') length, rather than the expanded version.
> >
> > /Bruce
>
next prev parent reply other threads:[~2024-02-18 13:45 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-16 13:15 [PATCH 1/2] build: fix list_dir_globs failure in MSYS2 Ric Li
2023-09-19 8:12 ` Bruce Richardson
2023-09-19 12:19 ` Ric Li
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 [this message]
[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=10465276.VV5PYv0bhD@thomas \
--to=thomas@monjalon.net \
--cc=bruce.richardson@intel.com \
--cc=david.marchand@redhat.com \
--cc=dev@dpdk.org \
--cc=ricmli@outlook.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.