All of lore.kernel.org
 help / color / mirror / Atom feed
* [PULL v2 0/5] Meson version update
@ 2021-03-15 17:39 Paolo Bonzini
  2021-03-15 17:39 ` [PULL 1/5] hexagon: do not specify executables as inputs Paolo Bonzini
                   ` (5 more replies)
  0 siblings, 6 replies; 11+ messages in thread
From: Paolo Bonzini @ 2021-03-15 17:39 UTC (permalink / raw)
  To: qemu-devel

The following changes since commit 51204c2f188ec1e2a38f14718d38a3772f850a4b:

  Merge remote-tracking branch 'remotes/bkoppelmann2/tags/pull-tricore-20210314' into staging (2021-03-15 15:34:27 +0000)

are available in the Git repository at:

  https://gitlab.com/bonzini/qemu.git tags/for-upstream-meson-0.57

for you to fetch changes up to 57d42c3b774d0716b9ad1a5a576480521edc7201:

  hexagon: use env keyword argument to pass PYTHONPATH (2021-03-15 18:06:21 +0100)

v1->v2: rebased

----------------------------------------------------------------
Update Meson to 0.57.

----------------------------------------------------------------
Paolo Bonzini (5):
      hexagon: do not specify executables as inputs
      hexagon: do not specify Python scripts as inputs
      meson: bump submodule to 0.57.1
      meson: switch minimum meson version to 0.57.0
      hexagon: use env keyword argument to pass PYTHONPATH

 configure                               |  7 +----
 docs/meson.build                        | 12 ++++----
 meson                                   |  2 +-
 meson.build                             | 54 +++++++++++++++------------------
 plugins/meson.build                     |  4 +--
 scripts/mtest2make.py                   |  7 ++---
 target/hexagon/meson.build              | 37 ++++++++--------------
 tests/docker/dockerfiles/centos7.docker |  2 +-
 tests/qapi-schema/meson.build           |  4 +--
 tests/qtest/meson.build                 |  2 +-
 tests/unit/meson.build                  |  2 +-
 trace/meson.build                       |  4 +--
 12 files changed, 57 insertions(+), 80 deletions(-)
-- 
2.29.2



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

* [PULL 1/5] hexagon: do not specify executables as inputs
  2021-03-15 17:39 [PULL v2 0/5] Meson version update Paolo Bonzini
@ 2021-03-15 17:39 ` Paolo Bonzini
  2021-03-15 17:39 ` [PULL 2/5] hexagon: do not specify Python scripts " Paolo Bonzini
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 11+ messages in thread
From: Paolo Bonzini @ 2021-03-15 17:39 UTC (permalink / raw)
  To: qemu-devel

gen_semantics is an executable, not an input.  Meson 0.57 special cases
the first argument and @INPUT@ is not expanded there.  Fix that by
not including it in the input, only in the command.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 target/hexagon/meson.build | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/target/hexagon/meson.build b/target/hexagon/meson.build
index 15318a6fa7..5dd68907b1 100644
--- a/target/hexagon/meson.build
+++ b/target/hexagon/meson.build
@@ -33,8 +33,7 @@ gen_semantics = executable(
 semantics_generated = custom_target(
     'semantics_generated.pyinc',
     output: 'semantics_generated.pyinc',
-    input: gen_semantics,
-    command: ['@INPUT@', '@OUTPUT@'],
+    command: [gen_semantics, '@OUTPUT@'],
 )
 hexagon_ss.add(semantics_generated)
 
@@ -154,8 +153,7 @@ gen_dectree_import = executable(
 iset_py = custom_target(
     'iset.py',
     output: 'iset.py',
-    input: gen_dectree_import,
-    command: ['@INPUT@', '@OUTPUT@'],
+    command: [gen_dectree_import, '@OUTPUT@'],
 )
 hexagon_ss.add(iset_py)
 
-- 
2.29.2




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

* [PULL 2/5] hexagon: do not specify Python scripts as inputs
  2021-03-15 17:39 [PULL v2 0/5] Meson version update Paolo Bonzini
  2021-03-15 17:39 ` [PULL 1/5] hexagon: do not specify executables as inputs Paolo Bonzini
@ 2021-03-15 17:39 ` Paolo Bonzini
  2021-03-15 17:39 ` [PULL 3/5] meson: bump submodule to 0.57.1 Paolo Bonzini
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 11+ messages in thread
From: Paolo Bonzini @ 2021-03-15 17:39 UTC (permalink / raw)
  To: qemu-devel

Python scripts are not inputs, and putting them in @INPUT@.  This
puts requirements on the command line format, keeping all inputs
close to the name of the script.  Avoid that by not including the
script in the command and not in the inputs.

Also wrap "PYTHONPATH" usage with "env", since setting the environment
this way is not valid under Windows.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 target/hexagon/meson.build | 30 ++++++++++--------------------
 1 file changed, 10 insertions(+), 20 deletions(-)

diff --git a/target/hexagon/meson.build b/target/hexagon/meson.build
index 5dd68907b1..bb0b4fb621 100644
--- a/target/hexagon/meson.build
+++ b/target/hexagon/meson.build
@@ -53,90 +53,81 @@ hexagon_ss.add(semantics_generated)
 shortcode_generated = custom_target(
     'shortcode_generated.h.inc',
     output: 'shortcode_generated.h.inc',
-    input: 'gen_shortcode.py',
     depends: [semantics_generated],
     depend_files: [hex_common_py, attribs_def],
-    command: [python, '@INPUT@', semantics_generated, attribs_def, '@OUTPUT@'],
+    command: [python, files('gen_shortcode.py'), semantics_generated, attribs_def, '@OUTPUT@'],
 )
 hexagon_ss.add(shortcode_generated)
 
 helper_protos_generated = custom_target(
     'helper_protos_generated.h.inc',
     output: 'helper_protos_generated.h.inc',
-    input: 'gen_helper_protos.py',
     depends: [semantics_generated],
     depend_files: [hex_common_py, attribs_def, gen_tcg_h],
-    command: [python, '@INPUT@', semantics_generated, attribs_def, gen_tcg_h, '@OUTPUT@'],
+    command: [python, files('gen_helper_protos.py'), semantics_generated, attribs_def, gen_tcg_h, '@OUTPUT@'],
 )
 hexagon_ss.add(helper_protos_generated)
 
 tcg_funcs_generated = custom_target(
     'tcg_funcs_generated.c.inc',
     output: 'tcg_funcs_generated.c.inc',
-    input: 'gen_tcg_funcs.py',
     depends: [semantics_generated],
     depend_files: [hex_common_py, attribs_def, gen_tcg_h],
-    command: [python, '@INPUT@', semantics_generated, attribs_def, gen_tcg_h, '@OUTPUT@'],
+    command: [python, files('gen_tcg_funcs.py'), semantics_generated, attribs_def, gen_tcg_h, '@OUTPUT@'],
 )
 hexagon_ss.add(tcg_funcs_generated)
 
 tcg_func_table_generated = custom_target(
     'tcg_func_table_generated.c.inc',
     output: 'tcg_func_table_generated.c.inc',
-    input: 'gen_tcg_func_table.py',
     depends: [semantics_generated],
     depend_files: [hex_common_py, attribs_def],
-    command: [python, '@INPUT@', semantics_generated, attribs_def, '@OUTPUT@'],
+    command: [python, files('gen_tcg_func_table.py'), semantics_generated, attribs_def, '@OUTPUT@'],
 )
 hexagon_ss.add(tcg_func_table_generated)
 
 helper_funcs_generated = custom_target(
     'helper_funcs_generated.c.inc',
     output: 'helper_funcs_generated.c.inc',
-    input: 'gen_helper_funcs.py',
     depends: [semantics_generated],
     depend_files: [hex_common_py, attribs_def, gen_tcg_h],
-    command: [python, '@INPUT@', semantics_generated, attribs_def, gen_tcg_h, '@OUTPUT@'],
+    command: [python, files('gen_helper_funcs.py'), semantics_generated, attribs_def, gen_tcg_h, '@OUTPUT@'],
 )
 hexagon_ss.add(helper_funcs_generated)
 
 printinsn_generated = custom_target(
     'printinsn_generated.h.inc',
     output: 'printinsn_generated.h.inc',
-    input: 'gen_printinsn.py',
     depends: [semantics_generated],
     depend_files: [hex_common_py, attribs_def],
-    command: [python, '@INPUT@', semantics_generated, attribs_def, '@OUTPUT@'],
+    command: [python, files('gen_printinsn.py'), semantics_generated, attribs_def, '@OUTPUT@'],
 )
 hexagon_ss.add(printinsn_generated)
 
 op_regs_generated = custom_target(
     'op_regs_generated.h.inc',
     output: 'op_regs_generated.h.inc',
-    input: 'gen_op_regs.py',
     depends: [semantics_generated],
     depend_files: [hex_common_py, attribs_def],
-    command: [python, '@INPUT@', semantics_generated, attribs_def, '@OUTPUT@'],
+    command: [python, files('gen_op_regs.py'), semantics_generated, attribs_def, '@OUTPUT@'],
 )
 hexagon_ss.add(op_regs_generated)
 
 op_attribs_generated = custom_target(
     'op_attribs_generated.h.inc',
     output: 'op_attribs_generated.h.inc',
-    input: 'gen_op_attribs.py',
     depends: [semantics_generated],
     depend_files: [hex_common_py, attribs_def],
-    command: [python, '@INPUT@', semantics_generated, attribs_def, '@OUTPUT@'],
+    command: [python, files('gen_op_attribs.py'), semantics_generated, attribs_def, '@OUTPUT@'],
 )
 hexagon_ss.add(op_attribs_generated)
 
 opcodes_def_generated = custom_target(
     'opcodes_def_generated.h.inc',
     output: 'opcodes_def_generated.h.inc',
-    input: 'gen_opcodes_def.py',
     depends: [semantics_generated],
     depend_files: [hex_common_py, attribs_def],
-    command: [python, '@INPUT@', semantics_generated, attribs_def, '@OUTPUT@'],
+    command: [python, files('gen_opcodes_def.py'), semantics_generated, attribs_def, '@OUTPUT@'],
 )
 hexagon_ss.add(opcodes_def_generated)
 
@@ -164,9 +155,8 @@ hexagon_ss.add(iset_py)
 dectree_generated = custom_target(
     'dectree_generated.h.inc',
     output: 'dectree_generated.h.inc',
-    input: 'dectree.py',
     depends: [iset_py],
-    command: ['PYTHONPATH=' + meson.current_build_dir(), '@INPUT@', '@OUTPUT@'],
+    command: ['env', 'PYTHONPATH=' + meson.current_build_dir(), files('dectree.py'), '@OUTPUT@'],
 )
 hexagon_ss.add(dectree_generated)
 
-- 
2.29.2




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

* [PULL 3/5] meson: bump submodule to 0.57.1
  2021-03-15 17:39 [PULL v2 0/5] Meson version update Paolo Bonzini
  2021-03-15 17:39 ` [PULL 1/5] hexagon: do not specify executables as inputs Paolo Bonzini
  2021-03-15 17:39 ` [PULL 2/5] hexagon: do not specify Python scripts " Paolo Bonzini
@ 2021-03-15 17:39 ` Paolo Bonzini
  2021-03-15 19:19   ` Philippe Mathieu-Daudé
  2021-03-15 17:39 ` [PULL 4/5] meson: switch minimum meson version to 0.57.0 Paolo Bonzini
                   ` (2 subsequent siblings)
  5 siblings, 1 reply; 11+ messages in thread
From: Paolo Bonzini @ 2021-03-15 17:39 UTC (permalink / raw)
  To: qemu-devel

The main advantage of 0.57 is that it fixes
https://github.com/mesonbuild/meson/pull/7900, thus avoiding unnecessary
rebuilds after running meson.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 meson | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meson b/meson
index 776acd2a80..7182685b22 160000
--- a/meson
+++ b/meson
@@ -1 +1 @@
-Subproject commit 776acd2a805c9b42b4f0375150977df42130317f
+Subproject commit 7182685b2241e88340b6c3340afba59a26be213f
-- 
2.29.2




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

* [PULL 4/5] meson: switch minimum meson version to 0.57.0
  2021-03-15 17:39 [PULL v2 0/5] Meson version update Paolo Bonzini
                   ` (2 preceding siblings ...)
  2021-03-15 17:39 ` [PULL 3/5] meson: bump submodule to 0.57.1 Paolo Bonzini
@ 2021-03-15 17:39 ` Paolo Bonzini
  2021-03-15 17:39 ` [PULL 5/5] hexagon: use env keyword argument to pass PYTHONPATH Paolo Bonzini
  2021-03-15 22:04 ` [PULL v2 0/5] Meson version update Peter Maydell
  5 siblings, 0 replies; 11+ messages in thread
From: Paolo Bonzini @ 2021-03-15 17:39 UTC (permalink / raw)
  To: qemu-devel; +Cc: Marc-André Lureau

Meson 0.57.0 does not need b_staticpic=$pie anymore, and has
stabilized the keyval module.  Remove the workaround and use a few
replacements for features deprecated in the 0.57.0 release cycle.

The CentOS 7 dockerfile change forces the rebuild of the container.

Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 configure                               |  7 +---
 docs/meson.build                        | 12 +++---
 meson.build                             | 54 ++++++++++++-------------
 plugins/meson.build                     |  4 +-
 scripts/mtest2make.py                   |  7 +---
 tests/docker/dockerfiles/centos7.docker |  2 +-
 tests/qapi-schema/meson.build           |  4 +-
 tests/qtest/meson.build                 |  2 +-
 tests/unit/meson.build                  |  2 +-
 trace/meson.build                       |  4 +-
 10 files changed, 43 insertions(+), 55 deletions(-)

diff --git a/configure b/configure
index f7d022a5db..0be5a5c148 100755
--- a/configure
+++ b/configure
@@ -1945,7 +1945,7 @@ python_version=$($python -c 'import sys; print("%d.%d.%d" % (sys.version_info[0]
 python="$python -B"
 
 if test -z "$meson"; then
-    if test "$explicit_python" = no && has meson && version_ge "$(meson --version)" 0.55.3; then
+    if test "$explicit_python" = no && has meson && version_ge "$(meson --version)" 0.57.0; then
         meson=meson
     elif test $git_submodules_action != 'ignore' ; then
         meson=git
@@ -6384,10 +6384,6 @@ fi
 mv $cross config-meson.cross
 
 rm -rf meson-private meson-info meson-logs
-unset staticpic
-if ! version_ge "$($meson --version)" 0.56.0; then
-  staticpic=$(if test "$pie" = yes; then echo true; else echo false; fi)
-fi
 NINJA=$ninja $meson setup \
         --prefix "$prefix" \
         --libdir "$libdir" \
@@ -6407,7 +6403,6 @@ NINJA=$ninja $meson setup \
         -Dwerror=$(if test "$werror" = yes; then echo true; else echo false; fi) \
         -Dstrip=$(if test "$strip_opt" = yes; then echo true; else echo false; fi) \
         -Db_pie=$(if test "$pie" = yes; then echo true; else echo false; fi) \
-        ${staticpic:+-Db_staticpic=$staticpic} \
         -Db_coverage=$(if test "$gcov" = yes; then echo true; else echo false; fi) \
         -Db_lto=$lto -Dcfi=$cfi -Dcfi_debug=$cfi_debug \
         -Dmalloc=$malloc -Dmalloc_trim=$malloc_trim -Dsparse=$sparse \
diff --git a/docs/meson.build b/docs/meson.build
index f84306ba7e..0aa98719af 100644
--- a/docs/meson.build
+++ b/docs/meson.build
@@ -38,12 +38,12 @@ endif
 if build_docs
   SPHINX_ARGS += ['-Dversion=' + meson.project_version(), '-Drelease=' + config_host['PKGVERSION']]
 
-  sphinx_extn_depends = [ meson.source_root() / 'docs/sphinx/depfile.py',
-                          meson.source_root() / 'docs/sphinx/hxtool.py',
-                          meson.source_root() / 'docs/sphinx/kerneldoc.py',
-                          meson.source_root() / 'docs/sphinx/kernellog.py',
-                          meson.source_root() / 'docs/sphinx/qapidoc.py',
-                          meson.source_root() / 'docs/sphinx/qmp_lexer.py',
+  sphinx_extn_depends = [ meson.current_source_dir() / 'sphinx/depfile.py',
+                          meson.current_source_dir() / 'sphinx/hxtool.py',
+                          meson.current_source_dir() / 'sphinx/kerneldoc.py',
+                          meson.current_source_dir() / 'sphinx/kernellog.py',
+                          meson.current_source_dir() / 'sphinx/qapidoc.py',
+                          meson.current_source_dir() / 'sphinx/qmp_lexer.py',
                           qapi_gen_depends ]
 
   have_ga = have_tools and config_host.has_key('CONFIG_GUEST_AGENT')
diff --git a/meson.build b/meson.build
index a7d2dd429d..e03ba6543a 100644
--- a/meson.build
+++ b/meson.build
@@ -1,14 +1,10 @@
-project('qemu', ['c'], meson_version: '>=0.55.0',
-        default_options: ['warning_level=1', 'c_std=gnu99', 'cpp_std=gnu++11', 'b_colorout=auto'] +
-                         (meson.version().version_compare('>=0.56.0') ? [ 'b_staticpic=false' ] : []),
-        version: run_command('head', meson.source_root() / 'VERSION').stdout().strip())
+project('qemu', ['c'], meson_version: '>=0.57.0',
+        default_options: ['warning_level=1', 'c_std=gnu99', 'cpp_std=gnu++11', 'b_colorout=auto',
+                          'b_staticpic=false'],
+        version: files('VERSION'))
 
 not_found = dependency('', required: false)
-if meson.version().version_compare('>=0.56.0')
-  keyval = import('keyval')
-else
-  keyval = import('unstable-keyval')
-endif
+keyval = import('keyval')
 ss = import('sourceset')
 fs = import('fs')
 
@@ -1646,21 +1642,21 @@ genh += configure_file(output: 'config-host.h', configuration: config_host_data)
 hxtool = find_program('scripts/hxtool')
 shaderinclude = find_program('scripts/shaderinclude.pl')
 qapi_gen = find_program('scripts/qapi-gen.py')
-qapi_gen_depends = [ meson.source_root() / 'scripts/qapi/__init__.py',
-                     meson.source_root() / 'scripts/qapi/commands.py',
-                     meson.source_root() / 'scripts/qapi/common.py',
-                     meson.source_root() / 'scripts/qapi/error.py',
-                     meson.source_root() / 'scripts/qapi/events.py',
-                     meson.source_root() / 'scripts/qapi/expr.py',
-                     meson.source_root() / 'scripts/qapi/gen.py',
-                     meson.source_root() / 'scripts/qapi/introspect.py',
-                     meson.source_root() / 'scripts/qapi/parser.py',
-                     meson.source_root() / 'scripts/qapi/schema.py',
-                     meson.source_root() / 'scripts/qapi/source.py',
-                     meson.source_root() / 'scripts/qapi/types.py',
-                     meson.source_root() / 'scripts/qapi/visit.py',
-                     meson.source_root() / 'scripts/qapi/common.py',
-                     meson.source_root() / 'scripts/qapi-gen.py'
+qapi_gen_depends = [ meson.current_source_dir() / 'scripts/qapi/__init__.py',
+                     meson.current_source_dir() / 'scripts/qapi/commands.py',
+                     meson.current_source_dir() / 'scripts/qapi/common.py',
+                     meson.current_source_dir() / 'scripts/qapi/error.py',
+                     meson.current_source_dir() / 'scripts/qapi/events.py',
+                     meson.current_source_dir() / 'scripts/qapi/expr.py',
+                     meson.current_source_dir() / 'scripts/qapi/gen.py',
+                     meson.current_source_dir() / 'scripts/qapi/introspect.py',
+                     meson.current_source_dir() / 'scripts/qapi/parser.py',
+                     meson.current_source_dir() / 'scripts/qapi/schema.py',
+                     meson.current_source_dir() / 'scripts/qapi/source.py',
+                     meson.current_source_dir() / 'scripts/qapi/types.py',
+                     meson.current_source_dir() / 'scripts/qapi/visit.py',
+                     meson.current_source_dir() / 'scripts/qapi/common.py',
+                     meson.current_source_dir() / 'scripts/qapi-gen.py'
 ]
 
 tracetool = [
@@ -2205,14 +2201,14 @@ foreach target : target_dirs
   if target.endswith('-softmmu')
     execs = [{
       'name': 'qemu-system-' + target_name,
-      'gui': false,
+      'win_subsystem': 'console',
       'sources': files('softmmu/main.c'),
       'dependencies': []
     }]
     if targetos == 'windows' and (sdl.found() or gtk.found())
       execs += [{
         'name': 'qemu-system-' + target_name + 'w',
-        'gui': true,
+        'win_subsystem': 'windows',
         'sources': files('softmmu/main.c'),
         'dependencies': []
       }]
@@ -2221,7 +2217,7 @@ foreach target : target_dirs
       specific_fuzz = specific_fuzz_ss.apply(config_target, strict: false)
       execs += [{
         'name': 'qemu-fuzz-' + target_name,
-        'gui': false,
+        'win_subsystem': 'console',
         'sources': specific_fuzz.sources(),
         'dependencies': specific_fuzz.dependencies(),
       }]
@@ -2229,7 +2225,7 @@ foreach target : target_dirs
   else
     execs = [{
       'name': 'qemu-' + target_name,
-      'gui': false,
+      'win_subsystem': 'console',
       'sources': [],
       'dependencies': []
     }]
@@ -2249,7 +2245,7 @@ foreach target : target_dirs
                link_language: link_language,
                link_depends: [block_syms, qemu_syms] + exe.get('link_depends', []),
                link_args: link_args,
-               gui_app: exe['gui'])
+               win_subsystem: exe['win_subsystem'])
 
     if exe_sign
       emulators += {exe['name'] : custom_target(exe['name'],
diff --git a/plugins/meson.build b/plugins/meson.build
index e77723010e..d58efc980e 100644
--- a/plugins/meson.build
+++ b/plugins/meson.build
@@ -1,7 +1,7 @@
 if 'CONFIG_HAS_LD_DYNAMIC_LIST' in config_host
-  plugin_ldflags = ['-Wl,--dynamic-list=' + (meson.build_root() / 'qemu-plugins-ld.symbols')]
+  plugin_ldflags = ['-Wl,--dynamic-list=' + (meson.project_build_root() / 'qemu-plugins-ld.symbols')]
 elif 'CONFIG_HAS_LD_EXPORTED_SYMBOLS_LIST' in config_host
-  plugin_ldflags = ['-Wl,-exported_symbols_list,' + (meson.build_root() / 'qemu-plugins-ld64.symbols')]
+  plugin_ldflags = ['-Wl,-exported_symbols_list,' + (meson.project_build_root() / 'qemu-plugins-ld64.symbols')]
 else
   plugin_ldflags = []
 endif
diff --git a/scripts/mtest2make.py b/scripts/mtest2make.py
index ee072c0502..02c0453e67 100644
--- a/scripts/mtest2make.py
+++ b/scripts/mtest2make.py
@@ -60,11 +60,8 @@ def process_tests(test, targets, suites):
     if test['workdir'] is not None:
         print('.test.dir.%d := %s' % (i, shlex.quote(test['workdir'])))
 
-    if 'depends' in test:
-        deps = (targets.get(x, []) for x in test['depends'])
-        deps = itertools.chain.from_iterable(deps)
-    else:
-        deps = ['all']
+    deps = (targets.get(x, []) for x in test['depends'])
+    deps = itertools.chain.from_iterable(deps)
 
     print('.test.name.%d := %s' % (i, test['name']))
     print('.test.driver.%d := %s' % (i, driver))
diff --git a/tests/docker/dockerfiles/centos7.docker b/tests/docker/dockerfiles/centos7.docker
index 75fdb53c7c..dc36b4ebc3 100644
--- a/tests/docker/dockerfiles/centos7.docker
+++ b/tests/docker/dockerfiles/centos7.docker
@@ -28,7 +28,7 @@ ENV PACKAGES \
     mesa-libEGL-devel \
     mesa-libgbm-devel \
     nettle-devel \
-    ninja-build \
+    'ninja-build >= 1.8' \
     perl-Test-Harness \
     pixman-devel \
     python3 \
diff --git a/tests/qapi-schema/meson.build b/tests/qapi-schema/meson.build
index 304ef939bd..26588396d2 100644
--- a/tests/qapi-schema/meson.build
+++ b/tests/qapi-schema/meson.build
@@ -1,5 +1,5 @@
 test_env = environment()
-test_env.set('PYTHONPATH', meson.source_root() / 'scripts')
+test_env.set('PYTHONPATH', meson.project_source_root() / 'scripts')
 test_env.set('PYTHONIOENCODING', 'utf-8')
 
 schemas = [
@@ -240,7 +240,7 @@ if build_docs
                                # clutter up the build dir with the cache.
                                command: [SPHINX_ARGS,
                                          '-b', 'text', '-E',
-                                         '-c', meson.source_root() / 'docs',
+                                         '-c', meson.project_source_root() / 'docs',
                                          '-D', 'master_doc=doc-good',
                                          meson.current_source_dir(),
                                          meson.current_build_dir()])
diff --git a/tests/qtest/meson.build b/tests/qtest/meson.build
index 2688e1bfad..50dd85e1df 100644
--- a/tests/qtest/meson.build
+++ b/tests/qtest/meson.build
@@ -261,7 +261,7 @@ foreach dir : target_dirs
     qtest_env.set('QTEST_QEMU_IMG', './qemu-img')
     test_deps += [qemu_img]
   endif
-  qtest_env.set('G_TEST_DBUS_DAEMON', meson.source_root() / 'tests/dbus-vmstate-daemon.sh')
+  qtest_env.set('G_TEST_DBUS_DAEMON', meson.project_source_root() / 'tests/dbus-vmstate-daemon.sh')
   qtest_env.set('QTEST_QEMU_BINARY', './qemu-system-' + target_base)
   
   foreach test : target_qtests
diff --git a/tests/unit/meson.build b/tests/unit/meson.build
index 4bfe4627ba..907e9f5f26 100644
--- a/tests/unit/meson.build
+++ b/tests/unit/meson.build
@@ -42,7 +42,7 @@ tests = {
   'test-keyval': [testqapi],
   'test-logging': [],
   'test-uuid': [],
-  'ptimer-test': ['ptimer-test-stubs.c', meson.source_root() / 'hw/core/ptimer.c'],
+  'ptimer-test': ['ptimer-test-stubs.c', meson.project_source_root() / 'hw/core/ptimer.c'],
   'test-qapi-util': [],
 }
 
diff --git a/trace/meson.build b/trace/meson.build
index 08f83a15c3..317b557915 100644
--- a/trace/meson.build
+++ b/trace/meson.build
@@ -3,7 +3,7 @@ specific_ss.add(files('control-target.c'))
 
 trace_events_files = []
 foreach dir : [ '.' ] + trace_events_subdirs
-  trace_events_file = meson.source_root() / dir / 'trace-events'
+  trace_events_file = meson.project_source_root() / dir / 'trace-events'
   trace_events_files += [ trace_events_file ]
   group_name = dir == '.' ? 'root' : dir.underscorify()
   group = '--group=' + group_name
@@ -69,7 +69,7 @@ foreach d : [
 ]
   gen = custom_target(d[0],
                 output: d[0],
-                input: meson.source_root() / 'trace-events',
+                input: meson.project_source_root() / 'trace-events',
                 command: [ tracetool, '--group=root', '--format=@0@'.format(d[1]), '@INPUT@', '@OUTPUT@' ],
                 depend_files: tracetool_depends)
   specific_ss.add(when: 'CONFIG_TCG', if_true: gen)
-- 
2.29.2




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

* [PULL 5/5] hexagon: use env keyword argument to pass PYTHONPATH
  2021-03-15 17:39 [PULL v2 0/5] Meson version update Paolo Bonzini
                   ` (3 preceding siblings ...)
  2021-03-15 17:39 ` [PULL 4/5] meson: switch minimum meson version to 0.57.0 Paolo Bonzini
@ 2021-03-15 17:39 ` Paolo Bonzini
  2021-03-15 22:04 ` [PULL v2 0/5] Meson version update Peter Maydell
  5 siblings, 0 replies; 11+ messages in thread
From: Paolo Bonzini @ 2021-03-15 17:39 UTC (permalink / raw)
  To: qemu-devel

This feature is new in meson 0.57 and allows getting rid of the "env" wrapper.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 target/hexagon/meson.build | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/target/hexagon/meson.build b/target/hexagon/meson.build
index bb0b4fb621..aaeee11ac1 100644
--- a/target/hexagon/meson.build
+++ b/target/hexagon/meson.build
@@ -156,7 +156,8 @@ dectree_generated = custom_target(
     'dectree_generated.h.inc',
     output: 'dectree_generated.h.inc',
     depends: [iset_py],
-    command: ['env', 'PYTHONPATH=' + meson.current_build_dir(), files('dectree.py'), '@OUTPUT@'],
+    env: {'PYTHONPATH': meson.current_build_dir()},
+    command: [python, files('dectree.py'), '@OUTPUT@'],
 )
 hexagon_ss.add(dectree_generated)
 
-- 
2.29.2



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

* Re: [PULL 3/5] meson: bump submodule to 0.57.1
  2021-03-15 17:39 ` [PULL 3/5] meson: bump submodule to 0.57.1 Paolo Bonzini
@ 2021-03-15 19:19   ` Philippe Mathieu-Daudé
  0 siblings, 0 replies; 11+ messages in thread
From: Philippe Mathieu-Daudé @ 2021-03-15 19:19 UTC (permalink / raw)
  To: Paolo Bonzini, qemu-devel

On 3/15/21 6:39 PM, Paolo Bonzini wrote:
> The main advantage of 0.57 is that it fixes
> https://github.com/mesonbuild/meson/pull/7900, thus avoiding unnecessary
> rebuilds after running meson.
> 
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
>  meson | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com>



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

* Re: [PULL v2 0/5] Meson version update
  2021-03-15 17:39 [PULL v2 0/5] Meson version update Paolo Bonzini
                   ` (4 preceding siblings ...)
  2021-03-15 17:39 ` [PULL 5/5] hexagon: use env keyword argument to pass PYTHONPATH Paolo Bonzini
@ 2021-03-15 22:04 ` Peter Maydell
  2021-03-16  7:20   ` Paolo Bonzini
  2021-03-16 10:59   ` Peter Maydell
  5 siblings, 2 replies; 11+ messages in thread
From: Peter Maydell @ 2021-03-15 22:04 UTC (permalink / raw)
  To: Paolo Bonzini; +Cc: QEMU Developers

On Mon, 15 Mar 2021 at 17:47, Paolo Bonzini <pbonzini@redhat.com> wrote:
>
> The following changes since commit 51204c2f188ec1e2a38f14718d38a3772f850a4b:
>
>   Merge remote-tracking branch 'remotes/bkoppelmann2/tags/pull-tricore-20210314' into staging (2021-03-15 15:34:27 +0000)
>
> are available in the Git repository at:
>
>   https://gitlab.com/bonzini/qemu.git tags/for-upstream-meson-0.57
>
> for you to fetch changes up to 57d42c3b774d0716b9ad1a5a576480521edc7201:
>
>   hexagon: use env keyword argument to pass PYTHONPATH (2021-03-15 18:06:21 +0100)
>
> v1->v2: rebased
>
> ----------------------------------------------------------------
> Update Meson to 0.57.
>
> ----------------------------------------------------------------
> Paolo Bonzini (5):
>       hexagon: do not specify executables as inputs
>       hexagon: do not specify Python scripts as inputs
>       meson: bump submodule to 0.57.1
>       meson: switch minimum meson version to 0.57.0
>       hexagon: use env keyword argument to pass PYTHONPATH

Fails to build, on at least x86-64, s390, ppc, aarch32, aarch64
Linux hosts:

make: Entering directory '/home/ubuntu/qemu/build/all'
(GIT="git" "/home/ubuntu/qemu/scripts/git-submodule.sh" update
ui/keycodemapdb tests/fp/berkeley-testfloat-3
tests/fp/berkeley-softfloat-3 meson dtc capstone slirp roms/SLOF)
config-host.mak is out-of-date, running configure
/usr/bin/ninja -v build.ninja && touch build.ninja.stamp
[0/1] /usr/bin/python3 /home/ubuntu/qemu/meson/meson.py --internal
regenerate /home/ubuntu/qemu /home/ubuntu/qemu/build/all --backend
ninja
WARNING: Regenerating configuration from scratch.
Reason: Coredata file
'/home/ubuntu/qemu/build/all/meson-private/coredata.dat' references
functions or classes that don't exist. This probably means that it was
generated with an old version of meson.
The Meson build system
Version: 0.57.1
Source dir: /home/ubuntu/qemu
Build dir: /home/ubuntu/qemu/build/all
Build type: native build

../../meson.build:1:0: ERROR: Value "true" (of type "string") for
combo option "Localization of the GTK+ user interface" is not one of
the choices. Possible choices are (as string): "enabled", "disabled",
"auto".

A full log can be found at /home/ubuntu/qemu/build/all/meson-logs/meson-log.txt
FAILED: build.ninja
/usr/bin/python3 /home/ubuntu/qemu/meson/meson.py --internal
regenerate /home/ubuntu/qemu /home/ubuntu/qemu/build/all --backend
ninja
ninja: error: rebuilding 'build.ninja': subcommand failed
/usr/bin/ninja -v build.ninja && touch build.ninja.stamp

(repeats same error another 3 times)

thanks
-- PMM


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

* Re: [PULL v2 0/5] Meson version update
  2021-03-15 22:04 ` [PULL v2 0/5] Meson version update Peter Maydell
@ 2021-03-16  7:20   ` Paolo Bonzini
  2021-03-16 10:59   ` Peter Maydell
  1 sibling, 0 replies; 11+ messages in thread
From: Paolo Bonzini @ 2021-03-16  7:20 UTC (permalink / raw)
  To: Peter Maydell; +Cc: QEMU Developers

On 15/03/21 23:04, Peter Maydell wrote:
> ../../meson.build:1:0: ERROR: Value "true" (of type "string") for
> combo option "Localization of the GTK+ user interface" is not one of
> the choices. Possible choices are (as string): "enabled", "disabled",
> "auto".

This probably dates back to

     commit 0e8e77d487b3d8ae33158e61c30e1fe5c753a114
     Author: Alex Bennée <alex.bennee@linaro.org>
     Date:   Thu Dec 10 19:04:12 2020 +0000

     configure: move gettext detection to meson.build

     This will allow meson to honour -Dauto_features=disabled later.

     Suggested-by: Paolo Bonzini <pbonzini@redhat.com>
     Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
     Acked-by: Paolo Bonzini <pbonzini@redhat.com>
     Message-Id: <20201210190417.31673-4-alex.bennee@linaro.org>

but it should be possible to work around it.

Paolo



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

* Re: [PULL v2 0/5] Meson version update
  2021-03-15 22:04 ` [PULL v2 0/5] Meson version update Peter Maydell
  2021-03-16  7:20   ` Paolo Bonzini
@ 2021-03-16 10:59   ` Peter Maydell
  2021-03-16 12:17     ` Paolo Bonzini
  1 sibling, 1 reply; 11+ messages in thread
From: Peter Maydell @ 2021-03-16 10:59 UTC (permalink / raw)
  To: Paolo Bonzini; +Cc: QEMU Developers

On Mon, 15 Mar 2021 at 22:04, Peter Maydell <peter.maydell@linaro.org> wrote:
>
> On Mon, 15 Mar 2021 at 17:47, Paolo Bonzini <pbonzini@redhat.com> wrote:
> >
> > The following changes since commit 51204c2f188ec1e2a38f14718d38a3772f850a4b:
> >
> >   Merge remote-tracking branch 'remotes/bkoppelmann2/tags/pull-tricore-20210314' into staging (2021-03-15 15:34:27 +0000)
> >
> > are available in the Git repository at:
> >
> >   https://gitlab.com/bonzini/qemu.git tags/for-upstream-meson-0.57
> >
> > for you to fetch changes up to 57d42c3b774d0716b9ad1a5a576480521edc7201:
> >
> >   hexagon: use env keyword argument to pass PYTHONPATH (2021-03-15 18:06:21 +0100)
> >
> > v1->v2: rebased
> >
> > ----------------------------------------------------------------
> > Update Meson to 0.57.
> >
> > ----------------------------------------------------------------
> > Paolo Bonzini (5):
> >       hexagon: do not specify executables as inputs
> >       hexagon: do not specify Python scripts as inputs
> >       meson: bump submodule to 0.57.1
> >       meson: switch minimum meson version to 0.57.0
> >       hexagon: use env keyword argument to pass PYTHONPATH
>
> Fails to build, on at least x86-64, s390, ppc, aarch32, aarch64
> Linux hosts:

This pullreq also caused a build failure on OSX when trying to build
something else after rolling back the merge (but only on OSX, oddly):

make: Entering directory '/Users/pm215/src/qemu-for-merges/build/all'
config-host.mak is out-of-date, running configure
  GIT     ui/keycodemapdb tests/fp/berkeley-testfloat-3
tests/fp/berkeley-softfloat-3 meson dtc capstone slirp
Disabling PIE due to missing toolchain support
/usr/local/bin/ninja  build.ninja && touch build.ninja.stamp
[0/1] Regenerating build files.
Traceback (most recent call last):
  File "/Users/pm215/src/qemu-for-merges/meson/mesonbuild/mesonmain.py",
line 140, in run
    return options.run_func(options)
  File "/Users/pm215/src/qemu-for-merges/meson/mesonbuild/msetup.py",
line 245, in run
    app.generate()
  File "/Users/pm215/src/qemu-for-merges/meson/mesonbuild/msetup.py",
line 154, in generate
    env = environment.Environment(self.source_dir, self.build_dir, self.options)
  File "/Users/pm215/src/qemu-for-merges/meson/mesonbuild/environment.py",
line 523, in __init__
    self.coredata = coredata.load(self.get_build_dir())
  File "/Users/pm215/src/qemu-for-merges/meson/mesonbuild/coredata.py",
line 1016, in load
    obj = pickle.load(f)
ModuleNotFoundError: No module named 'mesonbuild.mesonlib.universal';
'mesonbuild.mesonlib' is not a package
FAILED: build.ninja
/usr/local/opt/python@3.8/bin/python3.8
/Users/pm215/src/qemu-for-merges/meson/meson.py --internal regenerate
/Users/pm215/src/qemu-for-merges
/Users/pm215/src/qemu-for-merges/build/all --backend ninja
ninja: error: rebuilding 'build.ninja': subcommand failed

This kind of "breaks the build tree such that you can't
just 'git reset' back to master" bug is irritating. Doesn't
meson have an "is this the right version" check on the cached
data it's loading out of the build tree ?

thanks
-- PMM


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

* Re: [PULL v2 0/5] Meson version update
  2021-03-16 10:59   ` Peter Maydell
@ 2021-03-16 12:17     ` Paolo Bonzini
  0 siblings, 0 replies; 11+ messages in thread
From: Paolo Bonzini @ 2021-03-16 12:17 UTC (permalink / raw)
  To: Peter Maydell; +Cc: QEMU Developers

On 16/03/21 11:59, Peter Maydell wrote:
> This kind of "breaks the build tree such that you can't
> just 'git reset' back to master" bug is irritating. Doesn't
> meson have an "is this the right version" check on the cached
> data it's loading out of the build tree ?

It does, but it doesn't expect a ModuleNotFoundError.  I'll fix this and 
open a pull request.

Paolo



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

end of thread, other threads:[~2021-03-16 12:20 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-15 17:39 [PULL v2 0/5] Meson version update Paolo Bonzini
2021-03-15 17:39 ` [PULL 1/5] hexagon: do not specify executables as inputs Paolo Bonzini
2021-03-15 17:39 ` [PULL 2/5] hexagon: do not specify Python scripts " Paolo Bonzini
2021-03-15 17:39 ` [PULL 3/5] meson: bump submodule to 0.57.1 Paolo Bonzini
2021-03-15 19:19   ` Philippe Mathieu-Daudé
2021-03-15 17:39 ` [PULL 4/5] meson: switch minimum meson version to 0.57.0 Paolo Bonzini
2021-03-15 17:39 ` [PULL 5/5] hexagon: use env keyword argument to pass PYTHONPATH Paolo Bonzini
2021-03-15 22:04 ` [PULL v2 0/5] Meson version update Peter Maydell
2021-03-16  7:20   ` Paolo Bonzini
2021-03-16 10:59   ` Peter Maydell
2021-03-16 12:17     ` Paolo Bonzini

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.