winpthreads build fails on openSUSE Tumbleweed
/bin/sh ./libtool --tag=RC --mode=compile i686-w64-mingw32-windres -i ../src/version.rc -o src/version.lo
rm -f fakelib/libgcc.a
i686-w64-mingw32-ar cru fakelib/libgcc.a src/libgcc/dll_dependency.o src/libgcc/dll_math.o
i686-w64-mingw32-ranlib fakelib/libgcc.a
libtool: compile: i686-w64-mingw32-windres -i ../src/version.rc -o src/.libs/version.o
../src/version.rc:23:10: fatal error: 'winver.h' file not found
23 | #include <winver.h>
| ^~~~~~~~~~
1 error generated.
llvm-rc: Preprocessing failed.
make[2]: *** [Makefile:1375: src/version.lo] Error 1
make[2]: Leaving directory '/data/git/llvm-mingw/mingw-w64/mingw-w64-libraries/winpthreads/build-i686'
make[1]: *** [Makefile:908: all-recursive] Error 1
make[1]: Leaving directory '/data/git/llvm-mingw/mingw-w64/mingw-w64-libraries/winpthreads/build-i686'
make: *** [Makefile:514: all] Error 2
The winver.h file is present in $dest/generic-w64-mingw32/include/winver.h, but it doesn't seem to be on the include path for some reason.
Forgot to mention that I used the --host-clang option.
Forgot to mention that I used the
--host-clangoption.
Thanks, that's a pretty vital clue here.
I don't have any installs of openSUSE readily available for testing and looking into this... We have Dockerfile.system-clang for testing installs with --host-clang, based on Ubuntu, and there, the builds succeed.
Are you able to modify that file to make it use an openSUSE base image, and see if you can reproduce the issue there? If you can do that, it'd make it much easier for me to look into the issue.