haskell / haskell/cabal

Unrecognized --compiler flag?

Open
#6,007 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Haskell
Stars
1.7k
Forks
750
Avg merge
4d 3h
Merged PRs (30d)
28

Description

Cabal 2.4.1.0 does not seem to recognize the `--compiler` flag on the command line:

```
cabal: unrecognized 'new-build' option `--compiler=ghcjs'
```

The documentation (https://cabal.readthedocs.io/en/latest/nix-local-build.html) suggests that this option should be recognized.

For background I am trying to build a GHCJS project that succeeds when the following is in the `cabal.project` file, but fails when the toolchain is omitted:

```
compiler: ghcjs
with-compiler: /opt/ghcjs/8.4/bin/ghcjs
with-hc-pkg: /opt/ghcjs/8.4/bin/ghcjs-pkg
```

Without specifying the compiler toolchain, Cabal produces the following error (using installations from hvr's very useful Ubuntu PPA):

```
> cabal new-build client --with-compiler=ghcjs-8.4.0.1 --with-hc-pkg=ghcjs-pkg-8.4.0.1
cabal: Version mismatch between ghc and ghc-pkg: /opt/ghcjs/bin/ghcjs-8.4.0.1 is version 8.4.0.1 /opt/ghcjs/bin/ghcjs-pkg-8.4.0.1 is version 8.4.2.20180420
```

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.