Meson cannot compile

  • literallyMilk
    27th Apr 2022 Member 0 Permalink

    hi, I've been trying to compile TPT for a bit, but Meson (somehow?) just doesn't build it.
    Yes I was compiling in x64 Native Tools Command Prompt VS (2019).

    The logs:
    Build started at 2022-04-27T18:15:20.543945
    Main binary: D:\Python\python.exe
    Build Options:
    Python system: Windows
    The Meson build system
    Version: 0.62.1
    Source dir: D:\reps\The-Powder-Toy
    Build dir: D:\reps\The-Powder-Toy\build-debug
    Build type: native build
    Project name: the-powder-toy
    Project version: the.cake.is.a.lie
    WARNING: Failed to activate VS environment: Could not parse vswhere.exe output

    meson.build:1:0: ERROR: Unknown compiler(s): [['icl'], ['cl'], ['cc'], ['gcc'], ['clang'], ['clang-cl'], ['pgcc']]
    The following exception(s) were encountered:
    Running "icl " gave "[WinError 2] ?? ??????? ????? ????????? ????"
    Running "cl /?" gave "[WinError 2] ?? ??????? ????? ????????? ????"
    Running "cc --version" gave "[WinError 2] ?? ??????? ????? ????????? ????"
    Running "gcc --version" gave "[WinError 2] ?? ??????? ????? ????????? ????"
    Running "clang --version" gave "[WinError 2] ?? ??????? ????? ????????? ????"
    Running "clang-cl /?" gave "[WinError 2] ?? ??????? ????? ????????? ????"
    Running "pgcc --version" gave "[WinError 2] ?? ??????? ????? ????????? ????"

  • LBPHacker
    27th Apr 2022 Developer 0 Permalink
    There should be a longer log file somewhere, meson should give you a path to it. Please paste that log file somewhere.
  • literallyMilk
    27th Apr 2022 Member 0 Permalink

    https://pastebin.com/wpZBbRmC even tho this is the log that i specified higher, but I still decided to upload it onto pastebin.

  • LBPHacker
    27th Apr 2022 Developer 0 Permalink
    If that's all the log meson gives you, open a new command prompt (not a vs dev prompt, just cmd.exe) and give me the output of the following command:
    "C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe" -latest -prerelease -requiresAny -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 -requires Microsoft.VisualStudio.Workload.WDExpress -products "*" -utf8 -format json
  • literallyMilk
    27th Apr 2022 Member 0 Permalink

    @LBPHacker (View Post)

     All that it gives me is "[]".

  • LBPHacker
    27th Apr 2022 Developer 0 Permalink
    That's the problem then. The tool that's supposed to know where VS is doesn't know where VS is.
  • literallyMilk
    27th Apr 2022 Member 0 Permalink

    Seems like it's because I installed VS into "D:/Visual Studio".

  • LBPHacker
    27th Apr 2022 Developer 0 Permalink
    That shouldn't matter. Some components get installed to C:, regardless of what directory you select when you install VS.

    Edit: can you try the following ones?
    "C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe" -latest -prerelease -requiresAny -requires Microsoft.VisualStudio.Workload.WDExpress -products "*" -utf8 -format json
    "C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe" -latest -prerelease -requiresAny -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 -products "*" -utf8 -format json
    "C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe" -latest -prerelease -requiresAny -products "*" -utf8 -format json

    I'm just guessing here.
    Edited once by LBPHacker. Last: 27th Apr 2022
  • literallyMilk
    27th Apr 2022 Member 0 Permalink

    ...oh, I am stupid. It installed into C:/Program Files (x86)/Microsoft Visual Studio... or is it?

    Edit: it gives me [].

    Edited once by literallyMilk. Last: 27th Apr 2022
  • LBPHacker
    27th Apr 2022 Developer 0 Permalink
    Is this an old VS install that you have previously used to develop C++ programs?