Admin message

Due to a large amount of spam we do not allow new users to create repositories, they are "external" users. If you are a new user and want to create a repository, for example for forking GHC, open a new issue on ghc/ghc using the "get-verified" issue template

GHC 9.0.1 Alpha1 causes cc1 error on Windows
## Summary GHC 9.0.1 Alpha1 causes cc1 error on Windows. ## Steps to reproduce 1. Install GHC 9.0.1-alpha1 https://downloads.haskell.org/ghc/9.0.1-alpha1/ 2. Invoke `ghc Main.hs` 3. Get the following error. ```haskell -- Main.hs main = putStrLn "Hello, Haskell!" ``` ``` > ghc .\Main.hs [1 of 1] Compiling Main ( Main.hs, Main.o ) Linking Main.exe ... cc1.exe: error: D:/msys64/mingw64/include: Invalid argument cc1.exe: error: D:/msys64/mingw64/x86_64-w64-mingw32/include: Invalid argument `gcc.exe' failed in phase `C Compiler'. (Exit code: 1) ``` <details> <summary>ghc -v .\Main.hs</summary> ``` > ghc -v .\Main.hs Glasgow Haskell Compiler, Version 9.0.0.20200925, stage 2 booted by GHC version 8.8.4 *** initializing unit database: Using binary package database: H:\apps\ghc-9.0.0.20200925-x86_64-unknown-mingw32\lib\package.conf.d\package.cache package flags [] loading package database H:\apps\ghc-9.0.0.20200925-x86_64-unknown-mingw32\lib\package.conf.d wired-in package ghc-prim mapped to ghc-prim-0.7.0 wired-in package ghc-bignum mapped to ghc-bignum-1.0 wired-in package base mapped to base-4.15.0.0 wired-in package rts mapped to rts-1.0 wired-in package template-haskell mapped to template-haskell-2.17.0.0 wired-in package ghc mapped to ghc-9.0.0.20200925 !!! initializing unit database: finished in 0.00 milliseconds, allocated 8.019 megabytes *** initializing unit database: package flags [] loading package database H:\apps\ghc-9.0.0.20200925-x86_64-unknown-mingw32\lib\package.conf.d wired-in package ghc-prim mapped to ghc-prim-0.7.0 wired-in package ghc-bignum mapped to ghc-bignum-1.0 wired-in package base mapped to base-4.15.0.0 wired-in package rts mapped to rts-1.0 wired-in package template-haskell mapped to template-haskell-2.17.0.0 wired-in package ghc mapped to ghc-9.0.0.20200925 !!! initializing unit database: finished in 0.00 milliseconds, allocated 3.239 megabytes *** Chasing dependencies: Chasing modules from: *Main.hs !!! Chasing dependencies: finished in 0.00 milliseconds, allocated 0.536 megabytes Stable obj: {Main} Stable BCO: {} Ready for upsweep [NONREC ModSummary { ms_hs_date = 2020-09-30 04:16:48.4672798 UTC ms_mod = Main, ms_textual_imps = [(Nothing, Prelude)] ms_srcimps = [] }] *** Deleting temp files: Deleting: compile: input file Main.hs *** Checking old interface for Main (use -ddump-hi-diffs for more details): [1 of 1] Skipping Main ( Main.hs, Main.o ) Upsweep completely successful. *** Deleting temp files: Deleting: link: linkables are ... LinkableM (2020-09-30 04:16:52.290825 UTC) Main [DotO Main.o] Linking Main.exe ... Created temporary directory: C:\Users\kazuki\AppData\Local\Temp\ghc7444_0 *** systool:cc: *** C Compiler: "H:\apps\ghc-9.0.0.20200925-x86_64-unknown-mingw32\lib\../mingw/bin/gcc.exe" "-c" "C:\Users\kazuki\AppData\Local\Temp\ghc7444_0\ghc_1.c" "-o" "C:\Users\kazuki\AppData\Local\Temp\ghc7444_0\ghc_2.o" "-IH:\apps\ghc-9.0.0.20200925-x86_64-unknown-mingw32\lib\x86_64-windows-ghc-9.0.0.20200925\rts-1.0\include" cc1.exe: error: D:/msys64/mingw64/include: Invalid argument cc1.exe: error: D:/msys64/mingw64/x86_64-w64-mingw32/include: Invalid argument *** Deleting temp files: Deleting: C:\Users\kazuki\AppData\Local\Temp\ghc7444_0\ghc_1.c C:\Users\kazuki\AppData\Local\Temp\ghc7444_0\ghc_3.rsp C:\Users\kazuki\AppData\Local\Temp\ghc7444_0\ghc_2.o Warning: deleting non-existent C:\Users\kazuki\AppData\Local\Temp\ghc7444_0\ghc_2.o *** Deleting temp dirs: Deleting: C:\Users\kazuki\AppData\Local\Temp\ghc7444_0 `gcc.exe' failed in phase `C Compiler'. (Exit code: 1) ``` </details> <details> <summary>gcc -v</summary> ``` > H:\apps\ghc-9.0.0.20200925-x86_64-unknown-mingw32\lib\../mingw/bin/gcc.exe -c C:\Users\kazuki\AppData\Local\Temp\ghc17980_0\ghc_1.c -o C:\Users\kazuki\AppData\Local\Temp\ghc17980_0\ghc_2.o -IH:\apps\ghc-9.0.0.20200925-x86_64-unknown-mingw32\lib\x86_64-windows-ghc-9.0.0.20200925\rts-1.0\include -v Using built-in specs. COLLECT_GCC=H:\\apps\\ghc-9.0.0.20200925-x86_64-unknown-mingw32\\mingw\\bin/realgcc.exe Target: x86_64-w64-mingw32 Configured with: ../gcc-9.3.0/configure --prefix=/mingw64 --with-local-prefix=/mingw64/local --build=x86_64-w64-mingw32 --host=x86_64-w64-mingw32 --target=x86_64-w64-mingw32 --with-native-system-header-dir=/mingw64/x86_64-w64-mingw32/include --libexecdir=/mingw64/lib --enable-bootstrap --with-arch=x86-64 --with-tune=generic --enable-languages=c,lto,c++,fortran,ada,objc,obj-c++ --enable-shared --enable-static --enable-libatomic --enable-threads=posix --enable-graphite --enable-fully-dynamic-string --enable-libstdcxx-filesystem-ts=yes --enable-libstdcxx-time=yes --disable-libstdcxx-pch --disable-libstdcxx-debug --disable-isl-version-check --enable-lto --enable-libgomp --disable-multilib --enable-checking=release --disable-rpath --disable-win32-registry --disable-nls --disable-werror --disable-symvers --enable-plugin --with-libiconv --with-system-zlib --with-gmp=/mingw64 --with-mpfr=/mingw64 --with-mpc=/mingw64 --with-isl=/mingw64 --with-pkgversion='Rev1, Built by MSYS2 project' --with-bugurl=https://sourceforge.net/projects/msys2 --with-gnu-as --with-gnu-ld Thread model: posix gcc version 9.3.0 (Rev1, Built by MSYS2 project) COLLECT_GCC_OPTIONS='-B' 'H:\\apps\\ghc-9.0.0.20200925-x86_64-unknown-mingw32\\mingw\\bin' '-B' 'H:\\apps\\ghc-9.0.0.20200925-x86_64-unknown-mingw32\\mingw\\bin/../lib' '-B' 'H:\\apps\\ghc-9.0.0.20200925-x86_64-unknown-mingw32\\mingw\\bin/../lib/gcc/x86_64-w64-mingw32/9.3.0' '-B' 'H:\\apps\\ghc-9.0.0.20200925-x86_64-unknown-mingw32\\mingw\\bin/../libexec/gcc/x86_64-w64-mingw32/9.3.0' '-c' '-o' 'C:\\Users\\kazuki\\AppData\\Local\\Temp\\ghc17980_0\\ghc_2.o' '-I' 'H:\\apps\\ghc-9.0.0.20200925-x86_64-unknown-mingw32\\lib\\x86_64-windows-ghc-9.0.0.20200925\\rts-1.0\\include' '-v' '-mtune=generic' '-march=x86-64' H://apps//ghc-9.0.0.20200925-x86_64-unknown-mingw32//mingw//bin/../lib/gcc/x86_64-w64-mingw32/9.3.0/cc1.exe -quiet -v -I H:\\apps\\ghc-9.0.0.20200925-x86_64-unknown-mingw32\\lib\\x86_64-windows-ghc-9.0.0.20200925\\rts-1.0\\include -iprefix H:/apps/ghc-9.0.0.20200925-x86_64-unknown-mingw32/mingw/bin/../lib/gcc/x86_64-w64-mingw32/9.3.0/ -isystem H://apps//ghc-9.0.0.20200925-x86_64-unknown-mingw32//mingw//bin/../lib/gcc/x86_64-w64-mingw32/9.3.0/include -isystem H://apps//ghc-9.0.0.20200925-x86_64-unknown-mingw32//mingw//bin/../lib/gcc/x86_64-w64-mingw32/9.3.0/include-fixed -D_REENTRANT C:\\Users\\kazuki\\AppData\\Local\\Temp\\ghc17980_0\\ghc_1.c -quiet -dumpbase ghc_1.c -mtune=generic -march=x86-64 -auxbase-strip C:\\Users\\kazuki\\AppData\\Local\\Temp\\ghc17980_0\\ghc_2.o -version -o C:\Users\kazuki\AppData\Local\Temp\cch4TIDS.s GNU C17 (Rev1, Built by MSYS2 project) version 9.3.0 (x86_64-w64-mingw32) compiled by GNU C version 9.3.0, GMP version 6.2.0, MPFR version 4.0.2, MPC version 1.1.0, isl version isl-0.22.1-GMP GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072 ignoring duplicate directory "H:/apps/ghc-9.0.0.20200925-x86_64-unknown-mingw32/mingw/bin/../lib/gcc/x86_64-w64-mingw32/9.3.0/include" ignoring duplicate directory "H:/apps/ghc-9.0.0.20200925-x86_64-unknown-mingw32/mingw/bin/../lib/gcc/x86_64-w64-mingw32/9.3.0/include-fixed" ignoring duplicate directory "H:/apps/ghc-9.0.0.20200925-x86_64-unknown-mingw32/mingw/lib/gcc/../../lib/gcc/x86_64-w64-mingw32/9.3.0/include" cc1.exe: error: D:/msys64/mingw64/include: Invalid argument ignoring nonexistent directory "/mingw64/include" ignoring duplicate directory "H:/apps/ghc-9.0.0.20200925-x86_64-unknown-mingw32/mingw/lib/gcc/../../lib/gcc/x86_64-w64-mingw32/9.3.0/include-fixed" ignoring duplicate directory "H:/apps/ghc-9.0.0.20200925-x86_64-unknown-mingw32/mingw/lib/gcc/../../lib/gcc/x86_64-w64-mingw32/9.3.0/../../../../x86_64-w64-mingw32/include" cc1.exe: error: D:/msys64/mingw64/x86_64-w64-mingw32/include: Invalid argument #include "..." search starts here: #include <...> search starts here: H:\\apps\\ghc-9.0.0.20200925-x86_64-unknown-mingw32\\lib\\x86_64-windows-ghc-9.0.0.20200925\\rts-1.0\\include H://apps//ghc-9.0.0.20200925-x86_64-unknown-mingw32//mingw//bin/../lib/gcc/x86_64-w64-mingw32/9.3.0/include H://apps//ghc-9.0.0.20200925-x86_64-unknown-mingw32//mingw//bin/../lib/gcc/x86_64-w64-mingw32/9.3.0/include-fixed H:/apps/ghc-9.0.0.20200925-x86_64-unknown-mingw32/mingw/bin/../lib/gcc/x86_64-w64-mingw32/9.3.0/../../../../include H:/apps/ghc-9.0.0.20200925-x86_64-unknown-mingw32/mingw/bin/../lib/gcc/x86_64-w64-mingw32/9.3.0/../../../../x86_64-w64-mingw32/include End of search list. GNU C17 (Rev1, Built by MSYS2 project) version 9.3.0 (x86_64-w64-mingw32) compiled by GNU C version 9.3.0, GMP version 6.2.0, MPFR version 4.0.2, MPC version 1.1.0, isl version isl-0.22.1-GMP GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072 ``` </details> On my local PC, D drive is an optical disc drive, and no media were installed. The GHC 9.0.1 Alpha1 was installed on H drive. ## Expected behavior Main.exe gets to be made without errors. ## Environment * GHC: 9.0.1-alpha1 * OS: Windows 10 Pro 20H2 * Arch: x86_64 ## Additional info I tried this on my local PC, GitHub Actions, and Docker. I can reproduce this only on my local PC. * GitHub Actions * Invoke `cabal build` instead of `ghc Main.hs` * Build log: https://github.com/kakkun61/linear-type-playground/runs/1181818130 * Docker * This needs a Windows host. * Dockerfile: https://gist.github.com/kakkun61/8703f6319359e1ab17dc8768bb604bb4
issue