qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH V1] meson: fix dependency on qemu-keymap
@ 2023-01-25 16:17 Steve Sistare
  2023-02-06  6:55 ` Marc-André Lureau
  0 siblings, 1 reply; 3+ messages in thread
From: Steve Sistare @ 2023-01-25 16:17 UTC (permalink / raw)
  To: qemu-devel
  Cc: Paolo Bonzini, Marc-André Lureau, Daniel P. Berrange,
	Thomas Huth, Philippe Mathieu-Daudé

When qemu-keymap is not available on the host, and enable-xkbcommon
is specified, parallel make fails with:

  % make clean
  ...
  % make -j 32
  ...
  FAILED: pc-bios/keymaps/is
  ./qemu-keymap -f pc-bios/keymaps/is -l is
  /bin/sh: ./qemu-keymap: No such file or directory
  ... many similar messages ...

The code always runs find_program, rather than waiting to build
qemu-keymap, because it looks for CONFIG_XKBCOMMON in config_host
rather than config_host_data.  Making serially succeeds, by soft
linking files from pc-bios/keymaps, but that is not the desired
result for enable-xkbcommon.

Examining all occurrences of 'in config_host' for similar bugs shows one
instance in the docs, which is also fixed here.

Fixes: 28742467c9c0.. ("meson: convert pc-bios/keymaps/Makefile")

Signed-off-by: Steve Sistare <steven.sistare@oracle.com>
---
 docs/devel/kconfig.rst      | 2 +-
 pc-bios/keymaps/meson.build | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/docs/devel/kconfig.rst b/docs/devel/kconfig.rst
index 69674d0..cc1a456 100644
--- a/docs/devel/kconfig.rst
+++ b/docs/devel/kconfig.rst
@@ -306,6 +306,6 @@ variable::
 
     host_kconfig = \
       (have_tpm ? ['CONFIG_TPM=y'] : []) + \
-      ('CONFIG_SPICE' in config_host ? ['CONFIG_SPICE=y'] : []) + \
+      ('CONFIG_LINUX' in config_host ? ['CONFIG_LINUX=y'] : []) + \
       (have_ivshmem ? ['CONFIG_IVSHMEM=y'] : []) + \
       ...
diff --git a/pc-bios/keymaps/meson.build b/pc-bios/keymaps/meson.build
index 06c75e6..a9e5103 100644
--- a/pc-bios/keymaps/meson.build
+++ b/pc-bios/keymaps/meson.build
@@ -33,7 +33,7 @@ keymaps = {
   'tr': '-l tr',
 }
 
-if meson.is_cross_build() or 'CONFIG_XKBCOMMON' not in config_host
+if meson.is_cross_build() or not config_host_data.get('CONFIG_XKBCOMMON')
   native_qemu_keymap = find_program('qemu-keymap', required: false, disabler: true)
 else
   native_qemu_keymap = qemu_keymap
-- 
1.8.3.1



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH V1] meson: fix dependency on qemu-keymap
  2023-01-25 16:17 [PATCH V1] meson: fix dependency on qemu-keymap Steve Sistare
@ 2023-02-06  6:55 ` Marc-André Lureau
  2023-02-06 18:33   ` Steven Sistare
  0 siblings, 1 reply; 3+ messages in thread
From: Marc-André Lureau @ 2023-02-06  6:55 UTC (permalink / raw)
  To: Steve Sistare
  Cc: qemu-devel, Paolo Bonzini, Daniel P. Berrange, Thomas Huth,
	Philippe Mathieu-Daudé

[-- Attachment #1: Type: text/plain, Size: 2390 bytes --]

Hi

On Wed, Jan 25, 2023 at 9:28 PM Steve Sistare <steven.sistare@oracle.com>
wrote:

> When qemu-keymap is not available on the host, and enable-xkbcommon
> is specified, parallel make fails with:
>
>   % make clean
>   ...
>   % make -j 32
>   ...
>   FAILED: pc-bios/keymaps/is
>   ./qemu-keymap -f pc-bios/keymaps/is -l is
>   /bin/sh: ./qemu-keymap: No such file or directory
>   ... many similar messages ...
>
> The code always runs find_program, rather than waiting to build
> qemu-keymap, because it looks for CONFIG_XKBCOMMON in config_host
> rather than config_host_data.  Making serially succeeds, by soft
> linking files from pc-bios/keymaps, but that is not the desired
> result for enable-xkbcommon.
>
> Examining all occurrences of 'in config_host' for similar bugs shows one
> instance in the docs, which is also fixed here.
>
> Fixes: 28742467c9c0.. ("meson: convert pc-bios/keymaps/Makefile")
>

Or rather fixing commit 4113f4cfee ("meson: move xkbcommon to meson").

A lot of CONFIG_ keys were set during configure, loaded in 'config_host'
and now they are set by meson in 'config_host_data'.


> Signed-off-by: Steve Sistare <steven.sistare@oracle.com>
> ---
>  docs/devel/kconfig.rst      | 2 +-
>  pc-bios/keymaps/meson.build | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/docs/devel/kconfig.rst b/docs/devel/kconfig.rst
> index 69674d0..cc1a456 100644
> --- a/docs/devel/kconfig.rst
> +++ b/docs/devel/kconfig.rst
> @@ -306,6 +306,6 @@ variable::
>
>      host_kconfig = \
>        (have_tpm ? ['CONFIG_TPM=y'] : []) + \
> -      ('CONFIG_SPICE' in config_host ? ['CONFIG_SPICE=y'] : []) + \
> +      ('CONFIG_LINUX' in config_host ? ['CONFIG_LINUX=y'] : []) + \
>

ok


>        (have_ivshmem ? ['CONFIG_IVSHMEM=y'] : []) + \
>        ...
> diff --git a/pc-bios/keymaps/meson.build b/pc-bios/keymaps/meson.build
> index 06c75e6..a9e5103 100644
> --- a/pc-bios/keymaps/meson.build
> +++ b/pc-bios/keymaps/meson.build
> @@ -33,7 +33,7 @@ keymaps = {
>    'tr': '-l tr',
>  }
>
> -if meson.is_cross_build() or 'CONFIG_XKBCOMMON' not in config_host
> +if meson.is_cross_build() or not config_host_data.get('CONFIG_XKBCOMMON')
>

Can you replace it with not xkbcommon.found() instead?


>    native_qemu_keymap = find_program('qemu-keymap', required: false,
> disabler: true)
>  else
>    native_qemu_keymap = qemu_keymap
> --
> 1.8.3.1
>
>

[-- Attachment #2: Type: text/html, Size: 3664 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH V1] meson: fix dependency on qemu-keymap
  2023-02-06  6:55 ` Marc-André Lureau
@ 2023-02-06 18:33   ` Steven Sistare
  0 siblings, 0 replies; 3+ messages in thread
From: Steven Sistare @ 2023-02-06 18:33 UTC (permalink / raw)
  To: Marc-André Lureau
  Cc: qemu-devel, Paolo Bonzini, Daniel P. Berrange, Thomas Huth,
	Philippe Mathieu-Daudé

On 2/6/2023 1:55 AM, Marc-André Lureau wrote:
> Hi
> 
> On Wed, Jan 25, 2023 at 9:28 PM Steve Sistare <steven.sistare@oracle.com <mailto:steven.sistare@oracle.com>> wrote:
> 
>     When qemu-keymap is not available on the host, and enable-xkbcommon
>     is specified, parallel make fails with:
> 
>       % make clean
>       ...
>       % make -j 32
>       ...
>       FAILED: pc-bios/keymaps/is
>       ./qemu-keymap -f pc-bios/keymaps/is -l is
>       /bin/sh: ./qemu-keymap: No such file or directory
>       ... many similar messages ...
> 
>     The code always runs find_program, rather than waiting to build
>     qemu-keymap, because it looks for CONFIG_XKBCOMMON in config_host
>     rather than config_host_data.  Making serially succeeds, by soft
>     linking files from pc-bios/keymaps, but that is not the desired
>     result for enable-xkbcommon.
> 
>     Examining all occurrences of 'in config_host' for similar bugs shows one
>     instance in the docs, which is also fixed here.
> 
>     Fixes: 28742467c9c0.. ("meson: convert pc-bios/keymaps/Makefile")
> 
> Or rather fixing commit 4113f4cfee ("meson: move xkbcommon to meson").

Yes, thanks.

> A lot of CONFIG_ keys were set during configure, loaded in 'config_host' and now they are set by meson in 'config_host_data'.
> 
>     Signed-off-by: Steve Sistare <steven.sistare@oracle.com <mailto:steven.sistare@oracle.com>>
>     ---
>      docs/devel/kconfig.rst      | 2 +-
>      pc-bios/keymaps/meson.build | 2 +-
>      2 files changed, 2 insertions(+), 2 deletions(-)
> 
>     diff --git a/docs/devel/kconfig.rst b/docs/devel/kconfig.rst
>     index 69674d0..cc1a456 100644
>     --- a/docs/devel/kconfig.rst
>     +++ b/docs/devel/kconfig.rst
>     @@ -306,6 +306,6 @@ variable::
> 
>          host_kconfig = \
>            (have_tpm ? ['CONFIG_TPM=y'] : []) + \
>     -      ('CONFIG_SPICE' in config_host ? ['CONFIG_SPICE=y'] : []) + \
>     +      ('CONFIG_LINUX' in config_host ? ['CONFIG_LINUX=y'] : []) + \
> 
> 
> ok
>  
> 
>            (have_ivshmem ? ['CONFIG_IVSHMEM=y'] : []) + \
>            ...
>     diff --git a/pc-bios/keymaps/meson.build b/pc-bios/keymaps/meson.build
>     index 06c75e6..a9e5103 100644
>     --- a/pc-bios/keymaps/meson.build
>     +++ b/pc-bios/keymaps/meson.build
>     @@ -33,7 +33,7 @@ keymaps = {
>        'tr': '-l tr',
>      }
> 
>     -if meson.is_cross_build() or 'CONFIG_XKBCOMMON' not in config_host
>     +if meson.is_cross_build() or not config_host_data.get('CONFIG_XKBCOMMON')
> 
> 
> Can you replace it with not xkbcommon.found() instead?

Yes, that works.

I will submit the V2 patch with your changes momentarily.

- Steve

>  
> 
>        native_qemu_keymap = find_program('qemu-keymap', required: false, disabler: true)
>      else
>        native_qemu_keymap = qemu_keymap
>     -- 
>     1.8.3.1
> 


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-02-06 18:35 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-01-25 16:17 [PATCH V1] meson: fix dependency on qemu-keymap Steve Sistare
2023-02-06  6:55 ` Marc-André Lureau
2023-02-06 18:33   ` Steven Sistare

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).