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

Unable to get hsroots to build with stack #3

Open
georgewsinger opened this issue Jan 14, 2019 · 2 comments
Open

Unable to get hsroots to build with stack #3

georgewsinger opened this issue Jan 14, 2019 · 2 comments

Comments

@georgewsinger
Copy link

georgewsinger commented Jan 14, 2019

I'm trying to get hsroots to build with stack. To get around

$ stack init
# ...
Selected resolver: lts-13.3
Resolver 'lts-13.3' does not have all the packages to match your requirements.
    data-flags not found
        - hayland requires <0.1
        - xkbcommon requires -any

This may be resolved by:
    - Using '--solver' to ask cabal-install to generate extra-deps, atop the chosen snapshot.
    - Using '--omit-packages' to exclude mismatching package(s).
    - Using '--resolver' to specify a matching snapshot/resolver

I tried

  stack install cabal-install
  stack init --solver --force

but this just yields

# …
CallStack (from HasCallStack):
  error, called at src/Stack/Solver.hs:164:16 in stack-1.10.0-EBfIplDZnWH5c6Nkfwa7eL:Stack.Solver
@georgewsinger
Copy link
Author

After adjusting the stack.yaml file (in particular adding data-flags-0.0.3.4 to extra-deps and using lts-12.2.6) I'm now getting the following when running stack build:

    /home/george/hsroots/haskell-xkbcommon/Text/XkbCommon/KeycodeList.hs:1:1: error:
        Exception when trying to run compile-time code:
          /home/george/hsroots/haskell-xkbcommon/Language/Preprocessor/Cpphs/MacroPass.hs:(96,9)-(97,68): Irrefutable pattern failed for pattern Cmd (Just hd) : _
    
        Code: runIO genKeycodes >>= return
      |
    1 | {-# LANGUAGE TemplateHaskell #-}
      | ^
    

@Ongy
Copy link
Collaborator

Ongy commented Feb 9, 2019

sorry for not responding for nearly a month, I had been kinda away from most projects for a while.

I don't care much about stack. I said that somewhere before (either here or the main waymonad project), I'll keep a stack.yaml around if someone sets it up and cares for it, but I don't use it and cannot take care of it myself.

Ahh, you are running into a bug in ccphs and gcc7 iirc. The new standard headers use a feature cpphs parser doesn't support.
I have a more or less useable patch and contacted haskell-caffee about taking over cpphs before, but then disappeared for a while, so it never made it upstream.
See malcolmwallace/cpphs#16

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

No branches or pull requests

2 participants