I'm trying to build the latest nvme-cli code on AlmaLinux release 8.8 (Sapphire Caracal). The default python on this system is 3.6 and since meson requires 3.7+, I have built and installed python 3.12.0.
Now when I try to build nvme-cli I get a lot of errors and I'm stuck. Googling for this problem did not throw up anything useful. Any help greatly appreciated.
meson setup --wrap-mode forcefallback .build
The Meson build system
Version: 1.2.3
Source dir: /test/shared/lk/build/nvme-cli-master
Build dir: /test/shared/lk/build/nvme-cli-master/.build
Build type: native build
Traceback (most recent call last):
File "/usr/local/lib/python3.12/site-packages/mesonbuild/mesonmain.py", line 194, in run
return options.run_func(options)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/mesonbuild/msetup.py", line 358, in run
app.generate()
File "/usr/local/lib/python3.12/site-packages/mesonbuild/msetup.py", line 183, in generate
return self._generate(env, capture, vslite_ctx)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/mesonbuild/msetup.py", line 205, in _generate
intr = interpreter.Interpreter(b, user_defined_options=user_defined_options)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/mesonbuild/interpreter/interpreter.py", line 331, in __init__
self.parse_project()
File "/usr/local/lib/python3.12/site-packages/mesonbuild/interpreterbase/interpreterbase.py", line 134, in parse_project
self.evaluate_codeblock(self.ast, end=1)
File "/usr/local/lib/python3.12/site-packages/mesonbuild/interpreterbase/interpreterbase.py", line 190, in evaluate_codeblock
raise e
File "/usr/local/lib/python3.12/site-packages/mesonbuild/interpreterbase/interpreterbase.py", line 182, in evaluate_codeblock
self.evaluate_statement(cur)
File "/usr/local/lib/python3.12/site-packages/mesonbuild/interpreterbase/interpreterbase.py", line 196, in evaluate_statement
return self.function_call(cur)
^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/mesonbuild/interpreterbase/interpreterbase.py", line 521, in function_call
res = func(node, func_args, kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/mesonbuild/interpreterbase/decorators.py", line 277, in wrapper
return f(*nargs, **wrapped_kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/mesonbuild/interpreterbase/decorators.py", line 596, in wrapper
return f(*wrapped_args, **wrapped_kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/mesonbuild/interpreter/interpreter.py", line 1295, in func_project
r = wrap.Resolver(self.environment.get_source_dir(), subdir, self.subproject, wrap_mode)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "<string>", line 10, in __init__
File "/usr/local/lib/python3.12/site-packages/mesonbuild/wrap/wrap.py", line 300, in __post_init__
self.load_wraps()
File "/usr/local/lib/python3.12/site-packages/mesonbuild/wrap/wrap.py", line 321, in load_wraps
wrap = PackageDefinition(fname, self.subproject)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/mesonbuild/wrap/wrap.py", line 162, in __init__
self.parse_wrap()
File "/usr/local/lib/python3.12/site-packages/mesonbuild/wrap/wrap.py", line 175, in parse_wrap
config.read(self.filename, encoding='utf-8')
File "/usr/local/lib/python3.12/configparser.py", line 684, in read
self._read(fp, filename)
File "/usr/local/lib/python3.12/configparser.py", line 998, in _read
for lineno, line in enumerate(fp, start=1):
File "<frozen codecs>", line 322, in decode
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xa2 in position 37: invalid start byte
meson.build:3:0: ERROR: Unhandled python exception
This is a Meson bug and should be reported!