[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Weird problem with LIBADD
From: |
Robert Boehne |
Subject: |
Re: Weird problem with LIBADD |
Date: |
Fri, 06 Oct 2006 15:52:39 -0500 |
User-agent: |
Mozilla Thunderbird 1.0.8-1.1.fc4 (X11/20060501) |
Ralf Wildenhues wrote:
* Sylvestre Ledru wrote on Fri, Oct 06, 2006 at 04:24:14PM CEST:
Show how you create this library:
$(top_builddir)/modules/signal_processing/libsignal_processing.la
(i.e., the command line used to create it). It looks like it depends on
libcore.la (which would be a circular dependency).
Pff, Ok, you are right. It was my fault. There are many cyclics deps in
the library of the software that I am building and it can be quite
boring...
I guess it is not very easy for you to detect this kind of things but if
you could, it would be great (the error message is not explicit).
Sounds like a good idea to try this at least. I added this to Libtool
TODO list: [1]http://wiki.azazil.net/GnuLibtoolProject/RoadMap
Cheers,
Ralf
The best thing to do with circular dependencies is to untangle them
so they aren't circular anymore. There are major problems
with trying to maintain a set of libraries that have circular dependencies.
Portability is one issue, another is the fact that you'll get problems
like the one in your original post.
I would think that most software engineers
(as opposed to physicists - *wink*) would liken supporting
circular lbrary dependencies to designing an automobile that still
ran even when lage amounts of tar were put in the gas tank.
It can be done (with great expense), but wouldn't it be better
to not put the tar in the gas tank in the first place?
The best way to fix this is to organize your software
to have separate libraries that have a particular purpose,
with a "pyramid" structure. More low level libraries at the
bottom, and fewer, higher-level libraries at the top.
If you can't get the time to do it right, you can cheat by
putting all the libraries in a circular dependency loop
into a single library. Another potential method of cheating
is to wait until runtime to load them (i.e. use dlopen).
HTH,
Robert Boehne
References
1. http://wiki.azazil.net/GnuLibtoolProject/RoadMap