Bug 107380 - lang/ghc fails to properly find readline and misbuilds
Summary: lang/ghc fails to properly find readline and misbuilds
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-haskell (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-12-31 20:00 UTC by Brandon S Allbery KF8NH
Modified: 2007-01-22 08:08 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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!