-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathFAQ.html
62 lines (62 loc) · 3.68 KB
/
FAQ.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" lang="" xml:lang="">
<head>
<meta charset="utf-8" />
<meta name="generator" content="pandoc" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" />
<meta name="author" content="" />
<title>Cabal FAQ</title>
<style type="text/css">
code{white-space: pre-wrap;}
span.smallcaps{font-variant: small-caps;}
span.underline{text-decoration: underline;}
div.column{display: inline-block; vertical-align: top; width: 50%;}
</style>
<link rel="stylesheet" href="nominolo.css" />
</head>
<body>
<header>
<h1 class="title">Cabal FAQ</h1>
<p class="author"></p>
</header>
<h2 id="contents">Contents</h2>
<p>Select the name of a problem to jump to a full explanation and solution.</p>
<dl>
<dt><a href="#hidden-packages">Hidden packages</a></dt>
<dd>What is this hidden package? You’re writing your own package and you get:
</dd>
<dd><pre><code> Could not find module `Data.Map': it is a member of package
containers-0.1.0.0, which is hidden.</code></pre>
</dd>
<dt><a href="#runprocess-does-not-exist">runProcess: does not exist</a></dt>
<dd>You’re building a package on Windows and you get:
</dd>
<dd><pre><code> sh: runProcess: does not exist (No such file or directory)</code></pre>
</dd>
<dt><a href="#exitfailure-1">ExitFailure 1</a></dt>
<dd><code>ExitFailure 1</code> ??! Where is the real error message?
</dd>
<dd><pre><code>cabal: Error: some packages failed to install: foo-1.0 failed during the
configure step. The exception was: exit: ExitFailure 1</code></pre>
</dd>
</dl>
<h2 id="hidden-packages">Hidden packages</h2>
<p>You build a package that you are writing yourself and get a message like:</p>
<pre><code>Could not find module `Data.Map': it is a member of package
containers-0.1.0.0, which is hidden.</code></pre>
<p>What you need to do is to add <code>containers</code> to the <code>build-depends</code> in your <code>.cabal</code> file.</p>
<p>The reason you get this message is because when cabal asks ghc to build your package, it tells ghc to ignore all available packages except for the ones explicitly listed in the <code>.cabal</code> file. The terminology ghc uses for this is “hidden”.</p>
<p>Do not be confused by the <code>ghc-pkg</code> tool commands to <code>hide</code> and <code>expose</code> packages. That makes no difference to this issue.</p>
<h2 id="runprocess-does-not-exist">runProcess: does not exist</h2>
<p>You try to install a package on Windows and it fails with the message</p>
<pre><code>sh: runProcess: does not exist (No such file or directory)</code></pre>
<p>What it means is that it cannot find the program <code>sh.exe</code> which is needed to run the <code>./configure</code> script that this package uses.</p>
<p>Packages that use <code>./configure</code> scripts are not very good citizens on Windows. They have to be run from within an MSYS shell because <code>./configure</code> scripts are actually Unix shell scripts. The MSYS shell provides all the programs that the script needs to run.</p>
<p>BTW, if you want to make the error message better see Cabal ticket <a href="http://hackage.haskell.org/trac/hackage/ticket/403">#403</a>.</p>
<h2 id="exitfailure-1">ExitFailure 1</h2>
<p>You use cabal to build a bunch of packages and it fails with a message like:</p>
<pre><code>cabal: Error: some packages failed to install: foo-1.0 failed during the
configure step. The exception was: exit: ExitFailure 1</code></pre>
<p>Hooray for unhelpful error messages! Although this final message is unhelpful, there is almost always an actual error message further up in the build log. Try scrolling up to the bit where it was trying to build that package.</p>
</body>
</html>