https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100598
Bug ID: 100598 Summary: MinGW Canadian cross toolchain fails to build due to missing BASEVER in genversion.c Product: gcc Version: 12.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: other Assignee: unassigned at gcc dot gnu.org Reporter: markus.boeck02 at gmail dot com Target Milestone: --- I am currently unable to build trunk version of gcc due to a compiler error when compiling the file genversion.c. This happens when crosscompiling a GCC toolchain for a x86_64-w64-mingw32 host. The compiler error: ../../gcc/genversion.c: In function ‘int main()’: ../../gcc/genversion.c:37:20: error: ‘BASEVER’ was not declared in this scope char basever[] = BASEVER; ^~~~~~~ ../../gcc/genversion.c:50:11: error: ‘DEVPHASE’ was not declared in this scope phase = DEVPHASE[0]; ^~~~~~~~ ../../gcc/genversion.c:73:39: error: expected ‘)’ before ‘BASEVER’ printf ("#define version_string \"" BASEVER DATESTAMP DEVPHASE REVISION "\"\n"); ^~~~~~~ ../../gcc/genversion.c:74:42: error: expected ‘)’ before ‘PKGVERSION’ printf ("#define pkgversion_string \"" PKGVERSION "\"\n\n"); ^~~~~~~~~~ ../../gcc/genversion.c:82:39: error: expected ‘)’ before ‘BUGURL’ printf ("#define bug_report_url \"" BUGURL "\"\n\n"); ^~~~~~ make[2]: *** [build/genversion.o] Error 1 make[2]: *** Waiting for unfinished jobs.... The compile command used in the build is: g++ -c -DIN_GCC -DGENERATOR_FILE -I. -Ibuild -I../../gcc -I../../gcc/build -I../../gcc/../include -I../../gcc/../libcpp/include -I/mnt/c/GCC-Build/NewestLinux/Libraries/include \ -o build/genversion.o ../../gcc/genversion.c where g++ is 7.5.0 shipped with Ubuntu 18.04 which I am using as build environment. The configure command used is: ../configure --target=x86_64-w64-mingw32 --host=x86_64-w64-mingw32 --disable-bootstrap --enable-libstdcxx-debug --with-tune=znver1 --prefix=/mnt/c/GCC --with-sysroot=/mnt/c/GCC-Build/NewestLinux --with-build-sysroot=/mnt/c/GCC-Build/NewestLinux --disable-libstdcxx-pch --disable-multilib --enable-libgomp --with-cross-host --with-libiconv-prefix=/mnt/c/GCC-Build/NewestLinux/Libraries --disable-libstdcxx-verbose --enable-languages=c,c++,fortran,lto,objc,obj-c++,d --disable-nls --disable-win32-registry --enable-shared --with-gnu-as --with-gnu-ld --enable-threads=posix --program-suffix=-12 --enable-version-specific-runtime-libs --with-gcc-major-version-only --enable-__cxa_atexit --enable-plugin --program-prefix= --enable-checking=release