So I am trying out a Haskell developing with the following IntelliJ plugin:
https://plugins.jetbrains.com/plugin/7453?pr=
GitHub page here:
https://github.com/rikvdkleij/intellij-haskell
The only issue I have with this plugin is as follows: When I try to run my code I keep getting this error message saying that the Cabal Configure Failed. NOTE: Before anyone asks, I have told IntelliJ that GHCs is located at usr/bin/ghc. And yes, I am running Ubuntu-MATE 16.04
Why am I getting this error, and is there a way to fix it?
EDIT: Cabal --version returns the following output:
cabal-install version 1.22.6.0
using version 1.22.5.0 of the Cabal library
Running Cabal Configure, from terminal, in my project directory results in the following output:
Resolving dependencies...
Configuring Test-0.0.1...
cabal: At least the following dependencies are missing:
doctest -any
And IntelliJ knows my cabal data path to be:
/home/avi/.cabal
Related
I've been trying to compile the Kadena chainweb-node project from source (via the docs found here) in a docker container running the arm64v8/ubuntu base image on an Apple M1 host machine and I keep getting errors. Thanks to the super helpful folks in the #haskell IRC channel, I've made it over a number of small hurdles, but the build still fails with:
Undefined symbol: ossl_sha3_512_functions
I can not find any resources on how to fix this but one of the #haskell community members informed me that these symbols are not provided by the openssl 3.0 API. That person created an issue here: https://github.com/larskuhtz/hs-hashes/issues/14
I've found that I can use the docker base image haskell:8 which comes preinstalled with ghc, cabal, and openssl 1.1.1 to cabal build chainweb-node successfully using a slightly different set of apt-get dependencies. However, when trying to cabal install the binaries so that I can run chainweb-node, I get:
Failed to build chainweb-2.14.1. The failure occurred during the configure
step.
Build log (
/root/.cabal/logs/ghc-8.10.7/chainweb-2.14.1-36aedf5adc1967eb17358e6434b6fd51bc7e64082f6c12e0df40ddafece6ff69.log
):
[1 of 1] Compiling Main ( /tmp/cabal-install.-838/dist-newstyle/tmp/src-838/chainweb-2.14.1/dist/setup/setup.hs, /tmp/cabal-install.-838/dist-newstyle/tmp/src-838/chainweb-2.14.1/dist/setup/Main.o )
Linking /tmp/cabal-install.-838/dist-newstyle/tmp/src-838/chainweb-2.14.1/dist/setup/setup ...
Configuring chainweb-2.14.1...
setup: Encountered missing or private dependencies:
criterion -any,
data-ordlist >=0.4.7,
resource-pool >=0.2,
retry >=0.7,
statistics >=0.15,
tasty-json >=0.1
cabal: Failed to build chainweb-2.14.1. See the build log above for details.
I've tried cabal install criterion and the other missing deps, one by one, but the cabal install gives me the same errors.
Can someone tell me what I'm doing wrong and help me get a working chainweb-node binary built from source and installed using docker?
I am new to GTK, but not to Haskell. I am currently running Arch linux.
I cloned gi-gtk-declarative, and did a checkout of the release-0.6.3 branch.
I tried compiling with both stack build and cabal v2-build all, and both fail on gi-glib with the following error:
> Unknown GIR element "docsection" when processing namespace "GLib", aborting.
How can I fix this? Is there a patched version of gi-glib?
This looks like an issue regarding version constraints:
gi-gtk-declarative depends on haskell-gi (>=0.21 && <0.24)
Looks like this issue was fixed on haskell-gi 0.24.4
As you can see, the author of gi-gtk-declarative needs to update his dependencies.
As a workaround, you can run stack build --allow-newer or cabal build --allow-newer which will bypass the version constraint.
(Haskell newbie here)
I'm trying to configure HaskForce plugin into IntelliJ IDEA, configured "ghc-mod" with "legacy-interactive" in "GHC Modi" Flags. The root problem seems to be related to cabal version, although when I try autocompleting on any Haskell symbol, I get this:
ghc-modi error
Unable to parse problems from ghc-modi: cabal-helper-wrapper.exe: ghc: readCreateProcess: does not exist (No such file or directory)
ghc-mod: readCreateProcess: C:\ACME\projects\htest\.cabal-sandbox\cabal-helper-0.5.3.0-553kah86RQN6BuDX6XLBiX\cabal-helper-wrapper.exe "C:\\ACME\\projects\\htest" "C:\\ACME\\projects\\htest\\dist" (exit 1): failed
When I run this last command (C:\ACME\projects\htest\.cabal-sandbox\cabal-helper-0.5.3.0-553kah86RQN6BuDX6XLBiX\cabal-helper-wrapper.exe "C:\\ACME\\projects\\htest" "C:\\ACME\\projects\\htest\\dist"), it tries to install cabal 1.18:
cabal-helper-wrapper.exe: Installing Cabal version 1.18.1.3 failed.
I already have cabal, of version 1.22 (installed via Haskell Platform v7.10.2-a, released recently in August).
Is there any way to work around this issue (i.e. still use ghc-mod / ghc-modi)?
Updated Haskforce plugin (0.3-beta24) seems to work correctly with following ghc-mod:
ghc-mod version 5.4.0.0 compiled by GHC 7.10.2
https://travis-ci.org/Fresheyeball/fbatch
Preprocessing library monad-parallel-0.5...
Control/Monad/Parallel.hs:67:8:
Could not find module `Control.Monad.Identity'
It is a member of the hidden package `mtl-2.2.1'.
Perhaps you need to add `mtl' to the build-depends in your .cabal file.
Use -v to see a list of the files searched for.
cabal: Error: some packages failed to install:
monad-parallel-0.5 failed during the building phase. The exception was:
ExitFailure 1
I am new to haskell, and just can't seem to get past this. I've tinkered with my .cabal file all I can, and the sub dependency fails on Travis every time.
Please help.
If a build fails while resolving a dependency, it's worth having a look a what version of that package gets installed. Normally, cabal should default to the most recent possible, which if well-maintained should install fine. Older versions do of course often mean trouble, if some dependency of theirs has now a newer, incompatible version installed.
In your case, cabal tried to install the somewhat ancient monad-parallel-0.5, which imports a module that doesn't exist in transformers (namely Control.Monad.Identity). The more recent version 0.7.1.2 does not try this and thus builds successfully. You can force such a recent install by giving a lower bound to the dependency in your .cabal file, in this case monad-parallel >= 0.7.
When trying to install clckwrks, I get the following error after a couple cabal install tries:
~/Progs/clckwrks/clckwrks$ cabal install
Resolving dependencies...
Configuring happstack-server-tls-7.1.0...
cabal: Missing dependency on a foreign library:
* Missing C library: cryptopp
....
Why can I not find this library in the repositories? Is it the Crypto++ from cryptopp.com? Oddly enough there's no mention of this on the getting started guide at http://clckwrks.com/page/view-page-slug/3/get-started .
Yes, you need to install crypto++. If you'll get the same error after installing this lib, look at this question.
BTW, actually, the problem is in happstack-server-tls, not in clckwrks, so they haven't mentioned it.
Update
On server running you can get error about ssl/localhost.key and ssl/localhost.cer. In this case - look for the answer here.