meson: Wrong cpu detection for 'x86_64' windows
In ‘x64 Native Tools Command Prompt for VS 2017’, the cpu detected by meson is ‘x86’ ?
**********************************************************************
** Visual Studio 2017 Developer Command Prompt v15.9.16
** Copyright (c) 2017 Microsoft Corporation
**********************************************************************
[vcvarsall.bat] Environment initialized for: 'x64'
D:\opt\glib-2.62.2\_build>meson .. --buildtype=release --prefix="D:\opt\glib\"
The Meson build system
Version: 0.52.0
Source dir: D:\opt\glib-2.62.2
Build dir: D:\opt\glib-2.62.2\_build
Build type: native build
Project name: glib
Project version: 2.62.2
C compiler for the host machine: cl (msvc 19.16.27034)
C linker for the host machine: link 19.16.27034
C++ compiler for the host machine: cl (msvc 19.16.27034)
C++ linker for the host machine: link 19.16.27034
Host machine cpu family: x86
Host machine cpu: x86
And I tried in vs2013 , 2015, got the same result.
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 49 (36 by maintainers)
Commits related to this issue
- Fix regular expression for MSVC target arch detection Make it work regardless of MSVC output language Fixes #6128 See PR #6265 — committed to lb90/meson by lb90 5 years ago
- Fix regular expression for MSVC target arch detection Make it work regardless of MSVC output language Fixes #6128 See PR #6265 — committed to mesonbuild/meson by lb90 5 years ago
- Fix regular expression for MSVC target arch detection Make it work regardless of MSVC output language Fixes #6128 See PR #6265 — committed to scivision/meson by lb90 5 years ago
- build/meson: downgrade meson 0.51.2 because of not compiling x64 윈도우 meson 0.52.0 / 0.54.0 버전은 특정 시스템에서 x64 컴파일 문제가발생합니다. 0.51.2 버전에서 문제없이 빌드가 되어 다운그레이드합니다. https://github.com/mesonbuild/meson/issues... — committed to nvrsw/gvsbuild by hsccr 4 years ago
Hi @pandyah5! The
VS Developer Command Prompt
is always x86. If you want to target x86_64 then use theVS x64 Native Tools Command Prompt
.Should the issue persist, please do the following:
Start > Microsoft Visual Studio > VS x64 Native Tools Command Prompt
cl.exe /?
and press EnterSetting
VSLANG=1033
works only if the English / US language pack is installed. That’s because VS uses a translation method based on string IDs, most probably relying on message tables in satellite DLLs, as usual for Windows-based software. That’s different from typical UNIX software w/ libintl, where the base language is hardcoded in the program and thus always available.In order to install the language pack, open the Visual Studio Installer, select “Modify” and then click on the “Language Pack” tab
Assuming English language environment has been an issue previously, maybe on some issues still open.
It seems time to specifically have a non-English CI environment. Maybe a couple (Latin & non-Latin alphabets)
The problem is this: https://github.com/mesonbuild/meson/blob/4c96aa34cb415ca654c0571280386880e9d14ca3/mesonbuild/environment.py#L993
The RE doesn’t match. So
match
isNone
and target gets set to ‘x86’.hmm, is this related to #6134…