qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* ui: fix potential compile error.
@ 2020-09-02  3:04 ruippan(潘睿)
  2020-09-02  5:23 ` kraxel
  0 siblings, 1 reply; 4+ messages in thread
From: ruippan(潘睿) @ 2020-09-02  3:04 UTC (permalink / raw)
  To: kraxel@redhat.com; +Cc: qemu-devel@nongnu.org


[-- Attachment #1.1: Type: text/plain, Size: 629 bytes --]

We compiled the upstream qemu and result in this GEN code error:

‘’’
GEN     ui/input-keymap-atset1-to-qcode.c
usage: keymap-gen [-h]
                  {code-map,code-table,name-map,name-table,code-docs,name-docs}
                  ...
keymap-gen: error: invalid choice: 'glib2' (choose from 'code-map', 'code-table', 'name-map', 'name-table', 'code-docs', 'name-docs')
‘’’

My environment:

1.     CentOS7 with Python 2.7.5

2.     upstream's keycodemapdb

3.     argparse 1.1

Root cause is my argparse and python version. But change the invoking order can adapt both new and old argparse.

Thanks.

[-- Attachment #1.2: Type: text/html, Size: 6333 bytes --]

[-- Attachment #2: 0001-ui-fix-potential-compile-error.patch --]
[-- Type: application/octet-stream, Size: 1350 bytes --]

From 7f262b160d57559bace1f877f74b1c4e5a872b41 Mon Sep 17 00:00:00 2001
From: ruippan <ruippan@tencent.com>
Date: Wed, 2 Sep 2020 10:40:29 +0800
Subject: [PATCH] ui: fix potential compile error.

Fix code GEN error with info "keymap-gen: error: invalid choice: 'glib2'".
Compile environment:
1. CentOS7 with Python 2.7.5
2. upstream's keycodemapdb
3. argparse 1.1

Change arg order to adapt old version of argparse.

Signed-off-by: ruippan <ruippan@tencent.com>
---
 ui/meson.build | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/ui/meson.build b/ui/meson.build
index 962e776569..47e139903b 100644
--- a/ui/meson.build
+++ b/ui/meson.build
@@ -105,9 +105,9 @@ if have_system or xkbcommon.found()
                   capture: true,
                   input: files('keycodemapdb/data/keymaps.csv'),
                   command: [python.full_path(), files('keycodemapdb/tools/keymap-gen'),
-                            '--lang', 'glib2',
-                            '--varname', 'qemu_input_map_@0@_to_@1@'.format(e[0], e[1]),
-                            'code-map', '@INPUT0@', e[0], e[1]])
+                           'code-map', '@INPUT0@', e[0], e[1],
+                           '--lang', 'glib2',
+                           '--varname', 'qemu_input_map_@0@_to_@1@'.format(e[0], e[1])])
   endforeach
 endif
 
-- 
2.19.1


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

end of thread, other threads:[~2020-09-02 10:13 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-09-02  3:04 ui: fix potential compile error ruippan(潘睿)
2020-09-02  5:23 ` kraxel
2020-09-02  8:17   ` Daniel P. Berrangé
2020-09-02 10:12     ` Thomas Huth

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