confhc does not recognize ghc 5.*

Mieszko Lis
i ran into a compiler-detection bug in building nhc98 (the 1.10 tarball, but the same bug seems to be in cvs and earlier versions): the build process fails to detect the default ghc 5.02 installation on my debian linux machine as well as the ghc 5.00.2 installation on a redhat 7.1 box nearby.
the problem turns out to be that script/confhc looks through the ghc executable for the wrong stuff (at least in the installations i mentioned above). i attached a patch (against the cvs tree) to fix this at least on these debian and redhat installations.
Here is the essential part of the patch: - GHCDIR=`grep '^libdir' ${whichGHC} | head -1 | sed 's/^libdir=.\(.*\)./\1/'` + GHCDIR=`grep '^TOPDIROPT' ${whichGHC} | head -1 | sed 's/^TOPDIROPT="*-B\([^";]*\).*/\1/'` However, this does not work on my (Slackware Linux) machine. In the driver script for ghc-5.02, I see the following two lines: libdir='/usr/malcolm/local/lib/ghc-5.02' TOPDIROPT="-B$libdir"; which means that the original confhc gives the correct path (/usr/malcolm/local/lib/ghc-5.02), but the patched confhc gives an incorrect path symbol ($libdir). Can someone at ghc central confirm whether this part of the ghc-5.02 driver script differs, depending on package and platform? And if so, what is the best way to detect which variation applies? Regards, Malcolm

On Tue, Oct 23, 2001 at 10:53:29AM +0100, Malcolm Wallace wrote:
Mieszko Lis
writes: i ran into a compiler-detection bug in building nhc98 (the 1.10 tarball, but the same bug seems to be in cvs and earlier versions): the build process fails to detect the default ghc 5.02 installation on my debian linux machine as well as the ghc 5.00.2 installation on a redhat 7.1 box nearby.
the problem turns out to be that script/confhc looks through the ghc executable for the wrong stuff (at least in the installations i mentioned above). i attached a patch (against the cvs tree) to fix this at least on these debian and redhat installations.
I confirm the bug with my fresh new Red Hat Linux 7.2 system with ghc-5.02 . The supplied patch also corrects it. Regards, Romildo -- Prof. José Romildo Malaquias Departamento de Computação Universidade Federal de Ouro Preto Brasil http://iceb.ufop.br/~romildo romildo@iceb.ufop.br romildo@uber.com.br
participants (2)
-
José Romildo Malaquias
-
Malcolm Wallace