Re: Bug report: compiling macrolet with defun inside
Raymond Toy <[email protected]> Tue, 8 Apr 2025 07:43:01 -0700
| Newsgroups | gmane.lisp.gcl.devel |
|---|---|
| Message-ID | <[email protected]> |
On 4/7/25 2:12 PM, Raymond Toy wrote: > On 4/6/25 7:11 PM, Camm Maguire wrote: > >> Greetings, and thanks for your report! Should be fixed now -- please let >> me know if not. > > Yep, it’s fixed now. Took me a bit of time to rebuild successfully. I > always have trouble building gcl unless I have a completely fresh > checkout. > > But it’s all working now. Thanks! > One final note, perhaps. I installed the latest version of gcl and used it to build maxima. No issues there, once I removed all the old stale fasls. Appears to build just fine, but it won’t run. I get this: |$ ./maxima-local -g -l gcl Error: Fast links are on: do (si::use-fast-links nil) for debugging Signalled by "AN ANONYMOUS FUNCTION". INTERNAL-SIMPLE-UNDEFINED-FUNCTION: Cell error on RUN: Undefined function: Broken at NIL. 1 (abort) Return to debug level 5. 2 Return to debug level 4. 3 Return to debug level 3. 4 Return to debug level 2. 5 Return to debug level 1. 6 Return to top level. >>>>>>> | Haven’t spent any time debugging this. I don’t know gcl’s debugger at all. >> Take care, >> >> Raymond Toy<[email protected]> writes: >> >>> On 4/6/25 2:16 PM, Camm Maguire wrote: >>> >>> Greetings, and thank you so much for your report! >>> >>> I've pushed a fix to git branch gnu-build-system, which will appear in >>> release 2.7.0 shortly. >>> >>> Fantastic! I build 2.7.0 and can confirm the macrolet issue is fixed. >>> >>> However, I do have a build issue. I had to run autoconf again because I don’t have aclocal-1.17. Everything built fine. But then I did make install. When I run the >>> installed gcl, it can’t find /usr/lib/gcl-2.7.0/unixport/saved_gcl. I ran “configure –prefix=$HOME/dev/gcl-2.7.0”. There is saved_gcl in >>> $HOME/dev/gcl-2.7.0/lib/gcl-2.7.0/unixport/saved_gcl, as I would have expected. >>> >>> Take care, >>> >>> David Scherfgen<[email protected]> writes: >>> >>> Dear GCL developers, >>> >>> Here's another bug(?) I encountered. >>> >>> The following code works correctly when entering it directly into the REPL. But compiling it doesn't work correctly. >>> >>> Place this in a file bug.lisp: >>> >>> (macrolet ((impl (op) `(,op x y))) >>> (defun add (x y) (impl +))) >>> >>> This defines a function add (x y) with the body (+ x y). >>> Compile it: >>> >>> (compile-file "bug.lisp") >>> >>> The compiler gives some warnings that already indicate that something is wrong: >>> >>> ; (DEFUN ADD ...) is being compiled. >>> ;; Warning: The variable X is not used. >>> ;; Warning: The variable Y is not used. >>> >>> Load the compiled file and try to call add: >>> >>> (load "bug.o") >>> (add 3 4) >>> >>> The following error is shown: >>> >>> Condition in ADD [or a callee]: INTERNAL-SIMPLE-TYPE-ERROR: IMPL is not of type FUNCTION: >>> >>> The compiler failed to expand the impl macro and treated it like a function! >>> >>> Tested with GCL 2.6.14. >>> >>> Best regards >>> David Scherfgen >>> >>> ​ >>> > ​ ​