Whe using Meson from MSI installer Meson misses some files needed for CMake-based dependencies discovery.
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community>D:
D:\>cd test_meson
D:\test_meson>"C:\Program Files\Meson\meson.exe" build
The Meson build system
Version: 0.51.2
Source dir: D:\test_meson
Build dir: D:\test_meson\build
Build type: native build
Project name: tutorial
Project version: undefined
C compiler for the host machine: cl (msvc 19.22.27905)
Build machine cpu family: x86_64
Build machine cpu: x86_64
Did not find pkg-config by name 'pkg-config'
Found Pkg-config: NO
Found CMake: C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.EXE (3.14.19060802-MSVC_2)
Traceback (most recent call last):
File "mesonbuild\mesonmain.py", line 127, in run
File "mesonbuild\msetup.py", line 241, in run
File "mesonbuild\msetup.py", line 159, in generate
File "mesonbuild\msetup.py", line 188, in _generate
File "mesonbuild\interpreter.py", line 3924, in run
File "mesonbuild\interpreterbase.py", line 412, in run
File "mesonbuild\interpreterbase.py", line 436, in evaluate_codeblock
File "mesonbuild\interpreterbase.py", line 430, in evaluate_codeblock
File "mesonbuild\interpreterbase.py", line 443, in evaluate_statement
File "mesonbuild\interpreterbase.py", line 1053, in assignment
File "mesonbuild\interpreterbase.py", line 441, in evaluate_statement
File "mesonbuild\interpreterbase.py", line 778, in function_call
File "mesonbuild\interpreterbase.py", line 285, in wrapped
File "mesonbuild\interpreterbase.py", line 285, in wrapped
File "mesonbuild\interpreterbase.py", line 285, in wrapped
[Previous line repeated 1 more time]
File "mesonbuild\interpreterbase.py", line 155, in wrapped
File "mesonbuild\interpreterbase.py", line 174, in wrapped
File "mesonbuild\interpreter.py", line 3035, in func_dependency
File "mesonbuild\interpreter.py", line 3082, in dependency_impl
File "mesonbuild\dependencies\base.py", line 2526, in find_external_dependency
File "mesonbuild\dependencies\base.py", line 1057, in __init__
File "mesonbuild\dependencies\base.py", line 1161, in _get_cmake_info
File "mesonbuild\dependencies\base.py", line 1827, in _call_cmake
File "mesonbuild\dependencies\base.py", line 1807, in _call_cmake_real
File "mesonbuild\dependencies\base.py", line 1800, in _setup_cmake_dir
File "shutil.py", line 120, in copyfile
FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Program Files\\Meson\\mesonbuild\\dependencies/data/CMakePathInfo.txt'
D:\test_meson>
meson.build:
project('tutorial', 'c')
glib_dep = dependency('glib-2.0')
Note: does not happen when running Meson from git checkout
Happens here too on 0.52-1
Happens on 0.53.2
@jpakkane, I think you're the one who knows the most about the msi packages?
This is probably because the data files are not packed in the msi file or they can't be looked up because of path changes. Probably the best change would be to move those files inside the .py files that use them.
Are there instructions on how the msi is generated?
python msi\createmsi.py in a VS command terminal. You need to install the msm modules with the VS installler by hand, though, because they are no longer installed by defauilt.
okay. I have a fix for the missing cmake files in #6829, because they're not in the same place on windows and *nix, hopefully the fix I've come up with would fix the msi installer if we actually had data files.
This affects me, too.
Falling back to pip install now, I guess.
I think this is fixed by https://github.com/mesonbuild/meson/pull/7160.
We haven't made a release since that was merged, but if it isn't fixed in 0.55.0 please reopen this.
Most helpful comment
Happens here too on 0.52-1