Tool chain 'gcc' (GNU GCC): Could not determine GCC metadata: could not find vendor in output of /usr/bin/x86_64-w64-mingw32-gcc

Trying to revive my mingw cross compile on linux to compile for x32 or x64 windows, this has worked fine in the past but now gets an error.

> Error while evaluating property 'compilerVersion' of task ':arcm:compileArcm_rc_callbacksWindows_x64_crossDebug_FACE_StaticLibraryArcm_rc_callbacksCpp'
   > No tool chain is available to build for platform 'windows_x64_cross':
       - Tool chain 'visualCpp' (Visual Studio):
           - Visual Studio is not available on this operating system.
       - Tool chain 'gcc' (GNU GCC):
           - Could not determine GCC metadata: could not find vendor in output of /usr/bin/x86_64-w64-mingw32-gcc.

The output of --version looks similar to gcc --version output

$ x86_64-w64-mingw32-gcc --version
x86_64-w64-mingw32-gcc (GCC) 10-win32 20220113
Copyright (C) 2020 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

$ gcc --version
gcc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0
Copyright (C) 2021 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

That’s not the output it tries to parse though.
It tries to parse the stderr that was output by the compiler execution.
Here a matching line is searched: gradle/platforms/native/platform-native/src/main/java/org/gradle/nativeplatform/toolchain/internal/gcc/metadata/GccMetadataProvider.java at master · gradle/gradle · GitHub
with the stderr coming from here: gradle/platforms/native/platform-native/src/main/java/org/gradle/nativeplatform/toolchain/internal/metadata/AbstractMetadataProvider.java at master · gradle/gradle · GitHub

Thank you, I was able to get it working again by specifying a newer version of gradle 8.14, which has updates to handle mingw specifically (as noted in your links).

1 Like