Questions tagged [cabal-install]
cabal-install is a package manager and dependency resolver for building and installing Haskell libraries.
338
questions
0
votes
0
answers
84
views
Cannot build project with z3-haskell on windows 10
I want to build the haskell bindings for z3 in a Cabal project, the following is the minimum (faulty) example:
Using a project initialized by cabal init:
test/
- Main.hs
- Setup.hs
- CHANGELOG.md
- ...
2
votes
1
answer
82
views
Problem installing haskell profiling libraries with cabal
I have a cabal project and I'm trying to compile it with profiling turned on. I'm following the instructions here but cabal build fails with the following error:
app/WordMap.hs:5:1: error:
Could ...
1
vote
2
answers
188
views
Leave free access to internal intermediary functions in Haskell library?
I'm writing a numerical optimisation library in Haskell, with the aim of making functions like a gradient descent algorithm available for users of the library. In writing these relatively complex ...
0
votes
1
answer
144
views
Entry point for test suite with multiple files in Cabal project?
New to Cabal, so sorry if this is obvious, but I obviously want to have more than one file in my Cabal project's test suite, yet the .cabal file is insisting on being given an entrypoint. What do I ...
1
vote
0
answers
266
views
cabal fails to find a library built and installed with cabal install --lib (linux)
I am building a Haskell library with Cabal,
and want to use this library in some other Cabal projects.
The problem is that after installing the library (with Cabal),
my library is not available to the ...
9
votes
1
answer
218
views
How to actually use already-installed versions of a package, or find out why it's not possible?
Cabal-newstyle has a habit to occasionally install, like, all dependencies from scratch for no apparent reason. For a project using lens and other common packages, this can take upwards of ½ hour, ...
1
vote
0
answers
198
views
Cabal install error with conflicting constraints
So right now I'm trying to run cabal install --lib bytestring, seems simple enough. But every time I run this I get this error message:
Resolving dependencies...
cabal: Could not resolve dependencies:
...
1
vote
1
answer
117
views
Error with cabal install while building lib
I'm trying to install FunGEn with cabal install --allow-newer=all FunGEn (I added --allow-newer=all bcs it was having trouble with dependencies). After a few tries of running this I keep getting the ...
2
votes
1
answer
174
views
Why can't I cabal install template-haskell-2.17.0.0?
I am trying to install the specific version template-haskell-2.17.0.0. I run this command, but get an error during dependency resolution:
❯ cabal install template-haskell-2.17.0.0 --lib
Resolving ...
2
votes
1
answer
155
views
How do I stop GHC from recompiling modules when nothing has changed?
I have the following directory structure:
libgs - The basic Global Script abstract machine and standard library
gsi - A Global Script interpreter
gs2hs - A Global Script to Haskell compiler
Most, ...
0
votes
1
answer
71
views
Cabal - Installing beam-migrate
I'm trying to install beam-migrate dependency and it fails with the following error:
Configuring library for beam-migrate-0.5.0.0..
Preprocessing library for beam-migrate-0.5.0.0..
Building library ...
2
votes
1
answer
478
views
cabal.exe: Could not resolve dependencies with --lib flag on Windows
Using PowerShell (Admin) to install the package parallel I tried to do :
cabal install parallel
which finished with
Resolving dependencies...
Up to date
Warning:
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@...
2
votes
1
answer
855
views
How do I get cabal to use a local version of a package as a dependency for a Hackage package?
I'm trying to install aeson on GHC 9.2.1. I first ran cabal install --allow-newer --lib aeson, which failed when it got to building attoparsec. It turns out this problem is already fixed in their Git ...
2
votes
0
answers
249
views
How can I tell Cabal where to find alex and happy so that Cabal doesn't try to build them?
I'm developing a Haskell program using Cabal in a nix-shell. I would like to have as many dependencies of the build installed by Nix as possible.
The simple.cabal file seems fairly standard (it was ...
2
votes
2
answers
88
views
I am trying to run cabal build, and I get the following error
Build profile: -w ghc-9.0.1 -O1
In order, the following will be built (use -v for more details):
- csound-expression-dynamic-0.3.8 (lib) (requires build)
- csound-expression-typed-0.2.7 (lib) (...
5
votes
1
answer
324
views
How to create binary distributions of applications with cabal (the tool) or stack
I've written an application in Haskell and it's starting to become slightly useful to users. However my application isn't targeted at technically adept folks, let alone Haskell developers, so building ...
1
vote
1
answer
453
views
How to import a lib from one cabal package to another
So my folder structure is like this
.
├── eulerlibs
│ ├── EulerLibs
│ └── eulerlibs.cabal
├── flake.lock
├── flake.nix
├── p001
│ ├── Main.hs
│ └── p001.cabal
├── p002
│ ├── Main.hs
│ └── p002....
0
votes
2
answers
292
views
How to compile a haskell package without installation?
https://github.com/koalaman/shellcheck
I can install the above package using cabal install. But I'd like to run the raw ghc commands that compile the binary without the installation.
How can I do it?
3
votes
0
answers
304
views
In docker with buildkit and run --mount, why is cabal install Downloading cached packages?
I am in the process of creating a Dockerfile that can build a haskell program. The Dockerfile uses ubuntu focal as a base image, installs ghcup, and then builds a haskell program. There are multiple ...
0
votes
1
answer
342
views
Cabal install fails in Linker phase
I'm trying to install this graphing library, but cabal-install is giving me this list of errors (only showing the bottom of the list, since everything above is very long and similar):
/usr/bin/ld:
/...
0
votes
1
answer
107
views
Keep cabal new-run alive
I'm running a haskell-based build using cabal the following way in dev mode on ubuntu 20.04:
cabal new-run -- exe:live-docs \
--database-url='postgres://<user>:<password>@<host>:&...
0
votes
0
answers
143
views
cabal-install failed to install a version that depends on the same version
I'm completely new to Haskell and I'm trying to replicate the code.world environment locally, so I need to install codeworld-api so that I can import CodeWorld. The problem is that when I run cabal ...
2
votes
0
answers
173
views
Cannot `cabal install doctest`
I am coming across a build error when attempting to install the cabal package doctest (as well as some others).
I am running MacOS on version 11.1 with an Intel x86-64 chip.
I would appreciate if ...
4
votes
2
answers
2k
views
Cabal install (Cabal cabal-install) fails due to missing zlib library
I want to install Cabal 3.4.0.0 on Ubuntu 20.04.
$ sudo apt install cabal-install
$ cabal --version
cabal-install version 2.4.0.0
$ sudo cabal update
$ sudo cabal install Cabal cabal-install
...
...
4
votes
1
answer
968
views
What is the difference between install, v1-install, v2-install and new-install?
The commands install, v1-install, v2-install and new-install are simply described to "Install packages" when running man cabal. Are they different from one another? Which is the preferred ...
1
vote
0
answers
100
views
error when building haddock-api-2.24.0 with cabal
I tried to install haddock-api-2.24.0 package with cabal (on archlinux) but it failed:
➜ ~ cabal install haddock-api-2.24.0
Resolving dependencies...
Build profile: -w ghc-8.10.4 -O1
In order, the ...
3
votes
1
answer
254
views
Hardcode datadir path upon installing executable
Problem: I've got a command-line tool written in Haskell that reads a data file. Upon installing the program, I'd like for the program to be able to read that data file regardless of the directory I ...
1
vote
0
answers
293
views
Dificoulties installing gloss and other packages with cabal
I am trying to install gloss but, I dont know why ghci doesn't find the modules.
When I do cabal install gloss it says:
Up to date
Warning: You asked to install executables, but there are no ...
2
votes
1
answer
196
views
Issue while Haskell instaling Euterpea's dependency, HCodecs did not skip version check for a later version installed
While I was installing Euterpea today, I found HCodecs-0.5.1 (a dependency for Euterpea) was tend to always to beult-fail
So I go to Hackage.Haskell.org, checked that HCodecs offers a latest version: ...
-1
votes
1
answer
1k
views
How to resolve the import System.Random?
I get the error that couldn´t find module System.Random and I tried to do Cabal Update ; Cabal Install Random and Cabal update --lib random, in Windowns, and it assumes the same error.
I also have ...
1
vote
1
answer
304
views
Cabal can't install ghc-mod
I'm trying to install ghc-mod to use with Atom-Haskell (the ide-haskell package) in Atom, but for some reason my Cabal doesn't want to.
When I enter the command cabal install ghc-mod, I get the ...
1
vote
1
answer
59
views
cabal install fails with "arithmetic overflow"
I saw a possible solution for an utf8 problem here: Read file with UTF-8 in Haskell as IO String. I wanted to try that out, but I'm having a problem I can't resolve.
When I run the command cabal v2-...
3
votes
1
answer
184
views
How to run shake without stack
I created the recommended build.sh file from the "Running" section of the Shake manual:
#!/bin/sh
mkdir -p _shake
ghc --make Shakefile.hs -v -rtsopts -threaded -with-rtsopts=-I0 -outputdir=...
4
votes
2
answers
4k
views
Haskell - could not find module 'Test.QuickCheck'
I'm getting an error that says the module doesn't exist when I try to runhaskell. It's odd because I try to install it first and says its up to date. Any idea how to fix this?
2
votes
1
answer
265
views
What are cabal components and how do I use them?
cabal build --help and others mention components like in sentences like
Build one or more targets from within the project. The available targets are
the packages in the project as well as ...
4
votes
0
answers
468
views
ghc fails to find a library that I built and installed with cabal new-install --lib
I am building a Haskell library with Cabal that I would like to install to use in some other projects. I am using Windows PowerShell and new style Cabal commands. I have ghc 8.10.1 and Cabal 3.2.0.0 ...
2
votes
0
answers
557
views
Reinstalling the same version of a package with cabal new-install
I am working on a Haskell package. I have not yet uploaded it to Hackage and the version number is 0.1.0.0. I am using new style Cabal commands.
In order to test the package while I'm working on it (...
1
vote
0
answers
123
views
GHC can't import the standard library as long as a package environment file exists
When I install things with cabal-install, it automatically creates a ~/.ghc/x86_64-freebsd-8.8.3/environments/default with a bunch of stuff in it; this allows me to import my installed packages, but ...
1
vote
1
answer
1k
views
How to find and use QuickCheck package since I forgot to use --lib while doing cabal install
I wanted to use QuickCheck package so i did cabal install QuickCheck and then I got
Warning: You asked to install executables, but there are no executables in
target: QuickCheck. Perhaps you want to ...
4
votes
1
answer
3k
views
Can't install "System.Random" by cabal
I try to install "System.Random" by cabal through Powershell & Git Bash.
getting this result.
PS C:\Users\xxx> cabal install random
Resolving dependencies...
Up to date
Warning: You asked to ...
3
votes
1
answer
223
views
Out-of-memory condition error when updating agda with cabal?
I'm trying to upgrade agda, getting a memory error. Any ways to fix this?
I tried cabal install --ghc-options="+RTS -M600M" --force-reinstalls agda but per a similair question, but this just gave a ...
5
votes
1
answer
782
views
how to manage cabal sandboxes
The current documentation of cabal shows a sandbox subcommand.
The respective page on github no longer contains the section on sandboxes.
I'm using cabal version 3.2.0.0, but the sandbox subcommand ...
0
votes
1
answer
30
views
How to store package repository globally?
A FreeBSD update forces me to run Xmonad by cabal-install. After I run "cabal new-update"
I find that it audaciously placed a 636MB file inside the directory "~/.cabal". Having a closer look I ...
0
votes
2
answers
856
views
Cabal install tidal ends with warning
I'm trying install tidal in command line this way:
cabal install tidal
but it ends with this message:
Warning: You asked to install executables, but there are no executables in
target: tidal. ...
0
votes
2
answers
356
views
Cabal: problems installing packages and updating
I was trying to install the threadscope package using cabal but got an error about cabal being too outdated:
cabal: Error: some packages failed to install:
cairo-0.13.8.0 failed during the configure ...
5
votes
1
answer
2k
views
Cabal cannot find locally sourced (yet correctly installed) packages
I recently upgraded to Cabal 3.2 (and GHC 8.10) and I am running into some major issues that make some of my project non-buildable anymore...
Thorough description of the problem
Here is a minimal (...
0
votes
0
answers
30
views
Idris compilation from source failed
I'm trying to build latest dev version 1.3.2 of Idris from source code (bbd0f286c2e76ae157b5130303d29622d31de309) with these commands
$ curl --proto '=https' --tlsv1.2 -sSf https://get-ghcup.haskell....
1
vote
0
answers
202
views
Setting per-component options in cabal.project.local file
I can enable code coverage for a local or other package in cabal.project with, e.g.
package my-package
coverage: true
But is there a way to specify options for, say, just the library and ...
2
votes
1
answer
478
views
Haskell Text.Regex.Posix and Text.Regex.TDFA not working in ghci
I'm using Windows 10, GHC 8.6.5.
I have used cabal new-install on both Text.Regex.Posix and Text.Regex.TDFA and cabal outputs that it has built them and installed them.
But neither of those modules ...
3
votes
1
answer
396
views
Haskell `cabal` only "partially" installing package
Having problems installing a Haskell package called Tidal, using cabal on Ubuntu 18:04.
https://tidalcycles.org/index.php/Userbase
I'm not a Haskell expert and have borked this stuff a couple of ...