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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

cabal fails to build preprocessors when used with ghcjs #5632

Open
vmchale opened this issue Oct 21, 2018 · 3 comments
Open

cabal fails to build preprocessors when used with ghcjs #5632

vmchale opened this issue Oct 21, 2018 · 3 comments

Comments

@vmchale
Copy link
Contributor

vmchale commented Oct 21, 2018

When building my language-xats library with GHCJS the following occurs:

vanessa@thinkpad ~/programming/haskell/current/language-xats 馃尭 cabal new-build --ghcjs
Warning: don't know how to find change monitoring files for the installed
package databases for ghcjs
Resolving dependencies...
Build profile: -w ghcjs-8.4.0.1 -O1
In order, the following will be built (use -v for more details):
 - alex-3.2.4 (exe:alex) (requires build)
 - happy-1.19.9 (exe:happy) (requires build)
 - prettyprinter-1.2.1 (lib) (requires build)
 - language-xats-0.1.0.0 (lib) (first run)
Starting     prettyprinter-1.2.1 (lib)
Starting     alex-3.2.4 (exe:alex)
Starting     happy-1.19.9 (all, legacy fallback)
Building     prettyprinter-1.2.1 (lib)
Building     alex-3.2.4 (exe:alex)
Installing   prettyprinter-1.2.1 (lib)
Completed    prettyprinter-1.2.1 (lib)
Installing   alex-3.2.4 (exe:alex)
Completed    alex-3.2.4 (exe:alex)
Building     happy-1.19.9 (all, legacy fallback)
Installing   happy-1.19.9 (all, legacy fallback)
Completed    happy-1.19.9 (all, legacy fallback)
Configuring library for language-xats-0.1.0.0..
cabal: The program 'alex' is required but it could not be found.

The build succeeds when I run cabal new-install alex ; cabal new-install happy.

I think that cabal should attempt to install happy and alex using GHC. I can't really see any reason that we'd want to use a node version of happy or a cross-compiled version of happy as they are preprocessors.

I believe this has been mentioned before: #4939

@hvr
Copy link
Member

hvr commented Oct 21, 2018

Yes, the fundamental issue here is that currently everything starting with cabal's solver only support a single compiler at a time. You can only pass it a single --with-compiler (and with a single compiler-type, e.g. --ghcjs/--ghc).

@typedrat
Copy link
Collaborator

typedrat commented Oct 21, 2018

This is something that I would like (for what I can assume are similar reasons) and I鈥檒l admit that the Cabal contribution bug is itching.

I might start looking at a way to do this when I鈥檓 done with midterms this week.

@hvr
Copy link
Member

hvr commented Jan 13, 2019

@vmchale btw, this should work better now for alex (which doesn't have a custom Setup.hs) since 03becbd

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

No branches or pull requests

3 participants