Closed mouse07410 closed 3 years ago
i getting this as well, attempting to install from stackage lts-11.3
error is slightly different:
c2hs> Configuring c2hs-0.28.3...
c2hs> build
c2hs> Preprocessing executable 'c2hs' for c2hs-0.28.3..
c2hs> Building executable 'c2hs' for c2hs-0.28.3..
c2hs>
c2hs> /tmp/stack-4cadb4e34aa0e146/c2hs-0.28.3/src/C2HS/C/Names.hs:1:1: error:
c2hs> File name does not match module name:
c2hs> Saw: ‘Main’
c2hs> Expected: ‘C2HS.C.Names’
c2hs> |
c2hs> 1 | -- C->Haskell Compiler: C name analysis
c2hs> | ^
c2hs> ```
this works perfectly fine with the version from the repo head; i assume it has already been fixed somewhere
in the meantime i got around this by adding
extra-deps:
- git: https://github.com/haskell/c2hs.git
commit: 20d3c8dedde83af91c4ac06486bf346316e07285
to my stack.yaml
i assume there's something similar with cabal
I'm having the same issue but not directly since I'm using gi-cairo-render in a project, which fails to compile since it can't build this dependency.
Any workaround? I'm using cabal, not stack, btw.
you should be able to do something similar with a cabal.project file
i think
source-repository-package
type: git
location: https://github.com/haskell/c2hs.git
tag: 20d3c8dedde83af91c4ac06486bf346316e07285
would work?
you should be able to do something similar with a cabal.project file
i think
source-repository-package type: git location: https://github.com/haskell/c2hs.git tag: 20d3c8dedde83af91c4ac06486bf346316e07285
would work?
Indeed, this solution works.
For future reference, I'm running GHC 8.8.4, cabal-install 3.2.0, Fedora 33
I think it builds with 8.10.4 now (when pulled from Hackage). Thanks!
Same complaint regardless of whether I try with GHC-8.10.2 or 8.8.4: