Guile 1.8 error

Mike Alexander mta at
Thu Dec 27 01:47:02 EST 2007

--On December 25, 2007 9:45:31 AM -0500 Derek Atkins <warlord at MIT.EDU> 

> Hi,
> Quoting Mike Alexander <mta at>:
>> Is Gnucash (as of r16711) supposed to work with Guile 1.8.3?
>> Macports
> I don't think it's ever been tested.  It's known to have some issues
> with the combination of guile 1.8 and slib that MacPorts has been
> using for a while, but I don't know about any 1.8 issues specifically.

Just FTR here's what I've found out so far.  The immediate problem 
(memoize failure loading saved reports) is because of this code at the 
beginning of guile.init in slib (both 3a3 and 3a5 and probably earlier 

(define base:define define)
(define define
   (lambda (exp env)
     (cons (if (= 1 (length env)) 'define-public 'base:define) (cdr

This has the effect of redefining "define" so "(define fun stuff)" is 
converted to something a bit like

    (define-private fun stuff)
    (export fun)

This is a simplification, but the effect is to export all top level 
defines.  It appears that mixing define's and expressions in a (begin 
...) has always been illegal in Scheme, but prior to guile 1.8 you 
could get by with it.  In 1.8 you can't.  I don't know why this isn't 
bothering anyone else.

I put a horrible kluge at the end of main.scm in Gnucash to fix this, 
just reset define back to the way it was:

  (define define base:define)

This lets Gnucash load.

I also had to change since loading some of the srfi 
modules causes a stack overflow in guile 1.8.  This patch is attached, 
hopefully without line wrapping.

With these changes Gnucash loads and more or less runs, but when I 
tried to update quotes it hung trying to spawn the process to run the 
Perl script.  The top of the stack is

#0  0x900148a4 in read ()
#1  0x02ba8550 in read_ints ()
#2  0x02ba92f0 in fork_exec_with_pipes ()
#3  0x02ba99ac in g_spawn_async_with_pipes ()
#4  0x007883b0 in gnc_spawn_process_async (argl=0x9f1a930, 
search_path=1) at 
#5  0x00776f84 in _wrap_gnc_spawn_process_async (s_0=0x18, s_1=0x104) 
at swig-app-utils.c:1905
#6  0x0287bea4 in deval (x=0x404, env=0x64c1760) at eval.c:4349
#7  0x02877dbc in deval (x=0x63135f8, env=0x64c1760) at eval.c:3689
#8  0x0287deec in scm_dapply (proc=0x64c1860, arg1=0x404, 
args=0x64c1760) at eval.c:5001
#9  0x02870394 in scm_apply (proc=0x64c1850, arg1=0x404, args=0x404) at 
#10 0x0286fee0 in scm_call_0 (proc=0x64c1850) at eval.c:4655
#11 0x02859788 in scm_dynamic_wind (in_guard=0x64c1850, 
thunk=0x64c1820, out_guard=0x64c17f0) at dynwind.c:104

This is where I'm giving up.  I'll go back to guile 1.6, but I thought 
I should record what I've learned.

Mike Alexander           mta at
Ann Arbor, MI            PGP key ID: BEA343A6
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: text/x-patch
Size: 396 bytes
Desc: not available
Url : 

More information about the gnucash-devel mailing list