mesonbuild / meson

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

Meson trivial test fails with x86 MSVC #13645

Open vid512 opened 2 months ago

vid512 commented 2 months ago

Meson test cases/common/1 trivial fails with x86 msvc compiler.

**********************************************************************
** Visual Studio 2022 Developer Command Prompt v17.11.2
** Copyright (c) 2022 Microsoft Corporation
**********************************************************************
[vcvarsall.bat] Environment initialized for: 'x86'

d:\dev\meson-diasdk\meson-fork>where cl.exe
c:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.41.34120\bin\Hostx86\x86\cl.exe

d:\dev\meson-diasdk\meson-fork>cl
Microsoft (R) C/C++ Optimizing Compiler Version 19.41.34120 for x86
Copyright (C) Microsoft Corporation.  All rights reserved.

usage: cl [ option... ] filename... [ /link linkoption... ]

d:\dev\meson-diasdk\meson-fork>run_project_tests.py --only platform-windows
symlinks are not supported on this system
Meson build system 1.5.99 Project Tests
Using python 3.10.5 (tags/v3.10.5:f377153, Jun  6 2022, 16:14:13) [MSC v.1929 64 bit (AMD64)] ('D:\\dev\\_tools\\python\\python.exe')
VSCMD version 17.11.2

host machine compilers

c      : [msvc]     cl (msvc 19.41.34120 "Microsoft (R) C/C++ Optimizing Compiler Version 19.41.34120 for x86")
cpp    : [msvc]     cl (msvc 19.41.34120 "Microsoft (R) C/C++ Optimizing Compiler Version 19.41.34120 for x86")
cs     : [csc]      csc (csc 4.11.0-3)
cuda   : [not found]
cython : [not found]
d      : [not found]
fortran: [not found]
java   : [not found]
masm   : [ml]       ml (ml 14.41.34120.0)
nasm   : [not found]
objc   : [clang]    clang (clang 17.0.3)
objcpp : [clang]    clang++ (clang 17.0.3)
rust   : [not found]
swift  : [not found]
vala   : [not found]

tools

ninja  : c:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\Ninja\ninja.EXE (1.11.0)
cmake  : D:\dev\_tools\cmake\bin\cmake.EXE (3.24.0-rc3)
hotdoc : not found

Checking that configuring works...
Checking that introspect works...
Checking that building works...
Traceback (most recent call last):
  File "D:\dev\meson-diasdk\meson-fork\run_project_tests.py", line 1659, in <module>
    check_meson_commands_work(options.use_tmpdir, options.extra_args)
  File "D:\dev\meson-diasdk\meson-fork\run_project_tests.py", line 1456, in check_meson_commands_work
    raise RuntimeError(f'Failed to build {testdir!r}:\n{e}\n{o}')
RuntimeError: Failed to build 'test cases/common/1 trivial':

MSBuild version 17.11.2+c078802d4 for .NET Framework
Build started 2024-09-07 10:57:54.

Project "d:\dev\meson-diasdk\meson-fork\b 6ehs8rqb\trivial test.sln" on node 1 (default targets).
d:\dev\meson-diasdk\meson-fork\b 6ehs8rqb\trivial test.sln.metaproj : error MSB4126: The specified solution configuration "debug|x86" is invalid. Please specify a valid solution configuration using the Configuration and Platform properties (e.g. MSBuild.exe Solution.sln /p:Configuration=Debug /p:Platform="Any CPU") or leave those properties blank to use the default solution configuration. [d:\dev\meson-diasdk\meson-fork\b 6ehs8rqb\trivial test.sln]
Done Building Project "d:\dev\meson-diasdk\meson-fork\b 6ehs8rqb\trivial test.sln" (default targets) -- FAILED.

Build FAILED.

"d:\dev\meson-diasdk\meson-fork\b 6ehs8rqb\trivial test.sln" (default target) (1) ->
(ValidateSolutionConfiguration target) ->
  d:\dev\meson-diasdk\meson-fork\b 6ehs8rqb\trivial test.sln.metaproj : error MSB4126: The specified solution configuration "debug|x86" is invalid. Please specify a valid solution configuration using the Configuration and Platform properties (e.g. MSBuild.exe Solution.sln /p:Configuration=Debug /p:Platform="Any CPU") or leave those properties blank to use the default solution configuration. [d:\dev\meson-diasdk\meson-fork\b 6ehs8rqb\trivial test.sln]

    0 Warning(s)
    1 Error(s)

Time Elapsed 00:00:00.07
vid512 commented 2 months ago

Same thing also happens with set CXX=clang and set CXX=clang-cl, using clang from Visual Studio.