Error during compilement

  • Enatsu
    2nd Feb 2023 Member 0 Permalink

    I cloned the git repository, went in "The-Powder-Toy" directory with MSVC (already installed meson and ninja using PIP), but when i ran "meson setup build-debug", an error ocurred :

    The Meson build system
    Version: 1.0.0
    Source dir: C:\Users\maxou\tpt\The-Powder-Toy
    Build dir: C:\Users\maxou\tpt\The-Powder-Toy\build-debug
    Build type: native build
    Project name: the-powder-toy
    Project version: the.cake.is.a.lie

    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] The system cannot find the file specified"
    Running `cl /?` gave "[WinError 2] The system cannot find the file specified"
    Running `cc --version` gave "[WinError 2] The system cannot find the file specified"
    Running `gcc --version` gave "[WinError 2] The system cannot find the file specified"
    Running `clang --version` gave "[WinError 2] The system cannot find the file specified"
    Running `clang-cl /?` gave "[WinError 2] The system cannot find the file specified"
    Running `pgcc --version` gave "[WinError 2] The system cannot find the file specified"

    Can someone help me please ?

  • LBPHacker
    2nd Feb 2023 Developer 0 Permalink
    Try what has been suggested here.
    Edited once by LBPHacker. Last: 2nd Feb 2023
  • Enatsu
    15th Feb 2023 Member 0 Permalink

    Hello again, I re-installed Visual Studio and now it's printing this :

    Version: 1.0.0
    Source dir: C:\Users\maxou\TPT\The-Powder-Toy
    Build dir: C:\Users\maxou\TPT\The-Powder-Toy\build-debug
    Build type: native build
    Project name: the-powder-toy
    Project version: the.cake.is.a.lie

    meson.build:1:0: ERROR: Unable to detect linker for compiler `clang -Wl,--version`
    stdout:
    stderr: clang: error: unable to execute command: program not executable
    clang: error: linker command failed with exit code 1 (use -v to see invocation)

    I don't know what to do now.

    Could someone help me ? (yet again)

    Edited once by Enatsu. Last: 15th Feb 2023
  • LBPHacker
    15th Feb 2023 Developer 0 Permalink
    There's an apparently broken clang install that interferes with your VS install: Meson finds that clang before it finds cl (the compiler that comes with VS). This is a rare problem, windows people don't usually have multiple compilers installed. You can try setting the environment variables CC and CXX to cl, but I'm not certain this will work:

    set CC=cl
    set CXX=cl

    You will have to do that every time you open a new prompt that you use to run Meson.

    You can alternatively try getting rid of the broken clang install.
  • Liver_K
    15th Feb 2023 Member 0 Permalink

    You can also check or set these variables permanently from the old control panel "Advanced system settings" dialog. Only do that if you have tried it temporarily first and know the solution works.

  • johnrock123
    20th Nov 2023 Member 0 Permalink

    Exploring syst?m s?ttings can be daunting, but it's crucial for troubl?shooting. R?m?mb?r, always t?st chang?s t?mporarily b?for? making p?rman?nt adjustm?nts. Sp?aking of p?rman?nc?, finding th? best law essay writing service uk can b? tricky, but att?ntion to d?tail is critical. Approach both syst?m tw?aks and academic support with caution and thorough t?sting!