haskell-idea-plugin
haskell-idea-plugin copied to clipboard
Error:cabal: configure failed
I keep getting this error when I attempt to compile a module: "Error:cabal: configure failed." GHC sdk is set, and it works when I run "cabal run" from the command line. Any idea what could cause this?
Same here. Everything works when I run it with ghci or compile it with ghc.
Information:cabal: Start configure Information:cabal: cabal: ghc: missing -B<dir> option Information:Module "Formal" was fully rebuilt due to project configuration/dependencies changes Information:Compilation completed with 1 error and 0 warnings in 4 sec Information:1 error Information:0 warnings Error:cabal: configure failed.
Hi, here are some details about my system, on which this bug is reproducing every time: *OS: Manjaro 0.8.10 64-bit *ghc: 7.8.3 *ghc-mod: 5.0.1.1 *cabal: 1.20.0.3 using version 1.20.0.2 of the Cabal lib *buildwrapper: 1.18.1.3 using version 1.18.1.3 of the Cabal lib (might this cause problems?) *latest Idea Community (13.1.5) *idea.log when this happens: INFO - lij.compiler.impl.CompilerUtil - COMPILATION FINISHED (BUILD PROCESS); Errors: 1; warnings: 0 took 812 ms: 0 min 0s
Please let me know if you need anything else. Thanks
Arch linux for me.
The bug occurs if I use either cabal of arch-haskell repository.
I have found workaroud. You have to specify in SDK
GHC home path: /usr
Nope, doesn't work:
18:00:30 Compilation completed successfully in 8 sec 18:00:30 Error running haskell2: Module not specified
@strelec, this is another problem. Something wrong with your run configuration.
@Atsky This works for me. I can use the plugin now, thanks!
Can't seem to point GHC home path to /usr, keep on getting the message that this is not a valid ghc home path. Don't get that message when I use /usr/local (ghc is in /usr/local/bin/ghc), but then I get the compilation problem. Ubuntu 14.04, IntelliJ 13.1.5. I use a cabal sandbox.
@KasperJanssens, you should use /usr/local. What compilation problem you get?
Same one as mentioned in the topic, as soon as I start the compilatoin I get cabal: configure failed. I found this thread where you mentioned as a workaround to this problem to specify in SDK GHC home path: /usr. So I thought to try this, but that doesn't seem to do the trick for me. Did I misunderstand the work around? Or is this work around just for arch linux?
@KasperJanssens , This is workaround just for problem with Arch and Manjaro. Did you get another messages except "cabal: configure failed"?
No, that seems to be it, the paths are pointing to the correct directories, so it should find cabal. I am using a cabal sandbox though, something to do with that?
2014-11-14 11:53 GMT+01:00 Evgeny Kurbatsky [email protected]:
@KasperJanssens https://github.com/KasperJanssens , This is workaround just for problem with Arch and Manjaro. Did you get another messages except "cabal: configure failed"?
— Reply to this email directly or view it on GitHub https://github.com/Atsky/haskell-idea-plugin/issues/58#issuecomment-63042368 .
Hmm, I don't have it with my Intellij 14 at home, I do have it with the one at work. I'll try to compare and check what the differences are on Monday. Might be something else wrong...
2014-11-14 18:20 GMT+01:00 Kasper Janssens < [email protected]>:
No, that seems to be it, the paths are pointing to the correct directories, so it should find cabal. I am using a cabal sandbox though, something to do with that?
2014-11-14 11:53 GMT+01:00 Evgeny Kurbatsky [email protected]:
@KasperJanssens https://github.com/KasperJanssens , This is workaround just for problem with Arch and Manjaro. Did you get another messages except "cabal: configure failed"?
— Reply to this email directly or view it on GitHub https://github.com/Atsky/haskell-idea-plugin/issues/58#issuecomment-63042368 .
@Atsky Thanks! Specifying /usr as GHC SDK path helps a lot.
@Atsky Specifying /usr
as GHC SDK path worked for me as well. Thanks!
Rebuilt my docker container again, so I started fresh with cabal and intellij and so on, and nor more issues with cabal configure, it seems.
for mac users the GHC home path should be the first suggested, not any subdirectory: /Library/Frameworks/GHC.framework/Versions/7.8.3-x86_64/usr However my next target now is getting debugger work..
@KasperJanssens do you run your idea also in docker? can you share the Dockerfile?
It's the dockerfile from work, so it's full of stuff that's only accessible through work. I'll try to provide you with a stripped down version from it, hopefully in the weekend. It's basically a fresh ubuntu 14.04 with ghc, cabal and cabal-install compiled from source, intellij downloaded. The plugin still needs to be enabled manually then.
@Atsky Thanks, you saved my day with this workaround! But is there any investigation on this? Is it possible to help on this issue?
Just for the issue update, it still happens, my OS is a Debian 8 (sid), and the /usr
hack solved for me too.
It's still here for me. I use Exherbo (source based distribution), ghc home are /usr/x86_64-pc-linux-gnu/bin/ghc
and /usr/lib/ghc-7.10.2
.
The issue is strange. Why this problem happens?
@Kendos-Kenlen, problem is that there are two ghc executables in system: one is wrapper script that add command line parameter -B. If plugin run wrong ghc executable everything it fails.
@atsky Sorry, but the bug is still there. I am trying to run the plugin with Haskell on Windows and has been running into the same error message. When I try to change the SDK home to C:/Users/xxxx/
(as mentioned in your initial workaround), it fails to recognize the directory as a valid home directory for the GHC. I couldn't either find a /user/ in the sub-directories of Haskell installation.
Is this already solved? I also have a Windows installation and failing with the same message.
There is a solution for Windows?
On Ubuntu 16.04 setting the GHC home path to /usr/lib/ghc
fixed this issue for me. I changed it under the project's module settings (F4) > SDKs.
Also had this on Arch, with default GHC from yaourt/community and a fresh copy of IntelliJ set up with no custom settings related to GHC.
Still fixable by just changing GHC home to /usr, but this isn't very user friendly to have to do, and I had almost given up and just fallen back to using terminal before I found this issue.
That said, it seems like an excellent plugin otherwise - thanks! :)
Same problem in Windows 10. Here is the return message:
Information:cabal: Start configure Information:cabal: cabal: haskell_hello_world.cabal:1: Parse of field 'name' failed. Information:11/23/2016 10:49 PM - Compilation completed with 1 error and 0 warnings in 3s 368ms Error:cabal: configure failed.
I checked about the path of GHC and SDK, everything seem to be OK. With command line compile "ghc -o helloworld Main.hs", and compile succeed. Any solution?