Opened 8 years ago

Closed 8 years ago

#361 closed defect (invalid)

COMPILE function fails

Reported by: Mariano Montone Owned by:
Priority: major Milestone:
Component: compiler Version:
Keywords: Cc:
Parent Tickets:

Description fails in the latest ABCL version:

This is what I get when I try to evaluate the example in CLHS:

(defun foo () "bar") => FOO

(compile 'foo)

Wrong number of arguments for #<FUNCTION {5236A94B}>.

[Condition of type PROGRAM-ERROR]


0: [RETRY] Retry SLIME REPL evaluation request.
1: [*ABORT] Return to SLIME's top level.
2: [ABORT] Abort thread.


0: (#<FUNCTION {752CC03}> #<PROGRAM-ERROR {600776A0}> #<FUNCTION


1: (APPLY #<FUNCTION {752CC03}> (#<PROGRAM-ERROR {600776A0}>

#<FUNCTION {752CC03}>))


{600776A0}> #<FUNCTION {752CC03}>)

4: org.armedbear.lisp.Lisp.error(


6: org.armedbear.lisp.CompiledClosure?.execute(CompiledClosure?.java:212)
7: org.armedbear.lisp.CompiledClosure?.execute(CompiledClosure?.java:121)


9: org.armedbear.lisp.Symbol.execute(

10: org.armedbear.lisp.compiler_pass2_387.execute(compiler-pass2.lisp:7495)
11: org.armedbear.lisp.compiler_pass2_370.execute(compiler-pass2.lisp:7450)
12: org.armedbear.lisp.CompiledClosure?.execute(CompiledClosure?.java:98)
13: org.armedbear.lisp.Symbol.execute(
14: org.armedbear.lisp.compiler_pass2_386.execute(compiler-pass2.lisp:7495)
15: org.armedbear.lisp.Symbol.execute(
16: org.armedbear.lisp.compiler_pass2_388.execute(compiler-pass2.lisp:7519)
17: org.armedbear.lisp.CompiledClosure?.execute(CompiledClosure?.java:109)
18: org.armedbear.lisp.Symbol.execute(
19: org.armedbear.lisp.compiler_pass2_392.execute(compiler-pass2.lisp:7589)
20: org.armedbear.lisp.CompiledClosure?.execute(CompiledClosure?.java:98)
21: org.armedbear.lisp.LispThread?.execute(LispThread?.java:814)
22: org.armedbear.lisp.Lisp.evalCall(
23: org.armedbear.lisp.Lisp.eval(
24: org.armedbear.lisp.Primitives$pfeval.execute(

I'm not using this directly, but some libraries like closer-mop, need
compile to work.

Fails here:

CL-USER> (lisp-implementation-type)
"Armed Bear Common Lisp"
CL-USER> (lisp-implementation-version)

It seems to work in some cases on ABCL 1.3.1, though.

CL-USER> (compile 'foo)

But something like this signals an error:

CL-USER> (compile nil '(lambda (x) x))
; Evaluation aborted on #<PROGRAM-ERROR {4C62C417}>.

With the same error above.

CL-USER> (lisp-implementation-version)

Change History (3)

comment:1 Changed 8 years ago by Mariano Montone

Summary: compile function failsCOMPILE function fails

comment:2 Changed 8 years ago by Mark Evenson

As I noted in my email to armedbear-devel@, I cannot reproduce this in either abcl-1.3.1 nor SVN HEAD, and find this problem somewhat mysterious.

And the CLOSER-MOP test suite continues to pass its tests as far as I can tell.

Perhaps one can try invoking abcl directly with '--noinit' to factor out problems with initialization:

illin:~/work/illithid$ abcl --noinit --eval '(if (compile nil (quote (lambda (x) x))) (format t "Succeeded.") (format t "Failed."))'
Armed Bear Common Lisp 1.3.1
Java 1.8.0 Oracle Corporation
Java HotSpot(TM) 64-Bit Server VM
Low-level initialization completed in 0.231 seconds.
Startup completed in 1.125 seconds.
Type ":help" for a list of available commands.

I suppose this could be a problem with openjdk7 under Linux, but I would be surprised.

comment:3 Changed 8 years ago by Mariano Montone

Resolution: invalid
Status: newclosed

This works fine in a clean version of ABCL. The problem occurs after loading a couple of packages, so the problem may be in those packages, that may be rewriting things? I don't know...

Note: See TracTickets for help on using tickets.