Closed StephanTLavavej closed 3 years ago
No. You install the headers before building everything else. This is part of the normal procedure of upgrading the CRT.
Thanks for the info; I'll consider this a permanent change to my scripts and I'll close this issue during the next distro release. However, I will note that if the headers need to be built and installed first, then it makes no sense to have a combined build that doesn't do that step.
Building mingw-w64 6.0.0 fails with:
The issue is that
C:\Temp\gcc\src\mingw-w64-headers\crt\process.h
now includes<corecrt_startup.h>
which defines_onexit_table_t
, but the compilation ofsrc/mingw-w64-crt/misc/onexit_table.c
isn't dragging in the updatedprocess.h
. (Instead, the current distro'sprocess.h
from mingw-w64 5.0.4 is being used.)The
Makefile
is correctly buildingmingw-w64-headers
beforemingw-w64-crt
, but it's not installingmingw-w64-headers
before buildingmingw-w64-crt
, so-I/c/temp/gcc/dest/x86_64-w64-mingw32/include
isn't helping. (-I. -I../../src/mingw-w64-crt -I../../src/mingw-w64-crt/include
can't help here.)I'm working around this by building and installing
mingw-w64-headers
first, but this shouldn't be necessary. Themingw-w64-crt
build should be fixed by adding-I
options to consume headers from the source tree, instead of consuming whatever's in the current distro, or what's in the destination directory (usually, build and install aren't intermixed).Note: This specific failure will seem to disappear after the distro is upgraded to mingw-w64 6.0.0 (via my workaround), as its
process.h
will no longer be outdated. However, the root cause will remain - updated headers in the source tree won't be consumed immediately, so when headers and sources simultaneously change (e.g. defining and using a new type like_onexit_table_t
), this will happen again.