The GCC-Toolchain cannot be picked up from the system if cc is not symlinked to gcc.
The version check
which cc && test -f $(dirname $(which cc))/c++ && printf "#define GCCVER ((__GNUC__ << 16)+(__GNUC_MINOR__ << 8)+(__GNUC_PATCHLEVEL__))\n#if (GCCVER < 0x070300)\ n#error \"System's GCC cannot be used: we need at least GCC 7.X. We are going to compile our own version.\"\n#endif\n" | cc -xc++ - -c -o /dev/null
is using cc.
A possible fix is using environment variable $CC instead of cc. For me this fixes the problem.
The GCC-Toolchain cannot be picked up from the system if cc is not symlinked to gcc.
The version check
which cc && test -f $(dirname $(which cc))/c++ && printf "#define GCCVER ((__GNUC__ << 16)+(__GNUC_MINOR__ << 8)+(__GNUC_PATCHLEVEL__))\n#if (GCCVER < 0x070300)\ n#error \"System's GCC cannot be used: we need at least GCC 7.X. We are going to compile our own version.\"\n#endif\n" | cc -xc++ - -c -o /dev/nullis using cc.
A possible fix is using environment variable $CC instead of cc. For me this fixes the problem.