Circular dependencies between libinnhist and libstorage
eagle at eyrie.org
Wed Apr 15 22:04:00 UTC 2015
Julien ÉLIE <julien at trigofacile.com> writes:
> I recently tried to build INN 2.6.0 on an Ubuntu VM (12.04.1 LTS)
> provided by the GCC C Farm, and found out that the build fails
> because of the "$(LIBHIST) $(LIBSTORAGE)" order.
The root of this mess is that storage/expire.c calls libhist functions,
but libhist wants to call IsToken, TextToToken, and TokenToText, which are
This is just broken -- libraries with circular dependencies are always a
bug and need to be fixed. The dependency on libhist in libstorage is
probably hardest to break, since expiration is based on history and it
really needs the full history functionality. IsToken, TextToToken, and
TokenToText are small, standalone functions with no futher dependencies.
The best solution is probably to just move those three functions to
libinn, at which point libhist will no longer have any dependency on
libstorage. That's kind of unfortunate, since the exact format of storage
tokens is properly the domain of libstorage, but meh, that's a very
theoretical problem and this is a very concrete one.
Russ Allbery (eagle at eyrie.org) <http://www.eyrie.org/~eagle/>
Please send questions to the list rather than mailing me directly.
<http://www.eyrie.org/~eagle/faqs/questions.html> explains why.
More information about the inn-workers