<Pine.LNX.4.10.10105222334140.24464-100000@90-mia-3.acn.waw.pl>

[ Moved from nhc-users to nhc-bugs ] Wojciech Moczydlowski, Jr writes:
The configure script fails to detect ghc-5.00 - due to driver changes.
Oops, yes indeed. Try the following patch. I haven't been able to test it fully, but i think it should work. Regards, Malcolm ---- cut here ---- diff -u -r1.27 confhc --- script/confhc 2001/03/23 20:36:38 1.27 +++ script/confhc 2001/05/23 13:25:21 @@ -149,12 +149,18 @@ whichGHC=`which ghc` GHCVER=`${whichGHC} --version 2>&1 | sed 's/^.*version[ ]*\([0-9.]*\).*/\1/'` GHCSYM=`echo $GHCVER | tr "." " " | ( read x y z; echo $x$y; )` - GHCDIR=`grep '^\$libdir=' ${whichGHC} | head -1 | sed 's/^\$libdir=[^/]*\(.*\).;/\1/'` - if [ -d $GHCDIR/imports ] - then GHCINCDIR=$GHCDIR/imports - elif [ -d $GHCDIR/lib/imports ] - then GHCINCDIR=$GHCDIR/lib/imports - else GHCDIR="" + if [ $GHCSYM -lt 500 ] + then + GHCDIR=`grep '^\$libdir=' ${whichGHC} | head -1 | sed 's/^\$libdir=[^/]*\(.*\).;/\1/'` + if [ -d $GHCDIR/imports ] + then GHCINCDIR=$GHCDIR/imports + elif [ -d $GHCDIR/lib/imports ] + then GHCINCDIR=$GHCDIR/lib/imports + else GHCDIR="" + fi + else + GHCDIR=`${whichGHC} --show-package std --field import_dirs` + GHCINCDIR=`dirname $GHCDIR` fi fi if [ "$GHCDIR" = "" ] @@ -247,7 +253,8 @@ 2.*) sed -e "s|^GHC=0$|GHC=3|" ;; 3.*) sed -e "s|^GHC=0$|GHC=4|" ;; 4.*) sed -e "s|^GHC=0$|GHC=5|" ;; - *) sed -e "s|^GHC=0$|GHC=6|" ;; + 5.*) sed -e "s|^GHC=0$|GHC=6|" ;; + *) sed -e "s|^GHC=0$|GHC=7|" ;; esac ) fi

On Wed, 23 May 2001, Malcolm Wallace wrote:
[ Moved from nhc-users to nhc-bugs ]
Wojciech Moczydlowski, Jr writes:
The configure script fails to detect ghc-5.00 - due to driver changes.
Oops, yes indeed. Try the following patch. I haven't been able to test it fully, but i think it should work.
Regards, Malcolm
Doesn't work either: First we look for already-installed Haskell compilers: Looking for hbc... (not found) Looking for ghc... ghc-5.00: unrecognised flag: --show-package Usage: For basic information, try the --help' option. dirname: too few arguments Try 'dirname --help' for more information. (not found) BTW, not removing targets/ix86-linux/config.cache and similar files when I rerun configure script is quite annoying. Wojciech Moczydlowski, Jr

Wojciech Moczydlowski, Jr writes:
First we look for already-installed Haskell compilers: Looking for hbc... (not found) Looking for ghc... ghc-5.00: unrecognised flag: --show-package
Apologies, line 162 in the patched script/confhc which now reads GHCDIR=`${whichGHC} --show-package std --field import_dirs` should be GHCDIR=`ghc-pkg --show-package std --field import_dirs`
BTW, not removing targets/ix86-linux/config.cache and similar files when I rerun configure script is quite annoying.
Could you be more specific about what problems this causes? Regards, Malcolm

On Wed, 23 May 2001, Malcolm Wallace wrote:
GHCDIR=`ghc-pkg --show-package std --field import_dirs`
Works now, thank you.
BTW, not removing targets/ix86-linux/config.cache and similar files when I rerun configure script is quite annoying.
Could you be more specific about what problems this causes?
Malcolm
Not any problems, it caused just my minor annoyance - when I reran configure, I expected it to redecect compilers - yet AFAIR it hadn't. Maybe I'm wrong. Wojciech Moczydlowski, Jr

BTW, not removing targets/ix86-linux/config.cache and similar files when I rerun configure script is quite annoying.
Could you be more specific about what problems this causes?
Not any problems, it caused just my minor annoyance - when I reran configure, I expected it to redecect compilers - yet AFAIR it hadn't. Maybe I'm wrong.
Yes, existing Haskell compilers are detected once only, but everything else configuration-related can be altered at any time by re-running the script. Compiler detection is mainly for the benefit of 'hmake', and I am becoming convinced that our current scheme is thoroughly inadequate anyway. For instance, some people have more than one version of ghc installed, and want hmake to work properly with both. Eventually, I hope to completely redesign this mechanism for hmake. Regards, Malcolm
participants (2)
-
Malcolm Wallace
-
Wojciech Moczydlowski, Jr