Lots of gcc errors from mingw libraries under Windows
Summary
When compiling svgcairo package under GHC 8.10.3 or GHC 8.10.4, gcc generates lots of errors from .h files in mingw/lib/gcc/x86_64-w64-mingw32/9.2.0/include. svgcairo compiles fine under 8.10.2 and earlier. The errors suggest a mismatch between 32 and 64 bit architectures with gcc.
Steps to reproduce
> cabal install --allow-newer svgcairo
[Lots of errors: the following is a random sample]
C:/ProgramData/chocolatey/lib/ghc/tools/ghc-8.10.3/mingw/lib/gcc/x86_64-w64-mingw32/9.2.0/include/avx512fintrin.h:10924:52: note: expected '__vector(16) float' but argument is of type 'float'
C:/ProgramData/chocolatey/lib/ghc/tools/ghc-8.10.3/mingw/lib/gcc/x86_64-w64-mingw32/9.2.0/include/avx512fintrin.h:10925:10: error: incompatible type for argument 2 of '__builtin_ia32_insertf32x4_mask'
10925 | (__v4sf) __D,
| ^~~~~~~~~~~~
| |
| float
Expected behavior
Compile svgcairo without errors.
Environment
GHC 8.10.3 and 8.10.4.
I also have an independent installation of mingw. "which gcc" returns "/mingw64/bin/gcc". I'm wondering if the wrong gcc is being called.
- Operating System: Windows 10
- System Architecture: 64 bit Intel.