mesonbuild / meson

The Meson Build System
http://mesonbuild.com
Apache License 2.0
5.56k stars 1.61k forks source link

无法编译 #11656

Open RainbowTaro2022 opened 1 year ago

RainbowTaro2022 commented 1 year ago
G:\Cone\zstd-1.5.4\build\meson>meson setup --reconfigure build
The Meson build system
Version: 1.0.1
Source dir: G:\Cone\zstd-1.5.4\build\meson
Build dir: G:\Cone\zstd-1.5.4\build\meson\build
Build type: native build
Program GetZstdLibraryVersion.py found: YES (G:\python310\python.exe G:\Cone\zstd-1.5.4\build\meson\GetZstdLibraryVersion.py)
Project name: zstd
Project version: 1.5.4
Activating VS 17.5.1
C compiler for the host machine: cl (msvc 19.35.32215 "���� x64 �� Microsoft (R) C/C++ �Ż������� 19.35.32215 ��")
C linker for the host machine: link link 14.35.32215.0
C++ compiler for the host machine: cl (msvc 19.35.32215 "���� x64 �� Microsoft (R) C/C++ �Ż������� 19.35.32215 ��")
C++ linker for the host machine: link link 14.35.32215.0
Host machine cpu family: x86_64
Host machine cpu: x86_64
Library m found: NO
Dependency threads found: YES unknown (cached)
Did not find pkg-config by name 'pkg-config'
Found Pkg-config: NO
Found CMake: G:\python310\Scripts\cmake.EXE (3.26.0)
Run-time dependency zlib found: NO (tried pkgconfig, cmake and system)
Run-time dependency liblzma found: NO (tried pkgconfig and cmake)
Run-time dependency liblz4 found: NO (tried pkgconfig and cmake)
Message: Enable legacy support back to version 0.5
Message: Enable multi-threading support
Windows resource compiler: Microsoft (R) Windows (R) Resource Compiler Version 10.0.10011.16384
Has header "execinfo.h" skipped: feature backtrace disabled
Build targets in project: 6

Found ninja-1.10.2.git.kitware.jobserver-1 at G:\python310\Scripts\ninja.EXE

Visual Studio environment is needed to run Ninja. It is recommended to use Meson wrapper:
G:\python310\Scripts\meson compile -C build
Traceback (most recent call last):
  File "G:\python310\lib\site-packages\mesonbuild\mesonmain.py", line 194, in run
    return options.run_func(options)
  File "G:\python310\lib\site-packages\mesonbuild\msetup.py", line 310, in run
    app.generate()
  File "G:\python310\lib\site-packages\mesonbuild\msetup.py", line 187, in generate
    self._generate(env)
  File "G:\python310\lib\site-packages\mesonbuild\msetup.py", line 261, in _generate
    coredata.update_cmd_line_file(self.build_dir, self.options)
  File "G:\python310\lib\site-packages\mesonbuild\coredata.py", line 1034, in update_cmd_line_file
    config['options'].update({str(k): str(v) for k, v in options.cmd_line_options.items()})
  File "G:\python310\lib\configparser.py", line 964, in __getitem__
    raise KeyError(key)
KeyError: 'options'

ERROR: Unhandled python exception

Python Version:3.10 System:Windows 11 22h2 Moment 2 Compiler:VS2022(17.5.1)Meson(1.0.1)Ninja(1.10)

RainbowTaro2022 commented 1 year ago

meson-log.txt

RainbowTaro2022 commented 1 year ago

没人回应吗?

haata commented 6 months ago

I'm also seeing this error (I'll try to see if I can reproduce it as it was reported to me by someone else).

16:09:50     Traceback (most recent call last):
16:09:50       File "/usr/lib/python3.10/site-packages/mesonbuild/mesonmain.py", line 186, in run
16:09:50         return options.run_func(options)
16:09:50       File "/usr/lib/python3.10/site-packages/mesonbuild/mconf.py", line 339, in run
16:09:50         return run_impl(options, builddir)
16:09:50       File "/usr/lib/python3.10/site-packages/mesonbuild/mconf.py", line 318, in run_impl
16:09:50         coredata.update_cmd_line_file(builddir, options)
16:09:50       File "/usr/lib/python3.10/site-packages/mesonbuild/coredata.py", line 1211, in update_cmd_line_file
16:09:50         config['options'].update({str(k): str(v) for k, v in options.cmd_line_options.items()})
16:09:50       File "/usr/lib/python3.10/configparser.py", line 965, in __getitem_ _
16:09:50         raise KeyError(key)
16:09:50     KeyError: 'options'
16:09:50     
16:09:50     ERROR: Unhandled python exception
16:09:50     
16:09:50         This is a Meson bug and should be reported!

bash-5.0$ meson --version 1.4.0 bash-5.0$ python3 --version Python 3.10.11 Photon OS 4

This might be related to a race condition though (from a higher layer).

(we have to reconfigure, just in case new meson options are added as clearing the build cache every time is too much of a time hit).