[Gecode] Attempt at building libraries
Guido Tack
tack at ps.uni-sb.de
Mon Mar 22 15:03:10 CET 2004
Hi!
I have tried building gecode using automake/autoconf. This works perfectly,
except for one problem: The way how variable modification boards are handled.
This is the only place where we have an indirect link from the kernel to the
variables, because the initialisation of the vmb array is done by the
variables, and the kernel just iterates over the array.
In my setup, I build a static library which the executable is then linked
against. Now if a program only uses int vars, fs/core.o won't be linked into
the binary, resulting in a segfault when the kernel tries to access
vmb[VTI_FS]. I see three possible solutions:
1) Use a dynamic library instead - all object files are always loaded
2) Initialise the vmb with dummy values
3) Implement a subscription mechanism for variable types: Before first use, a
variable type has to register with the kernel, and the number of registered
variables and their type ids are handled dynamically
What do you think? I don't know how big the performance overhead of 3) would
be, I guess at least it's a clean solution. On the other hand, 2) should be
relatively simple to implement.
Guido
--
Guido Tack
Programming Systems Lab
http://www.ps.uni-sb.de/~tack
More information about the gecode-users
mailing list