Windows broken

lonetiger at gmail.com lonetiger at gmail.com
Thu Jun 29 08:37:23 UTC 2017


Oops, sorry, didn’t notice it because both mine and harbormaster’s msys2 have separate GCCs installed as well.

You can just leave it reverted, could you also push it? I don’t see an easy fix that would also work for end user
Configure based cabal installs. So I think I’ll have to go back to the drawing board for this one.

Thanks,
Tamar
From: Simon Peyton Jones
Sent: Thursday, June 29, 2017 09:10
To: lonetiger at gmail.com; ghc-devs
Subject: RE: Windows broken

Tamar

Aha!  It’s you!   Reverting this commit fixes it
git revert d6cecde585b0980ed8e0050c5a1d315789fb6356
[master af9f0f4] Revert "Remove the Windows GCC driver."
5 files changed, 88 insertions(+), 30 deletions(-)
create mode 100644 driver/gcc/gcc.c

If you can see an easy fix I can try that.  Else I’ll probably just revert and let you investigate.

I appear not to have Cygwin, and no other gcc is not in my path.  I just rely on the one that comes with GHC.

After reverting, here’s what happens when I compile foo.c (trace below).   The invocation of cc1.exe looks rather different
C:/code/HEAD/inplace/mingw/bin/gcc.exe -v foo.c
Using built-in specs.
COLLECT_GCC=C:\\code\\HEAD\\inplace\\mingw\\bin/realgcc.exe
COLLECT_LTO_WRAPPER=C://code//HEAD//inplace//mingw//bin/../lib/gcc/x86_64-w64-mingw32/6.3.0/lto-wrapper.exe
Target: x86_64-w64-mingw32
Configured with: ../gcc-6.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++,objc,obj-c++,fortran,ada --enable-shared --enable-static --enable-libatomic --enable-threads=posix --enable-graphite --enable-fully-dynamic-string --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 --with-libiconv --with-system-zlib --with-gmp=/mingw64 --with-mpfr=/mingw64 --with-mpc=/mingw64 --with-isl=/mingw64 --with-pkgversion='Rev2, Built by MSYS2 project' --with-bugurl=https://sourceforge.net/projects/msys2 --with-gnu-as --with-gnu-ld
Thread model: posix
gcc version 6.3.0 (Rev2, Built by MSYS2 project) 
COLLECT_GCC_OPTIONS='-B' 'C:\\code\\HEAD\\inplace\\mingw\\bin' '-B' 'C:\\code\\HEAD\\inplace\\mingw\\bin/../lib' '-B' 'C:\\code\\HEAD\\inplace\\mingw\\bin/../lib/gcc/x86_64-w64-mingw32/6.3.0' '-B' 'C:\\code\\HEAD\\inplace\\mingw\\bin/../libexec/gcc/x86_64-w64-mingw32/6.3.0' '-v' '-mtune=generic' '-march=x86-64'
C://code//HEAD//inplace//mingw//bin/../lib/gcc/x86_64-w64-mingw32/6.3.0/cc1.exe -quiet -v -iprefix C:/code/HEAD/inplace/mingw/bin/../lib/gcc/x86_64-w64-mingw32/6.3.0/ -isystem C://code//HEAD//inplace//mingw//bin/../lib/gcc/x86_64-w64-mingw32/6.3.0/include -isystem C://code//HEAD//inplace//mingw//bin/../lib/gcc/x86_64-w64-mingw32/6.3.0/include-fixed -D_REENTRANT foo.c -quiet -dumpbase foo.c -mtune=generic -march=x86-64 -auxbase foo -version -o C:\Users\simonpj\AppData\Local\Temp\ccGa7vqE.s
GNU C11 (Rev2, Built by MSYS2 project) version 6.3.0 (x86_64-w64-mingw32)
      compiled by GNU C version 6.3.0, GMP version 6.1.2, MPFR version 3.1.5-p2, MPC version 1.0.3, isl version 0.15
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
ignoring duplicate directory "C:/code/HEAD/inplace/mingw/bin/../lib/gcc/x86_64-w64-mingw32/6.3.0/include"
ignoring duplicate directory "C:/code/HEAD/inplace/mingw/bin/../lib/gcc/x86_64-w64-mingw32/6.3.0/include-fixed"
ignoring duplicate directory "C:/code/HEAD/inplace/mingw/lib/gcc/../../lib/gcc/x86_64-w64-mingw32/6.3.0/include"
ignoring nonexistent directory "C:/building/msys64/mingw64/include"
ignoring nonexistent directory "/mingw64/include"
ignoring duplicate directory "C:/code/HEAD/inplace/mingw/lib/gcc/../../lib/gcc/x86_64-w64-mingw32/6.3.0/include-fixed"
ignoring duplicate directory "C:/code/HEAD/inplace/mingw/lib/gcc/../../lib/gcc/x86_64-w64-mingw32/6.3.0/../../../../x86_64-w64-mingw32/include"
ignoring nonexistent directory "C:/building/msys64/mingw64/x86_64-w64-mingw32/include"
#include "..." search starts here:
#include <...> search starts here:
C://code//HEAD//inplace//mingw//bin/../lib/gcc/x86_64-w64-mingw32/6.3.0/include
C://code//HEAD//inplace//mingw//bin/../lib/gcc/x86_64-w64-mingw32/6.3.0/include-fixed
C:/code/HEAD/inplace/mingw/bin/../lib/gcc/x86_64-w64-mingw32/6.3.0/../../../../include
C:/code/HEAD/inplace/mingw/bin/../lib/gcc/x86_64-w64-mingw32/6.3.0/../../../../x86_64-w64-mingw32/include
End of search list.
GNU C11 (Rev2, Built by MSYS2 project) version 6.3.0 (x86_64-w64-mingw32)
      compiled by GNU C version 6.3.0, GMP version 6.1.2, MPFR version 3.1.5-p2, MPC version 1.0.3, isl version 0.15
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: bdbc00c2d895b1ff93d4c2cb4c58b5b1


From: lonetiger at gmail.com [mailto:lonetiger at gmail.com] 
Sent: 29 June 2017 02:38
To: Simon Peyton Jones <simonpj at microsoft.com>; ghc-devs <ghc-devs at haskell.org>
Subject: RE: Windows broken

Hi Simon,

What happens when you try to compile that simple test with the bundled gcc?

Could you also run it through strace, this will force msys2 not to swallow errors from the OS.

Should you get an exception dialog then rm -rf inplace/mingw and rerun configure (I assume you’re on a recent revision).

If none of the above give a clue, you could try ./configure --enable-distro-toolchain, this will have it skip the bundled GCC
And use any installed by msys2. If this work then try rm’ing the GHC-tarballs folder and the inplace/mingw folder and try again
With –enable-tarballs-autodownloads.

Tamar.

From: Simon Peyton Jones via ghc-devs
Sent: Thursday, June 29, 2017 00:35
To: ghc-devs
Subject: Windows broken

Help please!
Suddenly my Windows build has stopped working.   See below.  What should I do?  I’m totally stuck.
This has never happened before.
I get this:
GHC path canonicalised to: c:/fp/ghc-8.0.2/bin/ghc
checking build system type... x86_64-pc-msys
checking host system type... x86_64-pc-msys
checking target system type... x86_64-pc-msys
Build platform inferred as: x86_64-unknown-mingw32
Host platform inferred as: x86_64-unknown-mingw32
Target platform inferred as: x86_64-unknown-mingw32
GHC build  : x86_64-unknown-mingw32
GHC host   : x86_64-unknown-mingw32
GHC target : x86_64-unknown-mingw32
LLVM target: x86_64-unknown-mingw32
checking for path to top of build tree... C:/code/HEAD
configure: Checking for Windows toolchain tarballs...
configure: Extracting Windows toolchain from archives (may take a while)...
configure: In-tree MingW-w64 tree created
configure: Making in-tree perl tree
configure: In-tree perl tree created
checking whether the C compiler works... no
configure: error: in `/c/code/HEAD':
configure: error: C compiler cannot create executables
See `config.log' for more details
Something wrong with the gcc.exe?  Config.log has this
gcc version 6.3.0 (Rev2, Built by MSYS2 project) 
configure:4950: $? = 0
configure:4939: C:/code/HEAD/inplace/mingw/bin/gcc.exe -V >&5
gcc.exe: error: unrecognized command line option '-V'
gcc.exe: fatal error: no input files
compilation terminated.
configure:4950: $? = 1
configure:4939: C:/code/HEAD/inplace/mingw/bin/gcc.exe -qversion >&5
gcc.exe: error: unrecognized command line option '-qversion'; did you mean '--version'?
gcc.exe: fatal error: no input files
compilation terminated.
configure:4950: $? = 1
configure:4970: checking whether the C compiler works
configure:4992: C:/code/HEAD/inplace/mingw/bin/gcc.exe    conftest.c  >&5
configure:4996: $? = 1
configure:5034: result: no
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "The Glorious Glasgow Haskell Compilation System"
| #define PACKAGE_TARNAME "ghc-8.3"
| #define PACKAGE_VERSION "8.3"
| #define PACKAGE_STRING "The Glorious Glasgow Haskell Compilation System 8.3"
| #define PACKAGE_BUGREPORT "glasgow-haskell-bugs at haskell.org"
| #define PACKAGE_URL ""
| /* end confdefs.h.  */
| 
| int
| main ()
| {
| 
|   ;
|   return 0;
| }
configure:5039: error: in `/c/code/HEAD':
configure:5041: error: C compiler cannot create executables


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-devs/attachments/20170629/7d5a77c8/attachment-0001.html>


More information about the ghc-devs mailing list