Subject: [clisp-list] def-call-in problem

From: Peter Wood <[email-masked]>
Date: Tue Mar 26 06:48:12 2002

Hi,

Using 2.28 (well, CVS, actually)  on Gnu/Linux:

When I try to compile the following test, clisp-link drops me into
clisp with the error message:

*** - The value of *terminal-io* was not a stream: #<closed terminal-stream>. It has been changed to #<io terminal-stream>.

I have _NO_ idea why terminal streams should be involved in compiling
ffi stuff.  This is just a test, but I am getting the same error (plus
a nice consistent sigsegv) in a module I am working on.

-------
;alpha.lisp

(defpackage "TESTCI" (:use "FFI" "LISP"))

(in-package "TESTCI")

(def-call-in decider
  (:arguments (txt c-string))
  (:return-type int))

(def-call-out test_decider
  (:arguments)
  (:return-type int))

(defun test ()
  (test_decider))

(defun decider (string)
  (if (string= string "xxx")
      1
    0))
;end
-----------

/*beta.c*/

extern int decider (char *txt);

int test_decider();

int test_decider() {
  int rv;
  rv = decider("xyz");
  return rv;
}	
 
/*end*/
------------

I am issuing these commands in a directory with linkkit and base.

clisp-link create-module-set test alpha.c
gcc -c beta.c
cd test
ln -s ../beta.o beta.o
#add beta.o to NEW_LIBS and NEW_FILES in link.sh
cd ..
./base/lisp.run -M base/lispinit.mem -c alpha.lisp
clisp-link add-module-set test base base+test

everything goes ok, except the final command results in the above
mentioned error.

What am I doing wrong?
How does *terminal-io* come into it?
?????????????

Regards,
Peter

---

From: Peter Wood <[email-masked]>
Date: Wed Mar 27 08:26:05 2002

On Tue, Mar 26, 2002 at 03:35:01PM +0100, I wrote:
> _______________________________________________
> clisp-list mailing list
> [email-masked]
> https://lists.sourceforge.net/lists/listinfo/clisp-list
> 

Hi

Has anyone tried it?

I was using a 'full' directory renamed to 'base'.  Now I tried it with
the old base directory, and I _also_ get the sigsegv which I have been
getting in my own module.  Hah, hah. 

What gives?

Regards,
Peter