tinygo-site
tinygo-site copied to clipboard
Unable to build with mingw 10.2.0
mingw 10.2.0 has been released on 2021/01/12. However, the included gcc 10.2 was not able to build tinyg 0.16 and dev branch. https://chocolatey.org/packages/mingw#versionhistory
I was able to build it by installing 8.1.0.
choco install mingw -Version 8.1.0
or
choco install mingw -Version 8.1.0 --allow-downgrade
I'm using windows 10, and I'm building according to the following page https://tinygo.org/getting-started/windows/
What is the error that you are getting with MinGW 10?
The log is below.
https://gist.github.com/sago35/8cabacb874cf49cff36946c62f229e35
It looks like MinGW 10 doesn't support std::mutex. I'm not sure how to get it supported again, as LLVM relies on an up-to-date and fully supported compiler. Maybe some additional build flag is needed?
This is an error in the latest mingw-w64 package for chocolatey.
See https://chocolatey.org/packages/mingw#comment-5223930374
We should tell people to specifically install 8.1.0
@deadprogram glad we're not the only ones!
Unfortunately we currently depend on MinGW, MSVC is unsupported by the Go toolchain: https://github.com/golang/go/issues/20982
Now we can build with the version available with choco install mingw.
The following version was installed when I tried it now.
And I was able to build correctly (make llvm-build CCACHE=OFF).
mingw 11.2.0.07112021 (gcc 11.2.0)