Bad control characters in GHCi 6.6 (Mac OS X PPC)
Thorkil Naur
naur at post11.tele.dk
Tue Nov 21 14:24:56 EST 2006
Hello,
I am trying to reproduce the problem reported as "#898: GHC compiles against
Apple's readline, giving error". On my PPC Mac OS X 10.3 Panther, however, I
have managed to build ghc-6.6 without running into this particular problem.
Initially without gnu readline, the resulting GHCi is, of course, without
readline support. And after installing readline 5.1 via Darwin/MacPorts
into /opt/local, I can re-build and this time get a GHCi with readline
support, provided I "./configure --with-readline-includes=/opt/local/include/
--with-readline-libraries=/opt/local/lib".
The reason for the error is stated as "The bug is really that Apple symlinks
libreadline to libedit", but my system does not contain such a symlink. Is it
possible to set up this masquerading on a Mac OS X 10.3? Or would I need to
upgrade to 10.4? Or could something else again be required?
Thanks and regards
Thorkil
On Saturday 04 November 2006 00:14, Deborah Goldsmith wrote:
> On Oct 30, 2006, at 2:40 PM, Deborah Goldsmith wrote:
> > I think I have this partially figured out.
>
> The following patch to libraries/readline/configure.ac seems to do
> the trick for Darwin:
>
> --- configure.ac.save 2006-10-10 12:09:04.000000000 -0700
> +++ configure.ac 2006-11-02 17:32:50.000000000 -0800
> @@ -43,7 +43,10 @@
> dnl ** is our readline really readline, or is it BSD's libedit?
> if test x"$HaveLibReadline" = xYES ; then
> - AC_CHECK_LIB(readline, rl_readline_version, ReadlineIsLibedit=NO,
> ReadlineIsLibedit=YES)
> + AC_CHECK_DECL(rl_readline_version, ReadlineIsLibedit=NO,
> ReadlineIsLibedit=YES,
> +[#include <stdio.h>
> +#include <readline/readline.h>
> +])
> fi
> if test $HaveLibTermcap = YES && test x"$HaveLibReadline" = xYES &&
> test x"$ReadlineIsLibedit" = xNO ; then
> @@ -56,9 +59,12 @@
> AC_SUBST(READLINE_LIBS)
> if test x"$HaveLibReadline" = xYES && test x"$ReadlineIsLibedit" =
> xNO ; then
> - AC_CHECK_LIB(readline, rl_erase_empty_line,
> + AC_CHECK_DECL(rl_erase_empty_line,
> [AC_DEFINE([HAVE_READLINE_4], [1], [Define to 1 if readline has
> version >= 4.0.])],
> - [AC_DEFINE([HAVE_READLINE_4], [0], [Define to 1 if readline has
> version >= 4.0.])])
> + [AC_DEFINE([HAVE_READLINE_4], [0], [Define to 1 if readline has
> version >= 4.0.])],
> +[#include <stdio.h>
> +#include <readline/readline.h>
> +])
> AC_CHECK_LIB(readline, rl_free_undo_list,
> [AC_DEFINE([HAVE_READLINE_4_2], [1], [Define to 1 if readline
> has version >= 4.2.])],
> [AC_DEFINE([HAVE_READLINE_4_2], [0], [Define to 1 if readline
> has version >= 4.2.])])
>
> When I build with this patch after configuring to look for GNU
> readline in /usr/local, everything works. I don't know if this
> particular patch will work well on other systems. Maybe folks could
> try it out?
>
> Thanks,
> Deborah
>
> _______________________________________________
> Glasgow-haskell-users mailing list
> Glasgow-haskell-users at haskell.org
> http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
>
More information about the Glasgow-haskell-users
mailing list