#14972: MacOS panic on TH -------------------------------------+------------------------------------- Reporter: harpocrates | Owner: (none) Type: bug | Status: patch Priority: normal | Milestone: Component: Compiler | Version: 8.4.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: Compile-time | Unknown/Multiple crash or panic | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D4553 Wiki Page: | -------------------------------------+------------------------------------- Comment (by Ben Gamari <ben@…>): In [changeset:"2534164aefd346c7c51b70e8e8c49aa881dd9f85/ghc" 2534164/ghc]: {{{ #!CommitTicketReference repository="ghc" revision="2534164aefd346c7c51b70e8e8c49aa881dd9f85" Move gmp/config.mk.in to config.mk.in, fix #14972 Here's how the rube goldberg machine triggered the old bug: 1. If you have a file gmp/config.mk.in, then Cabal will create a generated file in $DIST/build/gmp/config.mk 2. When you attempt to load inplace integer-gmp via GHCi, it will ask gcc (aka clang on OS X) for the file name of 'gmp', with base directory set to $DIST/build 3. There is a folder named 'gmp', and so this folder is returned as the 'library' for gmp 4. GHCi loadArchive chokes to death trying to open a library that is actually a folder This patch solves the problem by breaking the chain at (1): if we don't put config.mk in a folder named gmp, NO PROBLEM. Signed-off-by: Edward Z. Yang <ezyang@fb.com> Test Plan: validate Reviewers: angerman, hvr, bgamari Reviewed By: angerman Subscribers: erikd, thomie, carter GHC Trac Issues: #14972 Differential Revision: https://phabricator.haskell.org/D4552 }}} -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/14972#comment:12> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler