[GHC] #12171: cygwin - option to accept ISO C99... unsupported

#12171: cygwin - option to accept ISO C99... unsupported -------------------------------------+------------------------------------- Reporter: wozgonon | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Build System | Version: 8.0.1 Keywords: | Operating System: Windows Architecture: x86 | Type of failure: Building GHC | failed Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- Tried to build Haskell under cygwin under Windows 10 (x86_64) but /configure failed. I had a look on google and through the bug tracker but could not find anything helpful. Note that in the output from ./configure check two versions of gcc.exe 1) ... /ghc/inplace/mingw/bin/gcc.exe 2) C:/Program Files/Haskell Platform/8.0.1/lib/../mingw/bin/gcc.exe The check for the first succeeds but that for the second fails yet they both seem to be the same version of gcc.exe: (realgcc.exe (Rev3, Built by MSYS2 project) 5.2.0) {{{ checking for C:/unix/cygwin64/home/jb/haskell/ghc/inplace/mingw/bin/gcc.exe option to accept ISO C99... none needed checking for C:/Program Files/Haskell Platform/8.0.1/lib/../mingw/bin/gcc.exe option to accept ISO C99... unsupported }}} {{{ $ C:/unix/cygwin64/home/jb/haskell/ghc/inplace/mingw/bin/gcc.exe --version realgcc.exe (Rev3, Built by MSYS2 project) 5.2.0 Copyright (C) 2015 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. jb@fabulord ~/haskell/ghc $ "C:/Program Files/Haskell Platform/8.0.1/lib/../mingw/bin/gcc.exe" --version realgcc.exe (Rev3, Built by MSYS2 project) 5.2.0 Copyright (C) 2015 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12171 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#12171: cygwin - option to accept ISO C99... unsupported ----------------------------------------+----------------------------- Reporter: wozgonon | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Build System | Version: 8.0.1 Resolution: | Keywords: Operating System: Windows | Architecture: x86 Type of failure: Building GHC failed | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | ----------------------------------------+----------------------------- Changes (by wozgonon): * Attachment "configure.bug" added. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12171 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#12171: cygwin - option to accept ISO C99... unsupported ----------------------------------------+----------------------------- Reporter: wozgonon | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Build System | Version: 8.0.1 Resolution: | Keywords: Operating System: Windows | Architecture: x86 Type of failure: Building GHC failed | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | ----------------------------------------+----------------------------- Comment (by wozgonon): Inserting the following at ./configure:6143 suppresses the error and allows ./configure to complete {{{ unset ac_cv_prog_cc_c99 }}} 'make' then fails due to 2 spaces in a path name being replaced with newlines: {{{ make mk/config.mk:805: *** missing separator. Stop. }}} {{{ HSCOLOUR_CMD = C:/Program Files/Haskell Platform/8.0.1/lib/extralibs/bin/HsColour }}} In ~/haskell/ghc/mk/config.mk change the above to {{{ HSCOLOUR_CMD = C:/Program Files/Haskell Platform/8.0.1/lib/extralibs/bin/HsColour }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12171#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#12171: cygwin - option to accept ISO C99... unsupported ----------------------------------------+----------------------------- Reporter: wozgonon | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Build System | Version: 8.0.1 Resolution: | Keywords: Operating System: Windows | Architecture: x86 Type of failure: Building GHC failed | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | ----------------------------------------+----------------------------- Comment (by thomie): Cygwin isn't supported. Please use `msys2` as described here: [wiki:Building/Preparation/Windows], and reported any problems you might run into. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12171#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#12171: cygwin - option to accept ISO C99... unsupported ----------------------------------------+----------------------------- Reporter: wozgonon | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Build System | Version: 8.0.1 Resolution: | Keywords: Operating System: Windows | Architecture: x86 Type of failure: Building GHC failed | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | ----------------------------------------+----------------------------- Comment (by wozgonon): Replying to [comment:2 thomie]:
Cygwin isn't supported. Please use `msys2` as described in [wiki:Building/Preparation/Windows], and report any problems you might run into.
The same behavior occurs under 'msys2'. The problem are the <space>'s in the path: {{{ "C:/Program Files/Haskell Platform/8.0.1/lib/../mingw/bin/" }}} Renaming various environment variables just resulted in different errors: {{{ export CC_STAGE0=c:/progra~1/haskel~1/8.0.1/mingw/bin/gcc.exe export LD_STAGE0=c:/progra~1/haskel~1/8.0.1/mingw/bin/ld.exe export AR_STAGE0=c:/progra~1/haskel~1/8.0.1/mingw/bin/ar.exe }}} The solution was to uninstall haskell and reinstall from scratch in a path without <space>s. {{{ "C:/haskell/8.0.1/lib/../mingw/bin/gcc.exe" }}} 'make' and 'make install' now complete successfully. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12171#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#12171: option to accept ISO C99... unsupported ----------------------------------------+----------------------------- Reporter: wozgonon | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Build System | Version: 8.0.1 Resolution: | Keywords: Operating System: Windows | Architecture: x86 Type of failure: Building GHC failed | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | ----------------------------------------+----------------------------- -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12171#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#12171: option to accept ISO C99... unsupported ----------------------------------------+----------------------------- Reporter: wozgonon | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Build System | Version: 8.0.1 Resolution: | Keywords: Operating System: Windows | Architecture: x86 Type of failure: Building GHC failed | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | ----------------------------------------+----------------------------- Comment (by Phyx-): GHC should be using it's inplace tools for building. I don't understand how it picked up your installed GCC. We hardcode the path to the inplace GCC.. Can you attach your config.log file? -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12171#comment:5 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#12171: option to accept ISO C99... unsupported ----------------------------------------+----------------------------- Reporter: wozgonon | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Build System | Version: 8.0.1 Resolution: | Keywords: Operating System: Windows | Architecture: x86 Type of failure: Building GHC failed | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | ----------------------------------------+----------------------------- Changes (by wozgonon): * Attachment "config.log.top" added. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12171 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#12171: option to accept ISO C99... unsupported ----------------------------------------+----------------------------- Reporter: wozgonon | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Build System | Version: 8.0.1 Resolution: | Keywords: Operating System: Windows | Architecture: x86 Type of failure: Building GHC failed | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | ----------------------------------------+----------------------------- Comment (by wozgonon): I am afraid config.log is too big to add as an attachment so I added just the top part until the first mention of the installed ghc. {{{ ... configure:5777: checking for C:/unix/haskell/ghc/inplace/mingw/bin/gcc.exe option to accept ISO C99 configure:5926: C:/unix/haskell/ghc/inplace/mingw/bin/gcc.exe -c -g -O2 conftest.c >&5 configure:5926: $? = 0 configure:5939: result: none needed configure:5978: checking for C:/haskell/8.0.1/lib/../mingw/bin/gcc.exe option to accept ISO C99 configure:6127: C:/haskell/8.0.1/lib/../mingw/bin/gcc.exe -c conftest.c
&5 }}}
-- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12171#comment:6 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#12171: option to accept ISO C99... unsupported ----------------------------------------+----------------------------- Reporter: wozgonon | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Build System | Version: 8.0.1 Resolution: | Keywords: Operating System: Windows | Architecture: x86 Type of failure: Building GHC failed | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | ----------------------------------------+----------------------------- Comment (by Phyx-): Don't see anything odd there. Aside from it somehow able to find your installed GHC's inplace gcc. Does the platform by chance also add gcc to your path? What's the full configure error you're getting? -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12171#comment:7 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#12171: option to accept ISO C99... unsupported ----------------------------------------+----------------------------- Reporter: wozgonon | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Build System | Version: 8.0.1 Resolution: | Keywords: Operating System: Windows | Architecture: x86 Type of failure: Building GHC failed | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | ----------------------------------------+----------------------------- Comment (by wozgonon): Looking at my build log, it would pick up gcc from the installed GHC at "c/haskell/8.0.1/mingw/bin" {{{ $ echo $PATH /c/haskell/8.0.1/bin/:/c/haskell/8.0.1/lib/extralibs/bin/:/c/haskell/8.0.1/mingw/bin:/usr/local/bin:/usr/bin:/usr/bin:/opt/bin:/c/Windows/System32:/c/Windows:/c/Windows/System32/Wbem:/c/Windows/System32/WindowsPowerShell/v1.0 }}} The error from ./configure was: {{{ checking how to run the C preprocessor... C:/unix/haskell/ghc/inplace/mingw/bin/gcc.exe -E checking for C:/unix/haskell/ghc/inplace/mingw/bin/gcc.exe option to accept ISO C99... none needed checking for C:/Program Files/Haskell Platform/8.0.1/lib/../mingw/bin/gcc.exe option to accept ISO C99... unsupported configure: error: C99-compatible compiler needed }}} The error in config.log was: {{{ ./boot config.log ./configure: line 1671: C:/Program: No such file or directory }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12171#comment:8 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#12171: option to accept ISO C99... unsupported ----------------------------------------+----------------------------- Reporter: wozgonon | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Build System | Version: 8.0.1 Resolution: | Keywords: Operating System: Windows | Architecture: x86 Type of failure: Building GHC failed | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | ----------------------------------------+----------------------------- Comment (by Phyx-): Your initial statement seems to be correct, it is the spaces in the paths. I can fix the `HSCOLOUR_CMD` one but I'm not sure what to do about the gcc tests. I don't think most of us use the platform to build, though it obviously should work. (though not sure what the status of bootstrapping using 8.0.1 is). I don't know why the platform puts gcc on your path. Do you still have the issue if you just use GHC installed in msys2 per the instructions on the wiki? -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12171#comment:9 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#12171: option to accept ISO C99... unsupported ----------------------------------------+----------------------------- Reporter: wozgonon | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Build System | Version: 8.0.1 Resolution: | Keywords: Operating System: Windows | Architecture: x86 Type of failure: Building GHC failed | Test Case: Blocked By: | Blocking: Related Tickets: #11005 | Differential Rev(s): Wiki Page: | ----------------------------------------+----------------------------- Changes (by thomie): * related: => #11005 -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12171#comment:10 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#12171: option to accept ISO C99... unsupported ----------------------------------------+------------------------------ Reporter: wozgonon | Owner: Type: bug | Status: closed Priority: normal | Milestone: Component: Build System | Version: 8.0.1 Resolution: duplicate | Keywords: Operating System: Windows | Architecture: x86 Type of failure: Building GHC failed | Test Case: Blocked By: | Blocking: Related Tickets: #11005 | Differential Rev(s): Wiki Page: | ----------------------------------------+------------------------------ Changes (by Phyx-): * status: new => closed * resolution: => duplicate Comment: Marking as a duplicate. Suggested workaround for now is not to use the HP to build. Install a ghc from tarball to a directory with no spaces. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12171#comment:11 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC