[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Errors using Guile 2.0 vs. Guile 1.8
From: |
Mark H Weaver |
Subject: |
Re: Errors using Guile 2.0 vs. Guile 1.8 |
Date: |
Sun, 29 Jan 2012 17:26:26 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.0.92 (gnu/linux) |
Hi Paul,
Paul Smith <address@hidden> writes:
> To test my GNU make Guile integration I was using guile 1.8 which is
> what my distribution provided. To test the newer Guile 2.x I downloaded
> the Guile 2.0.3 release and built it and installed in an alternate
> location (/opt/guile). I compiled GNU make using that version, and all
> the tests ultimately work BUT whenever I use (define ...) from within
> GNU make I get these errors:
>
> $ cat g1.mk
> define show
> (define (show s)
> (display s)
> (newline))
> endef
> $(info define display)
> $(guile $(show))
> $(info after define)
> $(guile (show "HI"))
> all:;
>
> $ make -f g1.mk
> define display
> Backtrace:
> In ice-9/boot-9.scm:
> 162: 5 [catch #t #<catch-closure 1cb55c0> ...]
> 170: 4 [#<procedure 1cb8cd0 ()>]
> In unknown file:
> ?: 3 [catch-closure]
> In ice-9/eval.scm:
> 389: 2 [eval # #]
> 374: 1 [eval # #]
> In unknown file:
> ?: 0 [scm-error misc-error #f ...]
>
> ERROR: In procedure scm-error:
> ERROR: Unknown object: #<variable 1cd0180 value: #<procedure 1cb95a0
> at ice-9/eval.scm:378:13 (a)>>
> after define
> HI
> make: `all' is up to date.
>
> I don't know what this means, or how to proceed with debugging. The
> same code works fine with Guile 1.8.
The relevant difference is that in Guile 1.8, (define foo ...) returns
#<unspecified>, but in Guile 2 it returns the 'variable' object for
'foo'. Variables are first-class objects that can be accessed or
modified using various functions. See "Variables" in the Guile manual
for more:
http://www.gnu.org/software/guile/manual/html_node/Variables.html
My guess is that your code that converts the final results into strings
handles SCM_UNSPECIFIED properly, but fails to cope with variable
objects.
Regards,
Mark