Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

can't build lambdabot with ghc-7.8 (@ haskell-src-exts)

Tags:

haskell

cabal

I was trying to install lambdabot with ghc-7.8.2, but encountered an error while installing haskell-src-exts. To diagnose the issue, I tried

cabal install haskell-src-exts -v3

and get the following errors. I am using Windows XP 64-bit. I don't know if this has anything to do with spaces in windows directory names. Any ideas/pointer how to fix the problem?

...
[_18] next goal: array (dependency of haskell-src-exts-1.15.0.1)
[_18] trying: array-0.5.0.0/installed-d6d...
[_19] done
Ready to install haskell-src-exts-1.15.0.1
Extracting C:\Documents and Settings\ting\Application
Waiting for install task to finish...
Data\cabal\packages\hackage.haskell.org\haskell-src-exts\1.15.0.1\haskell-src-exts-1.15.0.1.tar.gz
to C:\DOCUME~1\ting\LOCALS~1\Temp\haskell-src-exts-1.15.0.1-3008...
Renaming
'C:\DOCUME~1\ting\LOCALS~1\Temp\haskell-src-exts-1.15.0.1-3008\haskell-src-exts-1.15.0.1\dist'
to
'C:\DOCUME~1\ting\LOCALS~1\Temp\haskell-src-exts-1.15.0.1-3008\haskell-src-exts-1.15.0.1\dist-tmp'.
creating
C:\DOCUME~1\ting\LOCALS~1\Temp\haskell-src-exts-1.15.0.1-3008\haskell-src-exts-1.15.0.1\dist
Renaming
'C:\DOCUME~1\ting\LOCALS~1\Temp\haskell-src-exts-1.15.0.1-3008\haskell-src-exts-1.15.0.1\dist-tmp'
to
'C:\DOCUME~1\ting\LOCALS~1\Temp\haskell-src-exts-1.15.0.1-3008\haskell-src-exts-1.15.0.1\dist'.
Failed to install haskell-src-exts-1.15.0.1
Last 10 lines of the build log ( C:\Documents and Settings\ting\Application Data\cabal\logs\haskell-src-exts-1.15.0.1.log ):
cabal.exe: C:\Documents and Settings\ting\Application
Data\cabal\logs\haskell-src-exts-1.15.0.1.log: does not exist
like image 863
thor Avatar asked Apr 28 '14 09:04

thor


1 Answers

I figured it out. I tried to locate the log file as the comments suggested. However, in the cabal/log folder, there are only two log files for hashtable and haskline after running cabal-install lambdabot on a fresh ghc-7.8 installation.

To see if this error has anything to do with the spaces in the default cabal directory, I used a folder without spaces and did manual installation:

$ cd /d/temp
$ cabal get haskell-src-exts
Unpacking to haskell-src-exts-1.15.0.1\
$ cd haskell-src-exts-1.15.0.1/ && cabal configure
Resolving dependencies...
[1 of 1] Compiling Main             ( dist\setup\setup.hs, dist\setup\Main.o )
Linking .\dist\setup\setup.exe ...
Configuring haskell-src-exts-1.15.0.1...
setup.exe: The program 'happy' version >=1.17 is required but it could not be
found.

So, happy in the dependency is somehow missing and undetected by cabal. It turns out happy too has an issue using the default cabal install command, and it can be overcome by a manual installation in, e.g., /d/temp,

cabal get happy && cd happy* && cabal configure && cabal install

This installs happy and doing the same for haskell-src-exts installs the package correctly. But there are other errors along the way for installing lambdabot, none of which seems to like the one encountered here with haskell-src-exts and happy.

like image 192
thor Avatar answered Nov 09 '22 10:11

thor