haskell / haskell/cabal

Cabal tries to use GHC to configure LD

Open
#10,974 1 comment 0 reactions 1 assignee Claimed by @angerman View on GitHub
needs triage type: bug
Dominant language
Haskell
Stars
1.7k
Forks
750
Avg merge
4d 3h
Merged PRs (30d)
28

Description

**Describe the bug**
Cabal uses a peculiar c program to check if LD supports and should use -x. To do this, it shells out to GHC to compiler the C file. This however requires that GHC will not bail out, yet cabal does not pass --package-db flags to this GHC invocation, and as such we can run into situations where GHC bails out, especially during GHC bootstrap phases where not all boot packages are available.

**To Reproduce**
Steps to reproduce the behavior:
Kill GHC's --package-db (including it's shipped one).

then try to build _anything_.

```
$ cabal build ...
```

**Expected behavior**
cabal doesn't bail out trying to configure ld, but ghc fails during the configuration step.

=> Cabal should use GCC not GHC to test C features.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.