Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unrecognized --compiler flag? #6007

Open
blankhart opened this issue Apr 20, 2019 · 2 comments
Open

Unrecognized --compiler flag? #6007

blankhart opened this issue Apr 20, 2019 · 2 comments

Comments

@blankhart
Copy link

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
@phadej
Copy link
Collaborator

phadej commented Apr 20, 2019 via email

@blankhart
Copy link
Author

blankhart commented Apr 20, 2019

It builds with that change, thanks. I.e., using

> cabal new-build client --ghcjs --with-compiler=ghcjs-8.4.0.1 --with-hc-pkg=ghcjs-pkg-8.4.0.1

And not:

> cabal new-build client --compiler=ghcjs --with-compiler=ghcjs-8.4.0.1 --with-hc-pkg=ghcjs-pkg-8.4.0.1

Glad to close this issue but would note that the --ghcjs flag seems to be undocumented.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants