Clozure / ccl

Clozure Common Lisp
http://ccl.clozure.com
Apache License 2.0
840 stars 105 forks source link

When build 3d-math package, get an error: CCL::COMPLIER-FUNCTION-OVERFLOW #488

Open DavidAlphaFox opened 1 month ago

DavidAlphaFox commented 1 month ago

Dear author

When I use quicklisp to build the 3d-math library. When the ccl compiles the file matrices/ops.lisp I get the error: CCL::COMPLIER-FUNCTION-OVERFLOW . I use the ccl-1.12 on x64's FreeBSD 14.0-RELEASE-p6 and Debian 12.5.

Thanks

xrme commented 1 month ago

When I tried to quickload the 3d-math system (on darwin/x8664), I got an error, but a different one:

> Error: Invalid program: The DECLARE expression (DECLARE (FTYPE (FUNCTION ((OR IVEC4 DVEC4 VEC4 IVEC3 DVEC3 VEC3 IVEC2 DVEC2 VEC2)) (VALUES (OR I32 F64 F32) &OPTIONAL)) VX)) is being treated as a form,
>        possibly because it's the result of macroexpansion. DECLARE expressions
>        can only appear in specified contexts and must be actual subexpressions
>        of the containing forms.
> While executing: #<Anonymous Function #x302000BFDB9F>, in process listener(1).
> Type :POP to abort, :R for a list of available restarts.
> Type :? for other options.

It's pretty unusual to see compiler-function-overflow when using an x86-64 CCL.

If I had a smaller test case that shows the issue, I could take a closer look.

DavidAlphaFox commented 1 month ago

When I tried to quickload the 3d-math system (on darwin/x8664), I got an error, but a different one:

> Error: Invalid program: The DECLARE expression (DECLARE (FTYPE (FUNCTION ((OR IVEC4 DVEC4 VEC4 IVEC3 DVEC3 VEC3 IVEC2 DVEC2 VEC2)) (VALUES (OR I32 F64 F32) &OPTIONAL)) VX)) is being treated as a form,
>        possibly because it's the result of macroexpansion. DECLARE expressions
>        can only appear in specified contexts and must be actual subexpressions
>        of the containing forms.
> While executing: #<Anonymous Function #x302000BFDB9F>, in process listener(1).
> Type :POP to abort, :R for a list of available restarts.
> Type :? for other options.

It's pretty unusual to see compiler-function-overflow when using an x86-64 CCL.

If I had a smaller test case that shows the issue, I could take a closer look.

If we use the 3d-math in quicklisp's dist, we will get this error message, because it is very old. I use the 3d-math from shirakumo's dist.

We can reproduce the overflow error by

(ql-dist:install-dist "http://dist.shirakumo.org/shirakumo.txt")
(ql:quickload :3d-math)

And I don't have a Mac, so I don't know could it produce the same error or not on MacOSX.

compiler-function-overflow