I would like to install the idris toolchain, and since I have cabal installed and setup I tried to install it with cabal install
But when I run cabal install idris, it result in the following error:
Resolving dependencies...
cabal: Could not resolve dependencies:
[__0] trying: idris-1.3.3 (user goal)
[__1] next goal: idris:setup.Cabal (dependency of idris)
[__1] rejecting: idris:setup.Cabal-3.2.1.0/installed-3.2.1.0 (conflict: idris
=> idris:setup.Cabal>=2.4 && <3.1)
[__1] skipping: idris:setup.Cabal-3.4.0.0, idris:setup.Cabal-3.2.1.0,
idris:setup.Cabal-3.2.0.0 (has the same characteristics that caused the
previous version to fail: excluded by constraint '>=2.4 && <3.1' from 'idris')
[__1] rejecting: idris:setup.Cabal-3.0.2.0, idris:setup.Cabal-3.0.1.0,
idris:setup.Cabal-3.0.0.0, idris:setup.Cabal-2.4.1.0,
idris:setup.Cabal-2.4.0.1, idris:setup.Cabal-2.4.0.0,
idris:setup.Cabal-2.2.0.1, idris:setup.Cabal-2.2.0.0,
idris:setup.Cabal-2.0.1.1, idris:setup.Cabal-2.0.1.0,
...
idris:setup.Cabal-1.2.2.0, idris:setup.Cabal-1.2.1, idris:setup.Cabal-1.1.6,
idris:setup.Cabal-1.24.1.0 (constraint from minimum version of Cabal used by
Setup.hs requires >=3.2)
[__1] fail (backjumping, conflict set: idris, idris:setup.Cabal)
After searching the rest of the dependency tree exhaustively, these were the
goals I've had most trouble fulfilling: idris:setup.Cabal, idris, base, ivor`
I know that the language is a bit out-dated compared to today's haskell packages.
Some people installed it in a sandbox with an oldest version of cabal, but I don't now what is the right way to do it now, with nix-style v2-install in new cabal-install.
Cabal version :
cabal-install version 3.4.0.0
compiled using version 3.4.0.0 of the Cabal library
How should I install idris ?
Is it better to get it pre-compiled from the AUR (I'm on archlinux)?
Related
I want to program in Haskell using Atom on a Mac. Therefore I installed the following packages in Atom:
haskell-ghc-mod
ide-haskell
ide-haskell-cabal
language-haskell
After that I installed the Haskell Platform 8.2.1 from here:
https://www.haskell.org/platform/#osx-none
This did not seem to work as I cannot compile and during every start of Atom there is this error message:
Haskell-ghc-mod: ghc-mod failed to launch. It is probably missing or misconfigured. ENOENT
Then I tried installing the necessary packages manually as described on https://atom-haskell.github.io/installation/installing-binary-dependencies/ which also failed (even unregistering failed):
Daniels-MacBook-Pro:ghc-mod-sandbox daniel$ cabal install ghc-mod stylish-haskell
Resolving dependencies...
cabal: Could not resolve dependencies:
trying: ghc-mod-5.8.0.0 (user goal)
next goal: base (dependency of ghc-mod-5.8.0.0)
rejecting: base-4.10.0.0/installed-4.1... (conflict: ghc-mod => base<4.10 &&
>=4.6.0.1)
rejecting: base-4.10.0.0, base-4.9.1.0, base-4.9.0.0, base-4.8.2.0,
base-4.8.1.0, base-4.8.0.0, base-4.7.0.2, base-4.7.0.1, base-4.7.0.0,
base-4.6.0.1, base-4.6.0.0, base-4.5.1.0, base-4.5.0.0, base-4.4.1.0,
base-4.4.0.0, base-4.3.1.0, base-4.3.0.0, base-4.2.0.2, base-4.2.0.1,
base-4.2.0.0, base-4.1.0.0, base-4.0.0.0, base-3.0.3.2, base-3.0.3.1
(constraint from non-upgradeable package requires installed instance)
After searching the rest of the dependency tree exhaustively, these were the
goals I've had most trouble fulfilling: base, ghc-mod, syb
Note: when using a sandbox, all packages are required to have consistent
dependencies. Try reinstalling/unregistering the offending packages or
recreating the sandbox.
Daniels-MacBook-Pro:ghc-mod-sandbox daniel$ cabal uninstall ghc-mod stylish-haskell
cabal: This version of 'cabal-install' does not support the 'uninstall'
operation. It will likely be implemented at some point in the future; in the
meantime you're advised to use either 'ghc-pkg unregister ghc-mod' or 'cabal
sandbox hc-pkg -- unregister ghc-mod'.
Daniels-MacBook-Pro:ghc-mod-sandbox daniel$ ghc-pkg unregister ghc-mod
ghc-pkg: cannot find package ghc-mod
Daniels-MacBook-Pro:ghc-mod-sandbox daniel$ cabal sandbox hc-pkg -- unregister ghc-mod
ghc-pkg: cannot find package ghc-mod
Daniels-MacBook-Pro:ghc-mod-sandbox daniel$ cabal install ghc-mod stylish-haskell
Resolving dependencies...
cabal: Could not resolve dependencies:
trying: ghc-mod-5.8.0.0 (user goal)
next goal: base (dependency of ghc-mod-5.8.0.0)
rejecting: base-4.10.0.0/installed-4.1... (conflict: ghc-mod => base<4.10 &&
>=4.6.0.1)
rejecting: base-4.10.0.0, base-4.9.1.0, base-4.9.0.0, base-4.8.2.0,
base-4.8.1.0, base-4.8.0.0, base-4.7.0.2, base-4.7.0.1, base-4.7.0.0,
base-4.6.0.1, base-4.6.0.0, base-4.5.1.0, base-4.5.0.0, base-4.4.1.0,
base-4.4.0.0, base-4.3.1.0, base-4.3.0.0, base-4.2.0.2, base-4.2.0.1,
base-4.2.0.0, base-4.1.0.0, base-4.0.0.0, base-3.0.3.2, base-3.0.3.1
(constraint from non-upgradeable package requires installed instance)
After searching the rest of the dependency tree exhaustively, these were the
goals I've had most trouble fulfilling: base, ghc-mod, syb
Note: when using a sandbox, all packages are required to have consistent
dependencies. Try reinstalling/unregistering the offending packages or
recreating the sandbox.
I already searched stackoverflow for answers but nothing really worked for me. Can anybody tell me what I am missing?
I can advise you on one part of the problem. The error message from cabal is very confusing, but what it means is:
ghc-mod does not work with a version 4.10.0.0 of the base
The base library ships with GHC and cannot be changed
GHC 8.2.1 ships with base 4.10.0.0
Therefore: you cannot build ghc-mod with the version of the Haskell Platform you downloaded
You can work around this by downloading an older Haskell Platform (8.0.2). In my opinion: it's premature for the promoted Haskell Platform version to be 8.2.1.
Another approach is using Stack, which will manage the installation of GHC installations for you. In this case, running stack install ghc-mod should just work. But since you'll still be using GHC 8.2.1 from the Haskell Platform, it won't do you much good, since ghc-mod is tied to your GHC version.
Personally: I never had success setting up ghc-mod. I've also never used either Atom or VS Code, but I've heard people sharing good experiences with VS Code + Haskero, so if you're looking for an IDE-like experience, that may be something worth considering. I've switched over to using emacs+intero mode, which may be something to consider.
Here are some links that may be helpful on getting started with tooling:
https://haskell-lang.org/get-started
https://haskell-lang.org/intero
I am using MSYS2 to build Valama [the next generation IDE for Vala].
what the GitHub repository says that some dependencies are required.
and they are provided for Ubuntu using this command
sudo apt-get install build-essential valac-0.24 libvala-0.24-dev cmake pkg-config libgtksourceview-3.0-dev libgee-0.8-dev libxml2-dev libgdl-3-dev libgladeui-dev libclutter-gtk-1.0-dev libwebkit2gtk-3.0-dev intltool gnome-icon-theme-symbolic librsvg2-bin
and I started to download these dependencies using
pacman -S [PACKAGE NAME]
but these packages names are not the same in pacman for mingw as they are in apt-get for ubuntu
so I found that pacman supports searching for packages using this command
pacman -sS [PACKAGE NAME substring]
so after every successful installation I tested cmake .. command as in the GitHub repository
until I get stuck with this dependency
gladeui-2.0
and this what the log of cmake look like :
-- Checking for module 'gee-0.8 >= 0.10.5'
-- Found gee-0.8 , version 0.18.1
-- Update files for GtkSourceView 3.14.3
-- Use enhanced gdl-3.0 vapi to support new features with gdl-3.0 >= 3.9.91.
-- Checking for module 'gladeui-2.0'
-- No package 'gladeui-2.0' found
CMake Error at /usr/share/cmake-3.6.2/Modules/FindPkgConfig.cmake:424 (message):
A required package was not found
Call Stack (most recent call first):
/usr/share/cmake-3.6.2/Modules/FindPkgConfig.cmake:597 (_pkg_check_modules_internal)
CMakeLists.txt:201 (pkg_check_modules)
-- Configuring incomplete, errors occurred!
See also "/e/valama/build/CMakeFiles/CMakeOutput.log".
See also "/e/valama/build/CMakeFiles/CMakeError.log".
as you can see from the log that [gladeui-2.0] is not found on the MSYS-mingw subsystem, and I failed to find the supported library for it.
what I am asking is what is the command to install the remaining dependencies of valama, or how to build them and install them, including gladeui-2.0.
On the MSYS2 home page there are two GitHub repositories listed for issues with packages. The first is issues for msys2 packages on GitHub and the second is issues for mingw-w64 packages on GitHub. Both of these repositories list packages as sub-directories.
The most interesting are the mingw-w64 packages, which includes mingw-w64-glade and mingw-w64-glade3. So you could try installing either of those. Glade3 is the newer version, but Valarama may be dependent on the older Glade 2.
I used the latest Haskell Platform 7.10.2-a (https://www.haskell.org/platform/mac.html) on Mac OS X 10.11 for El-capitan.
When I tried to install yesod with cabal install yesod, I have multiple error messages such as:
Building email-validate-2.1.3...
Building http-api-data-0.2.1...
Building fast-logger-2.4.1...
Building http-date-0.0.6.1...
Failed to install crypto-random-0.0.9
Build log ( /Users/smcho/.cabal/logs/crypto-random-0.0.9.log ):
Configuring crypto-random-0.0.9...
Building crypto-random-0.0.9...
Preprocessing library crypto-random-0.0.9...
<command line>: cannot satisfy -package-id vector-0.11.0.0-730f99979d41c11c3a1ef069844b5f57
(use -v for more information)
Failed to install email-validate-2.1.3
Build log ( /Users/smcho/.cabal/logs/email-validate-2.1.3.log ):
Configuring email-validate-2.1.3...
The error pattern is pretty much the same: cannot satisfy -package-id.
For example, cabal install aeson gives cannot satisfy -package-id attoparse... error.
Resolving dependencies...
Configuring aeson-0.10.0.0...
Building aeson-0.10.0.0...
Failed to install aeson-0.10.0.0
Build log ( /Users/smcho/.cabal/logs/aeson-0.10.0.0.log ):
Configuring aeson-0.10.0.0...
Building aeson-0.10.0.0...
Preprocessing library aeson-0.10.0.0...
<command line>: cannot satisfy -package-id attoparsec-0.13.0.1-99b4df28644e63383f308c810764a8bb
(use -v for more information)
cabal: Error: some packages failed to install:
aeson-0.10.0.0 failed during the building phase. The exception was:
ExitFailure 1
However, attoparsec library seems to be installed without problem.
smcho#macho ~> cabal install attoparsec
Resolving dependencies...
All the requested packages are already installed:
attoparsec-0.13.0.1
Use --reinstall if you want to reinstall anyway.
What might be wrong?
As suggested here, the cannot satisfy -package-id error you're seeing might be due to an out of date cache.
If running ghc-pkg check warns you that your cache is out of date, then running ghc-pkg recache might resolve your issues.
I've been running into the cannot satisfy -package-id problem all morning (not with yesod, but with various other packages). ghc-pkg recache resolved my issues. Hope this helps.
This might be controversial, but imho the haskell platform and cabal (when used directly) are both essentially deprecated now with the advent of stack.
Stack will:
Automatically install haskell for you (stack setup)
Automatically sandbox (and intelligently share sandboxes between projects)
Completely avoid cabal hell (in my experience)
I could install yesod from brew.
Uninstall haskell-plaftorm
/Library/Haskell/bin/uninstall-hs thru 7.10.2
Install ghc
brew install ghc
brew link ghc
Install stackage
brew install haskell-stack
Install Yesod
stack install yesod
stack install yesod-bin
Use Yesod
Getting "Could not find module `Yesod'" when I try to run first example from Yesod book
stack runghc hello-world.hs
Use Yesod for development
I'm not sure, but I had to run stack exec yesod build first.
stack exec yesod devel.
Yesod deployment with keter
Remove the first line in config/keter.yaml
stack exec yesod keter, and you will get one binary in dist/bin that contains most of the necessary files to run.
Execute the binary as a standalone server.
So I'm trying to install Lamdu, and because it relies on GLFW (brew install glfw3)I've had to install that, and the GLFW bindings for Haskell. I cloned the Lamdu repository, cd lamdu, cabal configure, and the only dependencies that it says I don't have are GLFW-b. cabal install glfw-b gets the same error, every time (I've tried reinstalling the Haskell Platform with a binary and rebuilding from source, nothing changed)
What I think are the most important lines of the error:
3.0.3.2.o: unknown symbol '__objc_empty_vtable'
ghc: unable to load package 'bindings-GLFW-3.0.3.2'
You can find the full error here
I have installed the latest Haskell Platform for MAC OSX and I get the error "Setup: failed to parse output of 'ghc-pkg dump'" when I do anything with Cabal.
So I looked at my versions:
ralphtq$ ghc-pkg list Cabal
/Library/Frameworks/GHC.framework/Versions/612/usr/lib/ghc-6.12.1/package.conf.d
Cabal-1.8.0.2
ralphtq-mac-mini:cabal-install-0.6.4 ralphtq$ cabal --version
cabal-install version 0.6.2
using version 1.6.0.3 of the Cabal library
This is telling me that even though I have Cabal 1.8 the cabal-instal is at version 0.6.2. I have tried to correct that using darcs to get the latest version of cabal-install, but I cannot get passed the error:
ralphtq$ sh bootstrap.sh
Checking installed packages for ghc-6.12.1...
parsec is already installed and the version is ok.
network is already installed and the version is ok.
Cabal is already installed and the version is ok.
mtl is already installed and the version is ok.
HTTP is already installed and the version is ok.
zlib is already installed and the version is ok.
cleaning...
Linking Setup ...
Configuring cabal-install-0.9.1...
Setup: At least the following dependencies are missing:
Cabal ==1.9.*
It is expecting Cabal to be >= 1.9.
I tried to install a previous version of Cabal but got the following error:
...
...
[50 of 51] Compiling Distribution.Simple ( Distribution/Simple.hs, Distribution/Simple.o )
[51 of 51] Compiling Main ( Setup.hs, Setup.o )
Linking Setup ...
Configuring Cabal-1.6.0.2...
Setup: failed to parse output of 'ghc-pkg dump'
I am back to the same problem.
I have also tried a complete re-install of the platform.
What are my next options? Help appreciated, thx.
Either you have installed an old version of the Haskell Platform, or you have a mixed up environment where you have installed over the top of an existing, older install, and so now have a mixture of ghc-pkg versions from 6.10.x and 6.12.x
Try removing those ghc-pkg and cabal binaries, and then installing the Platform. That way you won't have those old executables lying around.