engine-helpers bug

Linas Vepstas linas@linas.org
Mon, 29 Oct 2001 13:25:04 -0600


On Mon, Oct 29, 2001 at 01:08:37PM -0600, Linas Vepstas was heard to remark:
> 
> I've got a bug that I am not sure how to hack around.
> 
> Since libgncengine.so doesn't exist any more, I assume that 
> libgncmod-engine.so is the right thing to link to.  However:
> 
> /usr/bin/perl: relocation error: /usr/local/lib/gnucash/libgncmod-engine.so.0: undefined symbol: gnc_engine_commodity_table_new
> 
> # grep gnc_engine_commodity_table_new *.c
> engine-helpers.c:gnc_engine_commodity_table_new (void)
> gnc-book.c:  book->commodity_table = gnc_engine_commodity_table_new ();
> 
> However engine-helpers.c is not a part of  libgncmod-engine.so,
> instead, its a part of libgw-engine.so which doesn't seem like the
> appropriate thing to link to, when using the non-g-wrapped version
> of the engine libraries.
> 
> What is the suggested fix for this?  At the moment, there is no way to
> use the engine without also invoking guile.  Is this really the intent?
> 
> --linas

One more thing:  by explicitly linking to libgw-engine.so, I
still can't use the engine:

main ()
{
gnc_engine_init(0,0);
gnc_session_new();
}

produces the following:

(gdb) r
Starting program:
/home/linas/src/xacc/gnucash-head/src/optional/swig/a.out 
[New Thread 1024 (LWP 28593)]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 1024 (LWP 28593)]
0x401e2ddc in scm_igc () from /usr/lib/libguile.so.9
(gdb) where
#0  0x401e2ddc in scm_igc () from /usr/lib/libguile.so.9
#1  0x401e2d63 in scm_gc_for_newcell () from /usr/lib/libguile.so.9
#2  0x402082ff in scm_makstr () from /usr/lib/libguile.so.9
#3  0x40208533 in scm_makfromstr () from /usr/lib/libguile.so.9
#4  0x40208590 in scm_makfrom0str () from /usr/lib/libguile.so.9
#5  0x4020a8d9 in scm_eval_0str () from /usr/lib/libguile.so.9
#6  0x401e678e in gh_eval_str () from /usr/lib/libguile.so.9
#7  0x4007ce47 in gnc_engine_commodity_table_new () at
engine-helpers.c:53
#8  0x4004cca4 in gnc_book_init (book=0x80498e0, session=0x8049858)
    at gnc-book.c:79
#9  0x4004ccfa in gnc_book_new (session=0x8049858) at gnc-book.c:93
#10 0x40053cd8 in gnc_session_init (session=0x8049858) at
gnc-session.c:123
#11 0x40053d31 in gnc_session_new () at gnc-session.c:136
#12 0x080485aa in main ()
#13 0x400b26ef in __libc_start_main () from /lib/libc.so.6




--linas


-- 
pub  1024D/01045933 2001-02-01 Linas Vepstas (Labas!) <linas@linas.org>
PGP Key fingerprint = 8305 2521 6000 0B5E 8984  3F54 64A9 9A82 0104 5933