Bug 107380

Summary: lang/ghc fails to properly find readline and misbuilds
Product: Ports & Packages Reporter: Brandon S Allbery KF8NH <allbery>
Component: Individual Port(s)Assignee: freebsd-haskell (Nobody) <haskell>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   

Description Brandon S Allbery KF8NH 2006-12-31 20:00:30 UTC
The lang/ghc port builds ghc (which is written in ghc) by using a minimal bootstrap compiler distribution.  The ghc build is patched to use this uninstalled bootstrap compiler "in place".  Unfortunately, this patching is incomplete; the configure script in the ghc/ subdirectory wants to run the ghc-pkg command from the bootstrap compiler, but fails to find it.  This results in ghc building with incomplete readline support, so that running ghci results in a prompt in raw tty mode with no line editing capabilities.  (In a proper bootstrap situation, building the stage1 compiler would be followed by building stage2 and stage3; these later stages do not use the bootstrap ghc-pkg, so would correctly detect readline.)

Fix: 

There are two possible ways to fix this:  patch ghc/configure to run the bootstrap ghc-pkg, or arrange for bootstrap ghc-pkg to be in $PATH.  (Presumably this also requires something to be done about libgmp.so.6, but that's also true for the bootstrap ghc itself.)  It's up to the port maintainer to decide which is preferable.
How-To-Repeat: cd /usr/ports/lang/ghc
make install clean
# hash -r or rehash as needed
ghci
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2006-12-31 20:00:42 UTC
Responsible Changed
From-To: freebsd-ports-bugs->haskell

Over to maintainer
Comment 2 Volker Stolz freebsd_committer freebsd_triage 2007-01-09 01:35:35 UTC
You're right, it's broken. I'm currently working on an upgrade anyway  
and will fix this on my way there (but please don't hold your breath,  
I have to do this in a slow VirtualPC environment). Thanks for the  
analysis!

Volker
Comment 3 Volker Stolz freebsd_committer freebsd_triage 2007-01-22 08:06:26 UTC
State Changed
From-To: open->closed

Fix in update to 6.6. Thanks for your submission!