[asterisk-dev] [asterisk-commits] file: trunk r95648 - /trunk/codecs/Makefile

Joshua Colp jcolp at digium.com
Tue Jan 1 13:57:13 CST 2008

> I just noticed the bug, but I think the proper workaround is at the
> end of this email (i need to add more comments though).
> The original code (and your patch) are able to build
> codec_resample.so even without the (static) library, because
> the dynamic linker does not care about all symbols being resolved.
> However you won't be able to load it because symbols from libresample.a
> will not be resolved at load time.

Correct. The linker is being smart and since nothing in the main asterisk binary is actually using any of the symbols from libresample.a it's not actually linking them in so stuff goes kaboom. It was ultimately decided to put this in the main binary since other things are going to be using it. We can either get the linker to link it in regardless (which would fix the issue), just make it a separate module and keep it out of the core (I wonder if it would suffer the same issue...), or go down the route below and build it at the start and link  it against each thing that needs to use it.
> I am not sure how Russell managed to test it but perhaps it was
> available elsewhere e.g. in chan_console ?

It was done differently previously, he may not have tested this new way.

> Note, mine is just a workaround - because 'main/' is a special
> directory in terms of build order, i think the various static
> libraries that we build with asterisk should be located in some
> directory other than main/ so we make sure they are built first.
> 	cheers
> 	luigi

Joshua Colp
Software Developer
Digium, INc.

More information about the asterisk-dev mailing list