Strange linking problem

Simon 'corecode' Schubert corecode at fs.ei.tum.de
Mon May 26 10:32:51 PDT 2008


Hasso Tepper wrote:
> The `boot_DynaLoader' symbol should come from
> /usr/pkg/lib/perl5/5.8.0/i386-dragonfly-thread-multi/auto/DynaLoader/DynaLoader.a.
> The point is that if I unpack DynaLoader.o from DynaLoader.a with ar -x 
> and replace DynaLoader.a with DynaLoader.o in the linking, it links (and 
> works, tested) fine.
> 
> Any ideas?

Could you check what libtool is doing to the arguments?  I suspect it reorders them and places DynaLoader.a *before* libnetsnmpagent.so.  Ld's default is only to include those objects of an archive, which are needed up to that point.  If libnetsnmpagent.so is specified later, it won't be able to make use of the contained DynaLoader.a.  There is a flag to change this behavior, I think.  The alternative is to reorder the arguments or to add DynaLoader.a at the end again.

cheers
  simon





More information about the Users mailing list