Skip to content

[Windows] Meson build fail. #52

@tqpgun

Description

@tqpgun

Thanks for this great project. I am trying to learn from it. I tried building on windows, using Clion IDE, i got the following error and log file content:

  • Error:

`
The Meson build system
Version: 1.9.0
Source dir: C:\Users\Admin\CLionProjects\Kay
Build dir: C:\Users\Admin\CLionProjects\Kay\buildDir
Build type: native build
Activating VS 17.14.15 (September 2025)
Project name: Kay
Project version: 0.1.0
C compiler for the host machine: cl (msvc 19.44.35217 "Microsoft (R) C/C++ Optimizing Compiler Version 19.44.35217 for x64")
C linker for the host machine: link link 14.44.35217.0
C++ compiler for the host machine: cl (msvc 19.44.35217 "Microsoft (R) C/C++ Optimizing Compiler Version 19.44.35217 for x64")
C++ linker for the host machine: link link 14.44.35217.0
Host machine cpu family: x86_64
Host machine cpu: x86_64

meson.build:14:16: ERROR: Program or command 'cat' not found or not executable
`

  • Log file:
    `
    Build started at 2025-09-21T21:51:59.090089
    Main binary: C:\Users\Admin\scoop\apps\meson\current\meson.exe
    Build Options:
    Python system: Windows
    The Meson build system
    Version: 1.9.0
    Source dir: C:\Users\Admin\CLionProjects\Kay
    Build dir: C:\Users\Admin\CLionProjects\Kay\buildDir
    Build type: native build
    Project name: Kay
    Project version: 0.1.0

Detecting compiler via: icl "" -> [WinError 2] The system cannot find the file specified

Detecting compiler via: cl /? -> [WinError 2] The system cannot find the file specified

Detecting compiler via: cc --version -> [WinError 2] The system cannot find the file specified

Detecting compiler via: gcc --version -> 0
stdout:
gcc (GCC) 13.1.0
Copyright (C) 2023 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Running command: -cpp -x c -E -dM -
pre-processor extraction using -cpp -x c failed, falling back w/o lang
Running command: -E -dM -


Detecting linker via: gcc -Wl,--version -> 0
stdout:
GNU ld (GNU Binutils) 2.40
Copyright (C) 2023 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License version 3 or (at your option) a later version.
This program has absolutely no warranty.

stderr:
collect2 version 13.1.0
C:\Program Files\JetBrains\CLion 2025.2.1\bin\mingw\bin/ld.exe -m i386pep -Bdynamic C:/Program Files/JetBrains/CLion 2025.2.1/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/../../../../x86_64-w64-mingw32/lib/../lib/crt2.o C:/Program Files/JetBrains/CLion 2025.2.1/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/crtbegin.o -LC:/Program Files/JetBrains/CLion 2025.2.1/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0 -LC:/Program Files/JetBrains/CLion 2025.2.1/bin/mingw/bin/../lib/gcc -LC:/Program Files/JetBrains/CLion 2025.2.1/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/../../../../x86_64-w64-mingw32/lib/../lib -LC:/Program Files/JetBrains/CLion 2025.2.1/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/../../../../lib -LC:/Program Files/JetBrains/CLion 2025.2.1/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/../../../../x86_64-w64-mingw32/lib -LC:/Program Files/JetBrains/CLion 2025.2.1/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/../../.. --version -lmingw32 -lgcc -lgcc_eh -lmoldname -lmingwex -lmsvcrt -lkernel32 -lpthread -ladvapi32 -lshell32 -luser32 -lkernel32 -liconv -lmingw32 -lgcc -lgcc_eh -lmoldname -lmingwex -lmsvcrt -lkernel32 C:/Program Files/JetBrains/CLion 2025.2.1/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/../../../../x86_64-w64-mingw32/lib/../lib/default-manifest.o C:/Program Files/JetBrains/CLion 2025.2.1/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/crtend.o

Sanity testing C compiler: gcc
Is cross compiler: False.
Sanity check compiler command line: gcc sanitycheckc.c -o sanitycheckc.exe -D_FILE_OFFSET_BITS=64
Sanity check compile stdout:


Sanity check compile stderr:


Running test binary command: C:\Users\Admin\CLionProjects\Kay\buildDir\meson-private\sanitycheckc.exe

Sanity check: C:\Users\Admin\CLionProjects\Kay\buildDir\meson-private\sanitycheckc.exe -> 0
C compiler for the host machine: gcc (gcc 13.1.0 "gcc (GCC) 13.1.0")
C linker for the host machine: gcc ld.bfd 2.40

Detecting archiver via: gcc-ar --version -> 0
stdout:
GNU ar (GNU Binutils) 2.40
Copyright (C) 2023 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License version 3 or (at your option) any later version.
This program has absolutely no warranty.


Detecting compiler via: icl "" -> [WinError 2] The system cannot find the file specified

Detecting compiler via: cl /? -> [WinError 2] The system cannot find the file specified

Detecting compiler via: c++ --version -> [WinError 2] The system cannot find the file specified

Detecting compiler via: g++ --version -> 0
stdout:
g++ (GCC) 13.1.0
Copyright (C) 2023 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Running command: -cpp -x c++ -E -dM -
pre-processor extraction using -cpp -x c++ failed, falling back w/o lang
Running command: -E -dM -


Detecting linker via: g++ -Wl,--version -> 0
stdout:
GNU ld (GNU Binutils) 2.40
Copyright (C) 2023 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License version 3 or (at your option) a later version.
This program has absolutely no warranty.

stderr:
collect2 version 13.1.0
C:\Program Files\JetBrains\CLion 2025.2.1\bin\mingw\bin/ld.exe -m i386pep -Bdynamic C:/Program Files/JetBrains/CLion 2025.2.1/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/../../../../x86_64-w64-mingw32/lib/../lib/crt2.o C:/Program Files/JetBrains/CLion 2025.2.1/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/crtbegin.o -LC:/Program Files/JetBrains/CLion 2025.2.1/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0 -LC:/Program Files/JetBrains/CLion 2025.2.1/bin/mingw/bin/../lib/gcc -LC:/Program Files/JetBrains/CLion 2025.2.1/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/../../../../x86_64-w64-mingw32/lib/../lib -LC:/Program Files/JetBrains/CLion 2025.2.1/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/../../../../lib -LC:/Program Files/JetBrains/CLion 2025.2.1/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/../../../../x86_64-w64-mingw32/lib -LC:/Program Files/JetBrains/CLion 2025.2.1/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/../../.. --version -lstdc++ -lmingw32 -lgcc_s -lgcc -lmoldname -lmingwex -lmsvcrt -lkernel32 -lpthread -ladvapi32 -lshell32 -luser32 -lkernel32 -liconv -lmingw32 -lgcc_s -lgcc -lmoldname -lmingwex -lmsvcrt -lkernel32 C:/Program Files/JetBrains/CLion 2025.2.1/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/../../../../x86_64-w64-mingw32/lib/../lib/default-manifest.o C:/Program Files/JetBrains/CLion 2025.2.1/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/crtend.o

Sanity testing C++ compiler: g++
Is cross compiler: False.
Sanity check compiler command line: g++ sanitycheckcpp.cc -o sanitycheckcpp.exe -D_FILE_OFFSET_BITS=64
Sanity check compile stdout:


Sanity check compile stderr:


Running test binary command: C:\Users\Admin\CLionProjects\Kay\buildDir\meson-private\sanitycheckcpp.exe

Sanity check: C:\Users\Admin\CLionProjects\Kay\buildDir\meson-private\sanitycheckcpp.exe -> 0
C++ compiler for the host machine: g++ (gcc 13.1.0 "g++ (GCC) 13.1.0")
C++ linker for the host machine: g++ ld.bfd 2.40

Detecting compiler via: icl "" -> [WinError 2] The system cannot find the file specified

Detecting compiler via: cl /? -> [WinError 2] The system cannot find the file specified

Detecting compiler via: cc --version -> [WinError 2] The system cannot find the file specified

Detecting compiler via: gcc --version -> 0
stdout:
gcc (GCC) 13.1.0
Copyright (C) 2023 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Running command: -cpp -x c -E -dM -
pre-processor extraction using -cpp -x c failed, falling back w/o lang
Running command: -E -dM -


Detecting linker via: gcc -Wl,--version -> 0
stdout:
GNU ld (GNU Binutils) 2.40
Copyright (C) 2023 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License version 3 or (at your option) a later version.
This program has absolutely no warranty.

stderr:
collect2 version 13.1.0
C:\Program Files\JetBrains\CLion 2025.2.1\bin\mingw\bin/ld.exe -m i386pep -Bdynamic C:/Program Files/JetBrains/CLion 2025.2.1/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/../../../../x86_64-w64-mingw32/lib/../lib/crt2.o C:/Program Files/JetBrains/CLion 2025.2.1/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/crtbegin.o -LC:/Program Files/JetBrains/CLion 2025.2.1/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0 -LC:/Program Files/JetBrains/CLion 2025.2.1/bin/mingw/bin/../lib/gcc -LC:/Program Files/JetBrains/CLion 2025.2.1/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/../../../../x86_64-w64-mingw32/lib/../lib -LC:/Program Files/JetBrains/CLion 2025.2.1/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/../../../../lib -LC:/Program Files/JetBrains/CLion 2025.2.1/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/../../../../x86_64-w64-mingw32/lib -LC:/Program Files/JetBrains/CLion 2025.2.1/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/../../.. --version -lmingw32 -lgcc -lgcc_eh -lmoldname -lmingwex -lmsvcrt -lkernel32 -lpthread -ladvapi32 -lshell32 -luser32 -lkernel32 -liconv -lmingw32 -lgcc -lgcc_eh -lmoldname -lmingwex -lmsvcrt -lkernel32 C:/Program Files/JetBrains/CLion 2025.2.1/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/../../../../x86_64-w64-mingw32/lib/../lib/default-manifest.o C:/Program Files/JetBrains/CLion 2025.2.1/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/crtend.o

Sanity testing C compiler: gcc
Is cross compiler: False.
Sanity check compiler command line: gcc sanitycheckc.c -o sanitycheckc.exe -D_FILE_OFFSET_BITS=64
Sanity check compile stdout:


Sanity check compile stderr:


Running test binary command: C:\Users\Admin\CLionProjects\Kay\buildDir\meson-private\sanitycheckc.exe

Sanity check: C:\Users\Admin\CLionProjects\Kay\buildDir\meson-private\sanitycheckc.exe -> 0
C compiler for the build machine: gcc (gcc 13.1.0 "gcc (GCC) 13.1.0")
C linker for the build machine: gcc ld.bfd 2.40

Detecting archiver via: gcc-ar --version -> 0
stdout:
GNU ar (GNU Binutils) 2.40
Copyright (C) 2023 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License version 3 or (at your option) any later version.
This program has absolutely no warranty.


Detecting compiler via: icl "" -> [WinError 2] The system cannot find the file specified

Detecting compiler via: cl /? -> [WinError 2] The system cannot find the file specified

Detecting compiler via: c++ --version -> [WinError 2] The system cannot find the file specified

Detecting compiler via: g++ --version -> 0
stdout:
g++ (GCC) 13.1.0
Copyright (C) 2023 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Running command: -cpp -x c++ -E -dM -
pre-processor extraction using -cpp -x c++ failed, falling back w/o lang
Running command: -E -dM -


Detecting linker via: g++ -Wl,--version -> 0
stdout:
GNU ld (GNU Binutils) 2.40
Copyright (C) 2023 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License version 3 or (at your option) a later version.
This program has absolutely no warranty.

stderr:
collect2 version 13.1.0
C:\Program Files\JetBrains\CLion 2025.2.1\bin\mingw\bin/ld.exe -m i386pep -Bdynamic C:/Program Files/JetBrains/CLion 2025.2.1/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/../../../../x86_64-w64-mingw32/lib/../lib/crt2.o C:/Program Files/JetBrains/CLion 2025.2.1/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/crtbegin.o -LC:/Program Files/JetBrains/CLion 2025.2.1/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0 -LC:/Program Files/JetBrains/CLion 2025.2.1/bin/mingw/bin/../lib/gcc -LC:/Program Files/JetBrains/CLion 2025.2.1/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/../../../../x86_64-w64-mingw32/lib/../lib -LC:/Program Files/JetBrains/CLion 2025.2.1/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/../../../../lib -LC:/Program Files/JetBrains/CLion 2025.2.1/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/../../../../x86_64-w64-mingw32/lib -LC:/Program Files/JetBrains/CLion 2025.2.1/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/../../.. --version -lstdc++ -lmingw32 -lgcc_s -lgcc -lmoldname -lmingwex -lmsvcrt -lkernel32 -lpthread -ladvapi32 -lshell32 -luser32 -lkernel32 -liconv -lmingw32 -lgcc_s -lgcc -lmoldname -lmingwex -lmsvcrt -lkernel32 C:/Program Files/JetBrains/CLion 2025.2.1/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/../../../../x86_64-w64-mingw32/lib/../lib/default-manifest.o C:/Program Files/JetBrains/CLion 2025.2.1/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/crtend.o

Sanity testing C++ compiler: g++
Is cross compiler: False.
Sanity check compiler command line: g++ sanitycheckcpp.cc -o sanitycheckcpp.exe -D_FILE_OFFSET_BITS=64
Sanity check compile stdout:


Sanity check compile stderr:


Running test binary command: C:\Users\Admin\CLionProjects\Kay\buildDir\meson-private\sanitycheckcpp.exe

Sanity check: C:\Users\Admin\CLionProjects\Kay\buildDir\meson-private\sanitycheckcpp.exe -> 0
C++ compiler for the build machine: g++ (gcc 13.1.0 "g++ (GCC) 13.1.0")
C++ linker for the build machine: g++ ld.bfd 2.40
Build machine cpu family: x86_64
Build machine cpu: x86_64
Host machine cpu family: x86_64
Host machine cpu: x86_64
Target machine cpu family: x86_64
Target machine cpu: x86_64

meson.build:14:16: ERROR: Program or command 'cat' not found or not executable
`

Seems like somehow 'cat' is not recognized when built via MEson through Clion. I tried building from

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions