[jhc] Compiling JHC on OS X

Chris Eidhof chris at eidhof.nl
Mon Nov 16 06:01:50 EST 2009

Hey all,

I'm trying to compile JHC on OS X. However, when I do a 'make jhc', I  
got the following error:

> make jhc
> perl ./utils/opt_sets.prl -n src/FlagDump.flags src/FlagDump.flags   
> > src/FlagDump.hs
> Use of uninitialized value in hash element at ./utils/opt_sets.prl  
> line 44, <> line 84.
> perl ./utils/opt_sets.prl -n src/FlagOpts.flags src/FlagOpts.flags   
> > src/FlagOpts.hs
> Use of uninitialized value in hash element at ./utils/opt_sets.prl  
> line 44, <> line 45.
> Use of uninitialized value in hash element at ./utils/opt_sets.prl  
> line 44, <> line 45.
> happy -a -g -c src/FrontEnd/HsParser.y -o src/FrontEnd/HsParser.hs
> unused rules: 2
> shift/reduce conflicts:  73
> reduce/reduce conflicts: 23
> sed -e 's/^{-# OPTIONS[A-Z_]*/{-# OPTIONS_GHC -w /' -i src/FrontEnd/ 
> HsParser.hs
> sed: -i may not be used with stdin
> make: *** [src/FrontEnd/HsParser.hs] Error 1
> make: *** Deleting file `src/FrontEnd/HsParser.hs'

I fixed that by adding the extension to sed -i (I've attached a patch  
for that, my sendmail is broken).

For future reference: I had some problems installing readline (using  
fink's readline). There's a thread [1] on haskell-café that solves that.

After changing the line and installing readline, it started compiling.  
After a while, the compiler stopped with:

> src/E/Subst.hs:143:22:
>     No instance for (T.Traversable (Lit TVr))

This was because I had an old version of Drift installed. I didn't see  
an error, it should probably fail as early as possible and notify me  
that I had an old version that didn't support deriving Traversable.

Finally, JHC was compiled! When compiling the libraries, however, it  
failed again:

> lib/containers/Data/Sequence.hs:312:16: Parse error
> make[1]: *** [containers-0.2.0.hl] Error 1

Is somebody already working on that? If not, I'd be happy to dive in  
and fix it.

(BTW, the culprit is the following line:)

> {-# SPECIALIZE INLINE deep :: Digit (Elem a) -> FingerTree (Node  
> (Elem a)) -> Digit (Elem a) -> FingerTree (Elem a) #-}



[1]: http://www.haskell.org/pipermail/libraries/2009-May/011597.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mac-build.darcs
Type: application/octet-stream
Size: 7100 bytes
Desc: not available
Url : http://www.haskell.org/pipermail/jhc/attachments/20091116/25f1e6f6/mac-build.obj

More information about the jhc mailing list