That seems to be an issue in #lame project. The #autotools file configure.in does not find #ncurses with pkgconfig. Hence, it misses the required compiler flag for static linking. For that, -DNCURSES_STATIC flag has be manually added with CPPFLAGS or CFLAGS or CXXFLAGS variables.
https://github.com/msys2/MINGW-packages/issues/10312#issuecomment-1142448264