#11185: runghc can't find ghc-stage2 on a Windows build -------------------------------------+------------------------------------- Reporter: RyanGlScott | Owner: Type: bug | Status: patch Priority: normal | Milestone: Component: Build System | Version: 7.11 Resolution: | Keywords: Operating System: Windows | Architecture: Type of failure: Incorrect result | Unknown/Multiple at runtime | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D1621 Wiki Page: | -------------------------------------+------------------------------------- Comment (by Ben Gamari <ben@…>): In [changeset:"05a5ebed916dc00bc5761224047440fefe10485e/ghc" 05a5ebed/ghc]: {{{ #!CommitTicketReference repository="ghc" revision="05a5ebed916dc00bc5761224047440fefe10485e" Fix runghc when $1_$2_SHELL_WRAPPER = NO When that variable isn't on (which is always the case on Windows), `runghc` naively attempts to invoke `ghc` by finding an executable simply named `ghc`. This won't work if `ghc` doesn't exist (e.g., if we're building GHC and using `ghc-stage2` instead). A simple fix is to test for the existence of `ghc` beforehand, and if that fails, fall back on `ghc-stage2`. Fixes #11185. Test Plan: ./validate Reviewers: austin, hvr, thomie, bgamari Reviewed By: thomie, bgamari Differential Revision: https://phabricator.haskell.org/D1621 GHC Trac Issues: #11185 }}} -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/11185#comment:2> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler