On Mon, Jul 21, 2008 at 11:15 AM, Ian Lynagh <[EMAIL PROTECTED]> wrote:
> On Sun, Jul 20, 2008 at 10:46:24PM -0700, Judah Jacobson wrote:
>> Building against the HEAD currently fails (when configuring the stage1
>> compiler) if you have editline already installed in your bootstrapping
>> GHC:
>>
>> Configuring ghc-6.9...
>> cabal-bin: At least the following dependencies are missing:
>> editline -any
>> make[1]: *** [boot.stage.1] Error 1
>> make: *** [stage1] Error 1
>
> I don't understand - if your bootstrapping compiler has an editline
> package, then why doesn't Cabal find it?
>

I had thought I understood the cause, but when I began to write it up
I realized the issue was more subtle.  Namely: on my machine, editline
is only installed in the user package database, and not the global
one.  The configure script populates GhcHasEditline no matter which
package DB editline is stored in, but we run
$(CABAL) configure
without the --user flag, so it doesn't see the editline package.

Perhaps the best thing to do is to move all editline-related logic
into ghc.cabal.  Using Cabal configurations I think that we could
replace all the logic in the configure script and Makefiles with one
line:

diff -rN -u old-ghc2/compiler/ghc.cabal new-ghc2/compiler/ghc.cabal
--- old-ghc2/compiler/ghc.cabal 2008-07-21 14:51:48.000000000 -0700
+++ new-ghc2/compiler/ghc.cabal 2008-07-21 14:51:51.000000000 -0700
@@ -50,7 +50,7 @@
     else
         Build-Depends: unix

-    if flag(editline)
+    if flag(editline) && flag(ghci) && !flag(windows)
         Build-Depends: editline
         CPP-Options: -DUSE_EDITLINE


Thanks,
-Judah

_______________________________________________
Cvs-ghc mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/cvs-ghc

Reply via email to