code in cvs is broken

Bill Gribble
02 Apr 2002 07:56:08 -0600

On Tue, 2001-11-13 at 23:33, Linas Vepstas wrote:
> There is no gw-gnc.h that I can find, and gw-gnc-module.h doesn't seem
> to do the trick.   I presume there's some valid excuse for having 
> code in CVS that won't compile ??

I checked in a slightly less cheesy version of your fix, which smoothes
things over for the time being, but it bears discussing what the problem
actually was, why we got into that state, and what's going on overall. 

The proximate problem was one of compile ordering and mutual
dependencies.  The gw-gnc.{c,h} files are generated during the build of, the "miscellaneous g-wrap bindings" module.
g-wraps a lot of the Gnome dialogs and other functions from  In order for Guile to know it must load
along with, we link into at
link time. 

That means has to be built before However,
top-level.c included gw-gnc.h, meaning that has to be built
before AAAH!

In this case, the simplest solution is just to remove the #include of
gw-gnc.h from top-level.c ... it's not needed any more.  But this
problem is likely to come up more in the next few weeks, as we get
closer to completing the project that got all this started: the move
from the Gnucash executable being a C program to it being a Scheme

This means that there's no big climactic link step to resolve all the
symbols that point hither and thither between .c files.  We have to
break cycles of mutual dependency and structure the individual modules
so that they can be linked into completely-resolved libraries, so that
we can open them with dlopen and get all the necessary symbols.  

As you found out, the failure mode of this kind of development is the
state where you can recompile a previously-compiled tree but can't
compile from 'make clean'.  I think people should be frequently
rebuilding from make clean as a test, but practically, there are going
to be some times when things get checked in that won't compile from make
clean.  So report them for sure but don't be too surprised when they
crop up.