How to install cabal after building ghc from source

Peng Yu pengyu.ut at gmail.com
Sun Apr 26 02:26:47 UTC 2015


I get the following error. How to fix it?

~/dvcs_src/cabal/cabal-install$ ./bootstrap.sh
Configured with:
--prefix=/Applications/Xcode.app/Contents/Developer/usr
--with-gxx-include-dir=/usr/include/c++/4.2.1
Using gcc for C compiler. If this is not what you want, set CC.
Using /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld
instead.
Checking installed packages for ghc-7.10.1...
deepseq is already installed and the version is ok.
binary is already installed and the version is ok.
time is already installed and the version is ok.
Cabal is already installed and the version is ok.
transformers is already installed and the version is ok.
mtl-2.2.1 will be downloaded and installed.
text-1.2.0.4 will be downloaded and installed.
parsec-3.1.8 will be downloaded and installed.
network-2.6.0.2 will be downloaded and installed.
old-locale-1.0.0.7 will be downloaded and installed.
old-time-1.1.0.3 will be downloaded and installed.
HTTP-4000.2.19 will be downloaded and installed.
zlib-0.5.4.2 will be downloaded and installed.
random-1.1 will be downloaded and installed.
stm-2.4.4 will be downloaded and installed.

Downloading mtl-2.2.1...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 15391  100 15391    0     0  24744      0 --:--:-- --:--:-- --:--:-- 99296
[1 of 1] Compiling Main             ( Setup.hs, Setup.o )
Linking Setup ...
Configuring mtl-2.2.1...
Building mtl-2.2.1...
Preprocessing library mtl-2.2.1...
[ 1 of 22] Compiling Control.Monad.Writer.Class (
Control/Monad/Writer/Class.hs, dist/build/Control/Monad/Writer/Class.o
)
[ 2 of 22] Compiling Control.Monad.State.Class (
Control/Monad/State/Class.hs, dist/build/Control/Monad/State/Class.o )
[ 3 of 22] Compiling Control.Monad.Reader.Class (
Control/Monad/Reader/Class.hs, dist/build/Control/Monad/Reader/Class.o
)
[ 4 of 22] Compiling Control.Monad.RWS.Class (
Control/Monad/RWS/Class.hs, dist/build/Control/Monad/RWS/Class.o )
[ 5 of 22] Compiling Control.Monad.Identity (
Control/Monad/Identity.hs, dist/build/Control/Monad/Identity.o )
[ 6 of 22] Compiling Control.Monad.Error.Class (
Control/Monad/Error/Class.hs, dist/build/Control/Monad/Error/Class.o )
[ 7 of 22] Compiling Control.Monad.Cont.Class (
Control/Monad/Cont/Class.hs, dist/build/Control/Monad/Cont/Class.o )
[ 8 of 22] Compiling Control.Monad.Trans ( Control/Monad/Trans.hs,
dist/build/Control/Monad/Trans.o )
[ 9 of 22] Compiling Control.Monad.Error ( Control/Monad/Error.hs,
dist/build/Control/Monad/Error.o )
[10 of 22] Compiling Control.Monad.Except ( Control/Monad/Except.hs,
dist/build/Control/Monad/Except.o )
[11 of 22] Compiling Control.Monad.List ( Control/Monad/List.hs,
dist/build/Control/Monad/List.o )
[12 of 22] Compiling Control.Monad.RWS.Lazy (
Control/Monad/RWS/Lazy.hs, dist/build/Control/Monad/RWS/Lazy.o )
[13 of 22] Compiling Control.Monad.RWS ( Control/Monad/RWS.hs,
dist/build/Control/Monad/RWS.o )
[14 of 22] Compiling Control.Monad.Reader ( Control/Monad/Reader.hs,
dist/build/Control/Monad/Reader.o )
[15 of 22] Compiling Control.Monad.RWS.Strict (
Control/Monad/RWS/Strict.hs, dist/build/Control/Monad/RWS/Strict.o )
[16 of 22] Compiling Control.Monad.State.Lazy (
Control/Monad/State/Lazy.hs, dist/build/Control/Monad/State/Lazy.o )
[17 of 22] Compiling Control.Monad.State ( Control/Monad/State.hs,
dist/build/Control/Monad/State.o )
[18 of 22] Compiling Control.Monad.State.Strict (
Control/Monad/State/Strict.hs, dist/build/Control/Monad/State/Strict.o
)
[19 of 22] Compiling Control.Monad.Writer.Lazy (
Control/Monad/Writer/Lazy.hs, dist/build/Control/Monad/Writer/Lazy.o )
[20 of 22] Compiling Control.Monad.Writer ( Control/Monad/Writer.hs,
dist/build/Control/Monad/Writer.o )
[21 of 22] Compiling Control.Monad.Writer.Strict (
Control/Monad/Writer/Strict.hs,
dist/build/Control/Monad/Writer/Strict.o )
[22 of 22] Compiling Control.Monad.Cont ( Control/Monad/Cont.hs,
dist/build/Control/Monad/Cont.o )

Control/Monad/Cont.hs:1:1:
    Could not find module ‘Prelude’
    Perhaps you haven't installed the profiling libraries for package
‘base-4.8.0.0’?
    Use -v to see a list of the files searched for.

Control/Monad/Cont.hs:80:8:
    Could not find module ‘Control.Monad.Trans.Cont’
    Perhaps you haven't installed the profiling libraries for package
‘transformers-0.4.2.0 at trans_ALYlebOVzVI4kxbFX5SGhm’?
    Use -v to see a list of the files searched for.

Control/Monad/Cont.hs:82:8:
    Could not find module ‘Control.Monad’
    Perhaps you haven't installed the profiling libraries for package
‘base-4.8.0.0’?
    Use -v to see a list of the files searched for.

Control/Monad/Cont/Class.hs:57:8:
    Could not find module ‘Control.Monad.Trans.Error’
    Perhaps you haven't installed the profiling libraries for package
‘transformers-0.4.2.0 at trans_ALYlebOVzVI4kxbFX5SGhm’?
    Use -v to see a list of the files searched for.

Control/Monad/Cont/Class.hs:58:8:
    Could not find module ‘Control.Monad.Trans.Except’
    Perhaps you haven't installed the profiling libraries for package
‘transformers-0.4.2.0 at trans_ALYlebOVzVI4kxbFX5SGhm’?
    Use -v to see a list of the files searched for.

Control/Monad/Cont/Class.hs:59:8:
    Could not find module ‘Control.Monad.Trans.Identity’
    Perhaps you haven't installed the profiling libraries for package
‘transformers-0.4.2.0 at trans_ALYlebOVzVI4kxbFX5SGhm’?
    Use -v to see a list of the files searched for.

Control/Monad/Cont/Class.hs:60:8:
    Could not find module ‘Control.Monad.Trans.List’
    Perhaps you haven't installed the profiling libraries for package
‘transformers-0.4.2.0 at trans_ALYlebOVzVI4kxbFX5SGhm’?
    Use -v to see a list of the files searched for.

Control/Monad/Cont/Class.hs:61:8:
    Could not find module ‘Control.Monad.Trans.Maybe’
    Perhaps you haven't installed the profiling libraries for package
‘transformers-0.4.2.0 at trans_ALYlebOVzVI4kxbFX5SGhm’?
    Use -v to see a list of the files searched for.

Control/Monad/Cont/Class.hs:62:8:
    Could not find module ‘Control.Monad.Trans.Reader’
    Perhaps you haven't installed the profiling libraries for package
‘transformers-0.4.2.0 at trans_ALYlebOVzVI4kxbFX5SGhm’?
    Use -v to see a list of the files searched for.

Control/Monad/Cont/Class.hs:63:8:
    Could not find module ‘Control.Monad.Trans.RWS.Lazy’
    Perhaps you haven't installed the profiling libraries for package
‘transformers-0.4.2.0 at trans_ALYlebOVzVI4kxbFX5SGhm’?
    Use -v to see a list of the files searched for.

Control/Monad/Cont/Class.hs:64:8:
    Could not find module ‘Control.Monad.Trans.RWS.Strict’
    Perhaps you haven't installed the profiling libraries for package
‘transformers-0.4.2.0 at trans_ALYlebOVzVI4kxbFX5SGhm’?
    Use -v to see a list of the files searched for.

Control/Monad/Cont/Class.hs:65:8:
    Could not find module ‘Control.Monad.Trans.State.Lazy’
    Perhaps you haven't installed the profiling libraries for package
‘transformers-0.4.2.0 at trans_ALYlebOVzVI4kxbFX5SGhm’?
    Use -v to see a list of the files searched for.

Control/Monad/Cont/Class.hs:66:8:
    Could not find module ‘Control.Monad.Trans.State.Strict’
    Perhaps you haven't installed the profiling libraries for package
‘transformers-0.4.2.0 at trans_ALYlebOVzVI4kxbFX5SGhm’?
    Use -v to see a list of the files searched for.

Control/Monad/Cont/Class.hs:67:8:
    Could not find module ‘Control.Monad.Trans.Writer.Lazy’
    Perhaps you haven't installed the profiling libraries for package
‘transformers-0.4.2.0 at trans_ALYlebOVzVI4kxbFX5SGhm’?
    Use -v to see a list of the files searched for.

Control/Monad/Cont/Class.hs:68:8:
    Could not find module ‘Control.Monad.Trans.Writer.Strict’
    Perhaps you haven't installed the profiling libraries for package
‘transformers-0.4.2.0 at trans_ALYlebOVzVI4kxbFX5SGhm’?
    Use -v to see a list of the files searched for.

Control/Monad/Cont/Class.hs:71:8:
    Could not find module ‘Data.Monoid’
    Perhaps you haven't installed the profiling libraries for package
‘base-4.8.0.0’?
    Use -v to see a list of the files searched for.

Control/Monad/Error.hs:59:8:
    Could not find module ‘Control.Monad.Fix’
    Perhaps you haven't installed the profiling libraries for package
‘base-4.8.0.0’?
    Use -v to see a list of the files searched for.

Control/Monad/Error/Class.hs:58:8:
    Could not find module ‘Control.Monad.Trans.Class’
    Perhaps you haven't installed the profiling libraries for package
‘transformers-0.4.2.0 at trans_ALYlebOVzVI4kxbFX5SGhm’?
    Use -v to see a list of the files searched for.

Control/Monad/Error/Class.hs:59:8:
    Could not find module ‘Control.Exception’
    Perhaps you haven't installed the profiling libraries for package
‘base-4.8.0.0’?
    Use -v to see a list of the files searched for.

Control/Monad/Identity.hs:44:8:
    Could not find module ‘Data.Functor.Identity’
    Perhaps you haven't installed the profiling libraries for package
‘base-4.8.0.0’?
    Use -v to see a list of the files searched for.

Control/Monad/Trans.hs:33:8:
    Could not find module ‘Control.Monad.IO.Class’
    Perhaps you haven't installed the profiling libraries for package
‘transformers-0.4.2.0 at trans_ALYlebOVzVI4kxbFX5SGhm’?
    Use -v to see a list of the files searched for.

Error during cabal-install bootstrap:
Building the mtl package failed.


On Sat, Apr 25, 2015 at 9:21 PM, Mikhail Glushenkov
<the.dead.shall.rise at gmail.com> wrote:
> Hi,
>
> On 26 April 2015 at 04:12, Peng Yu <pengyu.ut at gmail.com> wrote:
>> Hi, I following the following instructions to install ghc from source.
>> Could anybody let me know what is the appropriate step to install
>> cabal? Thanks.
>
> Try the bootstrap.sh script [1].
>
> [1] https://github.com/haskell/cabal/blob/master/cabal-install/bootstrap.sh



-- 
Regards,
Peng


More information about the cabal-devel mailing list