[Haskell] ghci readline support on FreeBSD: simple patch

Brandon S. Allbery KF8NH allbery at ece.cmu.edu
Sun Dec 31 08:28:32 EST 2006

The problem people have been having with ghci on FreeBSD turns out to  
be a bootstrapping issue:  if the bootstrap compiler was not built  
with readline support, or it doesn't include ghc-pkg (the FreeBSD  
bootstrap ghc has been stripped down to bare essentials, so guess  
what's not there?), then ghc won't be built with readline support  
unless you build the stage2 and stage3 compilers.  Since ports only  
builds stage1, with the crippled bootstrap ghc, the result is no  
readline in ghc itself.  (But the readline package is built, so  
Haskell programs which themselves use readline work fine.)

The attached patch is a simplistic, hacky workaround which stubs out  
the offending configure test.  Since ports ghc declares readline as a  
dependency, this is safe (or at least safe enough).  Drop it into / 
usr/ports/lang/ghc/files and (re)build ghc (either "cd /usr/ports/ 
lang/ghc; make install clean -DFORCE_PKG_REGISTER", or "portupgrade - 
f ghc", or deinstall and reinstall from scratch).  You will probably  
want to do something to keep it from being removed or to copy it back  
when you update the ports tree with portsnap or cvsup.

I'm not going to bother reporting this to the port maintainer because  
it'll just get stuck in the same queue that's holding the ghc-6.6  
upgrade.  :)

brandon s. allbery    [linux,solaris,freebsd,perl]     allbery at kf8nh.com
system administrator [openafs,heimdal,too many hats] allbery at ece.cmu.edu
electrical and computer engineering, carnegie mellon university    KF8NH

-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch-local-ghc_configure
Type: application/octet-stream
Size: 454 bytes
Desc: not available
Url : http://www.haskell.org/pipermail/haskell/attachments/20061231/db3080cd/patch-local-ghc_configure.obj
-------------- next part --------------

More information about the Haskell mailing list