Move gmp/config.mk.in to config.mk.in, fix #14972
ClosedPublic

Authored by ezyang on Mar 31 2018, 10:41 PM.

Details

Summary

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

  1. 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

  1. There is a folder named 'gmp', and so this folder is returned

as the 'library' for gmp

  1. 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

Diff Detail

Repository
rGHC Glasgow Haskell Compiler
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
ezyang created this revision.Mar 31 2018, 10:41 PM
ezyang updated this revision to Diff 15911.Mar 31 2018, 11:36 PM

Add missing Outputable instance

ezyang requested review of this revision.Apr 1 2018, 5:45 AM
angerman accepted this revision.Apr 1 2018, 5:52 AM

Related: D4553 tries to address (3).

This patch LGTM though.

This revision is now accepted and ready to land.Apr 1 2018, 5:52 AM
This revision was automatically updated to reflect the committed changes.