Subject: [clisp-list] clisp-2.30 build problems on Red Hat Linux 6.2

From: "Dave Richards" <[email-masked]>
Date: Sat Sep 28 09:47:03 2002

I notice that the configure script has reduced the number of command line
arguments to makemake in 2.30 from that in 2.28.

<
./makemake  --prefix=/home/dave/clisp --with-readline --with-gettext --with-
dynamic-ffi > Makefile
---
> ./makemake --with-dynamic-ffi  --prefix=/home/dave/clisp   > Makefile

The build output is included:

---

From: Sam Steingold <[email-masked]>
Date: Sat Sep 28 17:19:06 2002

> * In message <[email-masked]>
> * On the subject of "[clisp-list] clisp-2.30 build problems on Red Hat Linux 6.2"
> * Sent on Sat, 28 Sep 2002 09:46:47 -0700
> * Honorable "Dave Richards" <[email-masked]> writes:
>
> gcc -W -Wswitch -Wcomment -Wpointer-arith -Wimplicit -Wreturn-type  -fomit-frame-pointer -Wno-sign-compare -O2 -fexpensive-optimizations -DUNICODE -DDYNAMIC_FFI -DNO_GETTEXT -DNO_SIGSEGV -I. -c stream.c
> In file included from stream.d:8:
> lispbibl.d:7183: warning: register used for two global register variables
> stream.d: In function `lisp_completion':
> stream.d:9182: warning: variable `array' might be clobbered by `longjmp' or `vfork'
> stream.d:9189: warning: variable `ptr' might be clobbered by `longjmp' or `vfork'
> stream.d:9205: warning: variable `ptr1' might be clobbered by `longjmp' or `vfork'
> stream.d: In function `rd_ch_terminal3':
> stream.d:9753: `rl_already_prompted' undeclared (first use in this function)
> stream.d:9753: (Each undeclared identifier is reported only once
> stream.d:9753: for each function it appears in.)
> stream.d: In function `make_terminal_stream_':
> stream.d:10070: `rl_gnu_readline_p' undeclared (first use in this function)
> stream.d: In function `init_streamvars':
> stream.d:15296: warning: assignment from incompatible pointer type
> stream.d: In function `rl_memory_abort':
> stream.d:15410: warning: implicit declaration of function `rl_deprep_terminal'
> stream.d:15412: `rl_gnu_readline_p' undeclared (first use in this function)
> make: *** [stream.o] Error 1

I think you have a _very_ old readline version (where everything was
called "foo" instead of "rl_foo" in the newer readline)
Could you please look at unixconf.h in your build directory and see
what READLINE_FILE_COMPLETE is being defined to?
Could you please also look at <readline/readline.h> and see whether it
declares `already_prompted' (instead of 'rl_already_prompted') and
`gnu_readline_p' (instead of `rl_gnu_readline_p') &c.
Thanks.
If this is the case, please do _NOT_ upgrade your readline!!!
I will work out a patch and ask you to try it.
(the easiest way would be for you to use the CVS, of course :-)

you can also do

$ ./configure --without-readline --build build-no-readline

-- 
Sam Steingold (http://www.podval.org/~sds) running RedHat7.3 GNU/Linux
<http://www.camera.org> <http://www.iris.org.il> <http://www.memri.org/>
<http://www.mideasttruth.com/> <http://www.palestine-central.com/links.html>
Life is like a diaper -- short and loaded.

---

From: "Dave Richards" <[email-masked]>
Date: Sat Sep 28 18:12:02 2002

> what READLINE_FILE_COMPLETE is being defined to?

/* CL_READLINE */
/* Define if you have <readline/readline.h>. */
#define HAVE_READLINE_READLINE_H 1
/* Define as const if the declaration of filename_completion_function()
   needs const in the first argument */
#define READLINE_CONST
/* The readline built-in filename completion function, either
   rl_filename_completion_function() or filename_completion_function() */
#define READLINE_FILE_COMPLETE filename_completion_function

> `gnu_readline_p' (instead of `rl_gnu_readline_p') &c.

I find no reference to already_prompted nor gnu_readline_p at all, either
with or without the rl_ prefix.  I grepped all files in
/usr/include/readline just to be sure.

> (the easiest way would be for you to use the CVS, of course :-)

I promise I'll go read the CVS thing.  You needn't make a patch.  It'll
motivate me to set CVS up.

	Thanks!

	Dave

---

From: Sam Steingold <[email-masked]>
Date: Sun Sep 29 14:35:06 2002

> * In message <[email-masked]>
> * On the subject of "RE: [clisp-list] clisp-2.30 build problems on Red Hat Linux 6.2"
> * Sent on Sat, 28 Sep 2002 18:11:41 -0700
> I find no reference to already_prompted nor gnu_readline_p at all,
> either with or without the rl_ prefix.  I grepped all files in

I think your readline is too old for us to use.
sorry.

please apply the appended patch and reconfigure.
you should successfully build without readline (the deficiency should be
detected and your readline should be ignored.)

only after that you will need to upgrade your readline (if you wish
CLISP to use it).

BTW, what does "rpm -q readline" says?

thanks!

-- 
Sam Steingold (http://www.podval.org/~sds) running RedHat7.3 GNU/Linux
<http://www.camera.org> <http://www.iris.org.il> <http://www.memri.org/>
<http://www.mideasttruth.com/> <http://www.palestine-central.com/links.html>
MS: Brain off-line, please wait.

Index: src/configure
===================================================================
RCS file: /cvsroot/clisp/clisp/src/configure,v
retrieving revision 1.68
diff -u -w -b -r1.68 configure
--- src/configure	20 Sep 2002 13:29:52 -0000	1.68
+++ src/configure	29 Sep 2002 21:31:53 -0000
@@ -21687,6 +21687,7 @@

+if test $ac_cv_search_tgetent != no ; then

     use_additional=yes
@@ -22063,7 +22064,6 @@
     done
   fi
 
-if test $ac_cv_search_tgetent != no ; then
 
 for ac_header in readline/readline.h
 do
@@ -22178,6 +22178,52 @@
 
 done
 
+  echo "$as_me:$LINENO: checking for rl_already_prompted" >&5
+echo $ECHO_N "checking for rl_already_prompted... $ECHO_C" >&6
+  cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+
+#include <stdio.h>
+#include <readline/readline.h>
+
+#ifdef F77_DUMMY_MAIN
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+rl_already_prompted = 1;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_header_readline_readline_h=yes
+  echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_header_readline_readline_h=no
+  echo "$as_me:$LINENO: result: no; readline is too old and will not be used" >&5
+echo "${ECHO_T}no; readline is too old and will not be used" >&6
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
   if test $ac_cv_header_readline_readline_h = yes ; then
     echo "$as_me:$LINENO: checking for library containing readline" >&5
 echo $ECHO_N "checking for library containing readline... $ECHO_C" >&6

---

From: "Dave Richards" <[email-masked]>
Date: Sun Sep 29 17:28:02 2002

> only after that you will need to upgrade your readline (if you wish
Which means it's better to stay on 2.29. :)  I guess I am going to have to
get serious about upgrading my system.  Bah!

> BTW, what does "rpm -q readline" says?
% rpm -q readline
readline-2.2.1-6

---

From: Sam Steingold <[email-masked]>
Date: Sun Sep 29 18:31:03 2002

> * In message <[email-masked]>
> * Sent on Sun, 29 Sep 2002 17:27:00 -0700
> Which means it's better to stay on 2.29. :)

nope.

> I guess I am going to have to

just install readline-4.3 from the sources.
but first make sure that the cvs clisp does not use your old readline.
then you can configure clisp with
./configure --with-readline=/usr/local/src/readline-4.3 ...
(or something like that, try ./src/configure --help for details)

> > BTW, what does "rpm -q readline" says?

yuk!

-- 
Sam Steingold (http://www.podval.org/~sds) running RedHat7.3 GNU/Linux
<http://www.camera.org> <http://www.iris.org.il> <http://www.memri.org/>
<http://www.mideasttruth.com/> <http://www.palestine-central.com/links.html>
Bill Gates is not god and Microsoft is not heaven.