niXman / mingw-builds

Scripts for building the 32 and 64-bit MinGW-W64 compilers for Windows
Other
282 stars 107 forks source link

C preprocessor "/lib/cpp" fails sanity check #667

Closed starg2 closed 6 months ago

starg2 commented 7 months ago

Today, I tried to build gcc 13.2.0 but every configuration failed with the following error:

checking how to run the C preprocessor... /lib/cpp
configure: error: in `/c/buildroot/x86_64-1320-posix-seh-ucrt-rt_v11-rev0/build/gcc-13.2.0/x86_64-w64-mingw32/libgcc':
configure: error: C preprocessor "/lib/cpp" fails sanity check
See `config.log' for more details
make[2]: *** [Makefile:19013: configure-stage1-target-libgcc] Error 1
make[2]: Leaving directory '/c/buildroot/x86_64-1320-posix-seh-ucrt-rt_v11-rev0/build/gcc-13.2.0'
make[1]: *** [Makefile:24536: stage1-bubble] Error 2
make[1]: Leaving directory '/c/buildroot/x86_64-1320-posix-seh-ucrt-rt_v11-rev0/build/gcc-13.2.0'
make: *** [Makefile:1091: all] Error 2

The error happened while configuring libgcc in stage1. I have no idea why configure thinks non-existing /lib/cpp is a C preprocessor.

Strangely, the same configurations built successfully last month.

Any help would be appreciated.

starg2 commented 7 months ago

Downgrading msys2-runtime from 3.4.10-4 to 3.4.10-2 solved the issue.

So we are affected by pathconv-adjustments as well. (cf. msys2/msys2-runtime#187)

starg2 commented 7 months ago

Msys2 project has recently built gcc successfully.

The true cause must be somewhere in the differences between msys2 and mingw-builds.

starg2 commented 6 months ago

Msys2-runtime 3.4.10-5 was released and the isuue is fixed now.