[Ecls-list] Two more problems

Rolf Wester wester at ilt.fraunhofer.de
Fri Dec 6 02:05:01 UTC 2002


Hi,

I downloaded the CVS-tree and rebuilt ECLS. No regexp.lisp
compiles without problems.

Unfortunately I ran into two more problems.

I tried the following example code that I found in "ecldev.html".
This compiles but at load-time I get a segmentation fault.

(Clines "

       int tak(x, y, z)
       int x, y, z;
       {      if (y >= x) return(z);
               else return(tak(tak(x-1, y, z),
                               tak(y-1, z, x),
                               tak(z-1, x, y)));
       }
"
)

;;;  TAK calls the C function tak defined above.
(defentry tak (int int int) (int tak))


> (compile-file "c-test.lisp")
			  
;;; Loading "/home/wester/usr/ecls/lib/ecl/cmp.so"
;;; Compiling c-test.lisp.
;;; Compiling (DEFENTRY TAK ...).
;;; The variable TAK is undefined.
;;; The compiler will assume this variable is a global.
;;; The variable INT is undefined.
;;; The compiler will assume this variable is a global.
;;; End of Pass 1.  
;;; Calling the C compiler... 
"gcc -g -O2 -fstrict-aliasing -Dlinux  -O -
I/home/wester/usr/ecls/lib/ecl//h -w -c c-test.c -o c-test.o" 
"gcc -shared -o c-test.so -L/home/wester/usr/ecls/lib/ecl/ c-test.o  " 
;;; OPTIMIZE levels: Safety=0 (No runtime error checking), Space=0, 
Speed=3
;;; Finished compiling c-test.lisp.
#P"c-test.so"
> (load "c-test")
;;; Loading "/home/wester/usr/local/cmucl18d/lib/cmucl/lib/mylibs/c-
test.so"
Segmentation violation.
Wrong type argument to a compiled function.
Broken at LOAD.
>> 

----------------------------------------------------------------------------------------

The 2. problem is:

(defun get-package-symbols (package &key (describe nil))
  (let ((pack (find-package package)))
	(if (eql nil pack)
		(format "No package ~A~%" package) 
	    (loop for s being each external-symbol of (find-package 
package) do
		  (if describe
			  (progn (describe s) (terpri) (princ "--------------
---------------------------"))
			  (print s))))))


> (get-package-symbols 'si)
The function #:G119 is undefined.
Broken at GET-PACKAGE-SYMBOLS.



Did I do anything wrong? I would be very appreciative for help.

Rolf Wester-------------------------------------
Dr. Rolf Wester
Grundlagen
Fraunhofer Institut fuer Lasertechnik
Steinbachstrasse 15
52074 Aachen
E-Mail: rolf.wester at ilt.fraunhofer.de
Tel.: + 49(0)241 8906 - 401
Fax : + 49(0)241 8906 - 121





More information about the ecl-devel mailing list