Skip to content

Conversation

@Sakimotor
Copy link

Visual Studio always gave me trouble and I didn't feel like installing 8GB of Clang-related tools, I looked for alternatives and the MSYS2 solution seems to be a pretty quick and easy compromise to give people an environment with Clang.

@Sakimotor Sakimotor changed the title Added Windows build instructions with MSYS2 Add Windows build instructions with MSYS2 Mar 3, 2025
@halotroop2288
Copy link

As described

  • ✔️ Installed msys2 from Scoop
  • ✔️ Ran the msys2 shell
  • ✔️ ran pacman -Syu to update the package index
  • ✔️ ran pacman -S mingw-w64-clang-x86_64-cmake mingw-w64-clang-x86_64-libc++ mingw-w64-x86_64-ninja
  • ❌ ran cmake -DCMAKE_BUILD_TYPE=Debug .
    • bash: cmake: command not found

Alternative approach

I also tried normal cmake with these, instead of the one from the super long package name. It runs but doesn't detect a compiler unless you install normal clang as well.
And I also installed normal ninja and make to solve the other issues that came up before CMake would actually generate the Makefile.

So I tried again after running pacman -S cmake ninja clang make to solve all of the initial problems, now it fails again while compiling.

Errors
xbox.h:248:26: error: member ‘be<unsigned int> _XXOVERLAPPED::<unnamed union>::<unnamed struct>::Error’ with constructor not allowed in anonymous aggregate
xbox.h:249:26: error: member ‘be<unsigned int> _XXOVERLAPPED::<unnamed union>::<unnamed struct>::Length’ with constructor not allowed in anonymous aggregate

@Sakimotor
Copy link
Author

As described

  • ✔️ Installed msys2 from Scoop

  • ✔️ Ran the msys2 shell

  • ✔️ ran pacman -Syu to update the package index

  • ✔️ ran pacman -S mingw-w64-clang-x86_64-cmake mingw-w64-clang-x86_64-libc++ mingw-w64-x86_64-ninja

  • ❌ ran cmake -DCMAKE_BUILD_TYPE=Debug .

    • bash: cmake: command not found

Alternative approach

I also tried normal cmake with these, instead of the one from the super long package name. It runs but doesn't detect a compiler unless you install normal clang as well. And I also installed normal ninja and make to solve the other issues that came up before CMake would actually generate the Makefile.

So I tried again after running pacman -S cmake ninja clang make to solve all of the initial problems, now it fails again while compiling.

Errors

I don't know how the Scoop version of MSYS2 works, but if you install it with the installer from the website, you should have multiple available environments, with only two of them being CLANG

image

If you launched your MSYS2 in the right environment, the name should appear next to the current directory path. The path in which your packages go depend on the environment, so it would explain why yours didn't locate cmake at first.

image

@halotroop2288
Copy link

I reinstalled Msys2 from the website instead of Scoop on the slightest chance that there's a functional difference between that and the Scoop version. This is becoming an extremely costly experience data-wise, as I've tried every configuration I can think of and have redownloaded these multi-gigabyte toolchains many times.

Now we're just back to not being able to find a compiler. It's like this "CLANG environment" doesn't even come with CLANG!
image

After I installed that it finally works.

HALLELUJAH!

image

So add this package to your instructions: mingw-w64-clang-x86_64-clang

@ImanCol
Copy link

ImanCol commented Mar 12, 2025

& Ninja (cmake --build not work)
image

@Oroborius
Copy link

Oroborius commented Mar 14, 2025

Followed this chain to the letter. Doesn't appear to work. Still get configuring incomplete.

Edit: Fixed it. Should specify to clone w/ --recursive

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants