[GHC] #10705: make configure warn when ghc-tarballs is missing on windows and provide guidance to download it.

#10705: make configure warn when ghc-tarballs is missing on windows and provide guidance to download it. -------------------------------------+------------------------------------- Reporter: Phyx- | Owner: Phyx- Type: task | Status: new Priority: normal | Milestone: 7.12.1 Component: Build | Version: 7.11 System | Keywords: | Operating System: Windows Architecture: | Type of failure: None/Unknown Unknown/Multiple | Test Case: | Blocked By: Blocking: | Related Tickets: #9218 Differential Revisions: | -------------------------------------+------------------------------------- Currently checking out the source on windows requires two git checkouts. One for the GHC sources and one for the GHC-tarballs. This patch will make configure issue an error if compiling under windows and the GHC-tarballs folder is missing. On failure the user is told which command they need to run to get the tarballs or if they want configure to handle it for them configure provide the `--enable-tarballs-autodownload` flag. This is one part of the bigger #9218 patch which is being flit up to get it through. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10705 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10705: make configure warn when ghc-tarballs is missing on windows and provide guidance to download it. -------------------------------------+------------------------------------- Reporter: Phyx- | Owner: Phyx- Type: task | Status: patch Priority: normal | Milestone: 7.12.1 Component: Build System | Version: 7.11 Resolution: | Keywords: Operating System: Windows | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: #9218 | Differential Revisions: Phab:D1108 -------------------------------------+------------------------------------- Changes (by Phyx-): * status: new => patch * differential: => Phab:D1108 -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10705#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10705: make configure warn when ghc-tarballs is missing on windows and provide
guidance to download it.
-------------------------------------+-------------------------------------
Reporter: Phyx- | Owner: Phyx-
Type: task | Status: patch
Priority: normal | Milestone: 7.12.1
Component: Build System | Version: 7.11
Resolution: | Keywords:
Operating System: Windows | Architecture:
| Unknown/Multiple
Type of failure: None/Unknown | Test Case:
Blocked By: | Blocking:
Related Tickets: #9218 | Differential Revisions: Phab:D1108
-------------------------------------+-------------------------------------
Comment (by Ben Gamari

#10705: make configure warn when ghc-tarballs is missing on windows and provide guidance to download it. -------------------------------------+------------------------------------- Reporter: Phyx- | Owner: Phyx- Type: task | Status: closed Priority: normal | Milestone: 7.12.1 Component: Build System | Version: 7.11 Resolution: fixed | Keywords: Operating System: Windows | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: #9218 | Differential Revisions: Phab:D1108 -------------------------------------+------------------------------------- Changes (by bgamari): * status: patch => closed * resolution: => fixed -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10705#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10705: make configure warn when ghc-tarballs is missing on windows and provide guidance to download it. -------------------------------------+------------------------------------- Reporter: Phyx- | Owner: Type: task | Status: new Priority: normal | Milestone: 7.12.1 Component: Build System | Version: 7.11 Resolution: | Keywords: Operating System: FreeBSD | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: #9218 | Differential Revisions: Phab:D1108 -------------------------------------+------------------------------------- Changes (by thomie): * cc: pgj (added) * os: Windows => FreeBSD * status: closed => new * resolution: fixed => * owner: Phyx- => Comment: This patch broke the FreeBSD build: http://haskell.inf.elte.hu/builders /freebsd-amd64-head/705/8.html -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10705#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10705: make configure warn when ghc-tarballs is missing on windows and provide guidance to download it. -------------------------------------+------------------------------------- Reporter: Phyx- | Owner: Type: task | Status: new Priority: normal | Milestone: 7.12.1 Component: Build System | Version: 7.11 Resolution: | Keywords: Operating System: FreeBSD | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: #9218 | Differential Revisions: Phab:D1108 -------------------------------------+------------------------------------- Comment (by Phyx-): It seems that the configure script doesn't force any particular environment. On windows it was always using bash so didn't notice. Whatever shell the freebsd one is using doesn't seem to like functions. I will inline the function calls to fix this. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10705#comment:5 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10705: make configure warn when ghc-tarballs is missing on windows and provide guidance to download it. -------------------------------------+------------------------------------- Reporter: Phyx- | Owner: Type: task | Status: new Priority: normal | Milestone: 7.12.1 Component: Build System | Version: 7.11 Resolution: | Keywords: Operating System: FreeBSD | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: #9218 | Differential Revisions: Phab:D1108 -------------------------------------+------------------------------------- Comment (by pgj): Replying to [comment:5 Phyx-]:
Whatever shell the freebsd one is using doesn't seem to like functions.
By default, FreeBSD has the regular Bourne Shell (`/bin/sh`) from the base system, that shall support functions, I have used them a couple of times before. However, the `function` keyword was not needed for that. Removing them from `configure.ac` fixes the problem for me. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10705#comment:6 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10705: make configure warn when ghc-tarballs is missing on windows and provide guidance to download it. -------------------------------------+------------------------------------- Reporter: Phyx- | Owner: Type: task | Status: new Priority: normal | Milestone: 7.12.1 Component: Build System | Version: 7.11 Resolution: | Keywords: Operating System: FreeBSD | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: #9218 | Differential Revisions: Phab:D1108 -------------------------------------+------------------------------------- Comment (by Phyx-): Replying to [comment:6 pgj]:
However, the `function` keyword was not needed for that. Removing them from `configure.ac` fixes the problem for me.
When using the 'function' keyword, Bash function declarations are not compatible with Bourne/Korn/POSIX scripts (the Korn shell has the same
Yes it seems that function is a non-POSIX extension in bash: problem when using 'function'), but Bash accepts the same function declaration syntax as the Bourne and Korn shells, and is POSIX-conformant Was not aware of that. Sorry bout that. Removing the keyword is the right fix. I'll be able to send a new diff in about 6 hours. Unless someone else wants to fix it before then. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10705#comment:7 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10705: make configure warn when ghc-tarballs is missing on windows and provide
guidance to download it.
-------------------------------------+-------------------------------------
Reporter: Phyx- | Owner:
Type: task | Status: new
Priority: normal | Milestone: 7.12.1
Component: Build System | Version: 7.11
Resolution: | Keywords:
Operating System: FreeBSD | Architecture:
| Unknown/Multiple
Type of failure: None/Unknown | Test Case:
Blocked By: | Blocking:
Related Tickets: #9218 | Differential Revisions: Phab:D1108
-------------------------------------+-------------------------------------
Comment (by Thomas Miedema

#10705: make configure warn when ghc-tarballs is missing on windows and provide guidance to download it. -------------------------------------+------------------------------------- Reporter: Phyx- | Owner: Type: task | Status: closed Priority: normal | Milestone: 7.12.1 Component: Build System | Version: 7.11 Resolution: fixed | Keywords: Operating System: Windows | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: #9218 | Differential Revisions: Phab:D1108 -------------------------------------+------------------------------------- Changes (by thomie): * status: new => closed * os: FreeBSD => Windows * resolution: => fixed Comment: Ok, I fixed it. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10705#comment:9 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10705: make configure warn when ghc-tarballs is missing on windows and provide guidance to download it. -------------------------------------+------------------------------------- Reporter: Phyx- | Owner: Type: task | Status: closed Priority: normal | Milestone: 7.12.1 Component: Build System | Version: 7.11 Resolution: fixed | Keywords: Operating System: Windows | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: #9218 | Differential Revisions: Phab:D1108 -------------------------------------+------------------------------------- Comment (by Phyx-): @thomie Thanks! I have also updated the relevant Wiki pages. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10705#comment:10 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10705: make configure warn when ghc-tarballs is missing on windows and provide guidance to download it. -------------------------------------+------------------------------------- Reporter: Phyx- | Owner: Type: task | Status: closed Priority: normal | Milestone: 7.12.1 Component: Build System | Version: 7.11 Resolution: fixed | Keywords: Operating System: Windows | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: #9218 | Differential Revisions: Phab:D1108 -------------------------------------+------------------------------------- Comment (by thomie): irc user eacameron makes a good point: the build instructions on the wiki don't work for ghc-7.10 now, or earlier releases. Not sure what to do about this. Coincidentally, the build instructions in the README file are also out of date. This is tracked in #9861. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10705#comment:11 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10705: make configure warn when ghc-tarballs is missing on windows and provide guidance to download it. -------------------------------------+------------------------------------- Reporter: Phyx- | Owner: Type: task | Status: closed Priority: normal | Milestone: 7.12.1 Component: Build System | Version: 7.11 Resolution: fixed | Keywords: Operating System: Windows | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: #9218 | Differential Revisions: Phab:D1108 -------------------------------------+------------------------------------- Comment (by Phyx-): Well, for 7.8.x there is https://ghc.haskell.org/trac/ghc/wiki/Building/GettingTheSources/Legacy Would an idea be to extend this page to include 7.10 and link to it from the build instructions? -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10705#comment:12 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10705: make configure warn when ghc-tarballs is missing on windows and provide guidance to download it. -------------------------------------+------------------------------------- Reporter: Phyx- | Owner: Type: task | Status: closed Priority: normal | Milestone: 7.12.1 Component: Build System | Version: 7.11 Resolution: fixed | Keywords: Operating System: Windows | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: #9218 | Differential Revisions: Phab:D1108 -------------------------------------+------------------------------------- Comment (by thomie): eacameron said they were going to do so -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10705#comment:13 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10705: make configure warn when ghc-tarballs is missing on windows and provide guidance to download it. -------------------------------------+------------------------------------- Reporter: Phyx- | Owner: Type: task | Status: closed Priority: normal | Milestone: 7.12.1 Component: Build System | Version: 7.11 Resolution: fixed | Keywords: Operating System: Windows | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: #9218 | Differential Revisions: Phab:D1108 -------------------------------------+------------------------------------- Comment (by Phyx-): I was wondering if the default flag for ./validate should be changed as well. Currently you can't do: {{{ git clone --recursive git://git.haskell.org/ghc.git && cd ghc ./validate }}} The workflow is a bit weird in which you need: {{{ git clone --recursive git://git.haskell.org/ghc.git && cd ghc ./boot ./configure --enable-tarballs-autodownload ./validate }}} Since `--enable-tarballs-autodownload` is ignored on anything not Windows and on Windows would only download the tarballs if missing, maybe it should be the default in `validate` ? -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10705#comment:14 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC