lovr-docs icon indicating copy to clipboard operation
lovr-docs copied to clipboard

Compiling Guide Should Mention C11 Requirement

Open bjornbytes opened this issue 3 years ago • 7 comments

  • C11 requires Windows SDK 2104 (maybe there is even a more specific version that has the stdalign.h fix).
  • GCC version: 4.9
  • clang version: 3.1

bjornbytes avatar Apr 24 '22 03:04 bjornbytes

In my tests on Windows:

FAILED: Microsoft Visual Studio Community 2019 Version 16.11.3, CMake Version 3.17.0-rc1

ALSO FAILED: Microsoft Visual Studio Community 2019 Version 16.11.3, CMake Version 3.23.1

SUCCEEDED: Microsoft Visual Studio Community 2019 Version Version 16.11.13, CMake Version 3.23.1

Microsoft's blog says C11 support landed in 16.8 (so probably my 16.11.3 would have worked).

So I think you need to make it clear that both an adequately new version of MSVC 2019 (IE the 2019 version won't work) is needed, but also a adequately new CMake.exe.

mcclure avatar Apr 24 '22 18:04 mcclure

for what its worth. My machine needed this https://github.com/bjornbytes/lovr/pull/553

cmake version 3.16.4

Microsoft (R) Build Engine version 16.9.0+5e4b48a27 for .NET Framework

jascase901 avatar Apr 24 '22 23:04 jascase901

Update: According to the cmake_aid help account on Twitter, you specifically need CMake version 3.18 to build C11 [EDIT: With MSVC that is]. https://twitter.com/cmake_aid/status/1518346586039988225

mcclure avatar Apr 25 '22 22:04 mcclure

GCC supports -std=c11 in 4.6, but didn't get _Thread_local until 4.9.

clang added support for C11 in version 3.1.

bjornbytes avatar Apr 25 '22 22:04 bjornbytes

upgrading cmake but keeping Microsoft (R) Build Engine version 16.9.0+5e4b48a27 for .NET Framework broke my build . So im guessing that cmake 3.16.4 wasn't actually building lovr with c11? Anyways im just going to upgrade.

jascase901 avatar Apr 28 '22 03:04 jascase901

@jascase901 When you upgrade CMake you have to clear out your build folder and re-run the configure step.

mcclure avatar Apr 28 '22 20:04 mcclure

thanks, @mcclure I did. After my cmake upgrade, but with Microsoft (R) Build Engine version 16.9.0+5e4b48a27 for .NET Framework I got the stdalign.h that @bjornbytes mentioned.

jascase901 avatar Apr 28 '22 20:04 jascase901

Is done, with troubleshooting entry also added for missing stdalign.h header.

bjornbytes avatar Oct 22 '22 02:10 bjornbytes