Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

x/website: Invalid compiler requirements for race detector on Windows #61916

Open
antoninbas opened this issue Aug 10, 2023 · 1 comment
Open
Labels
Documentation NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. OS-Windows website

Comments

@antoninbas
Copy link

antoninbas commented Aug 10, 2023

The current documentation reads:

On Windows, the race detector runtime is sensitive to the version of the C compiler installed; as of Go 1.21, building a program with -race requires a C compiler that incorporates version 8 or later of the mingw-w64 runtime libraries. You can test your C compiler by invoking it with the arguments --print-file-name libsynchronization.a. A newer compliant C compiler will print a full path for this library, whereas older C compilers will just echo the argument.

According to the documentation, version 8 of the mingw-w64 runtime libraries should work, as it is the minimum required version ("version 8 or later"). However, it doesn't seem to work.

I have tested using Github Actions runners for Windows. Github actions supports 2 runners: windows-2019 (which comes with Mingw-w64 8.1.0), and windows-2022 (which comes with Mingw-w64 11.2.0). I can run the race detector successfully with the latter (windows-2022), but not with the former (windows-2019). When using ``windows-2019andMingw-w64 8.1.0`, the observed error is the same as for #61058: `exit status 0xc0000139`.

windows-2019 runner:

> gcc --print-file-name libsynchronization.a
C:/ProgramData/Chocolatey/lib/mingw/tools/install/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/lib/../lib/libsynchronization.a

windows-2022 runner:

Run gcc --print-file-name libsynchronization.a
c:/programdata/chocolatey/lib/mingw/tools/install/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/lib/../lib/libsynchronization.a

I don't know what the exact requirement is, but 8.1.0 does not work (unless some other dependency is at fault).

Installed software on Github Actions Windows runners:

Note that I am using Go v1.21, and that I didn't have the same issue with Go v1.19.

@gopherbot gopherbot added this to the Unreleased milestone Aug 10, 2023
@ALTree ALTree added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Aug 10, 2023
@findleyr findleyr modified the milestones: Unreleased, website/later Aug 16, 2023
@ChristoWolf
Copy link

Hi!

Just wanted to chime in that I am experiencing the same issue with mingw-w64-8.1.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Documentation NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. OS-Windows website
Projects
None yet
Development

No branches or pull requests

6 participants