This is a critical regression, introduced in mingwrt-5.2.2; it arises from changes in <stdio.h>, to resolve issue #39224, which cause g++ to emit multiple publicly visible instances of vsnprintf(), each of which refers to an extern implementation of __mingw_vsnprintf(), and conflicts with its publicly visible vsprintf() alias, within the translation unit in which __mingw_vsnprintf() itself is implemented.
I applied the proposed patch, and committed it as changeset id.3c7767e. This will be included in the next WSL release.
As reported in this pair of e-mail threads:
compilation of any C++ translation unit which refers, either directly or indirectly, to vsnprintf(), will result in link failure, due to multiple public definitions of this symbol. The issue is clearly illustrated by the following code, (abstracted from the latter e-mail report):
compilation of which yields: