[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: multiply-defined symbols problem on solaris9 (libtool-1.5.18)

From: Ralf Wildenhues
Subject: Re: multiply-defined symbols problem on solaris9 (libtool-1.5.18)
Date: Fri, 19 Aug 2005 17:56:05 +0200
User-agent: Mutt/1.4.1i

Hi Derek,

* Derek Feichtinger wrote on Fri, Aug 19, 2005 at 05:32:03PM CEST:
> > Do you know whether -xar is safe to use for shared libraries?
> > A quick glance at the docs does not reveal any clue to me.
> I have too limited Solaris experience to answer that, but from what I
> see now it's probably not a good idea.

In your previous example, you use convenience archives.  It is one issue
whether they work with C++ templates, but is is a different matter
whether static or shared archives work well with C++ template
instantiation mechanisms.

> I can see now, that just doing this
> CC -G -nolib -hlibXrdSec.so.0 
> -o .libs/libXrdSec.so.0.0.0 .libs/XrdSecClient.o .libs/XrdSecPManager.o
>  .libs/XrdSecProtocolhost.o .libs/XrdSecServer.o ../XrdOuc/.libs/libXrdOuc.a 
> ../XrdNet/.libs/libXrdNet.a 
> ...
> without any kind of -QOptions also does the job (and this was actually
> used in the build system of the project which I am currently moving to
> autotools). I have dicovered some old mails on you list about the
> introduction of the QOptions with allextract, but it was in another
> context.

Never mind that mail; IIRC, that was merely about how to correctly pass
allextract through to the linker.

Please read both
  info Libtool "Static libraries"
and the info about convenience archives from this thread:
to learn about what exactly convenience archives are.
(to-be merged into documentation proper)

Then you can maybe decide if you need convenience archives.  I'm not
sure.  But if you do, and I'd guess so, then your link line above may
miss objects, silently.  And one of the users of your installed
libXrdSec.so.0 might complain much later.  So the approach with
might be the correct one for you.

Do any of the convenience archives you use in the broken link consist of
other subsumed convenience archives?  Maybe two even share the same?
(With templates, this does not have to be the case, but I'd like to make
sure, even if your previous mail hinted at the other cause.)

> > Meanwhile, can I ask a favor of you?  We've changed the code for
> > -no-undefined on Solaris, and I'd like a test with a real-world example
> > C++ package before I release 1.5.20 this weekend.  Could you try it (or 
> > point me to the package you're compiling so I can)? I could send you a 
> > bootstrapped Libtool tarball (off-list) if you like.
> Sure. I'll try to do it tomorrow morning or tonight. The bootstrapped Libtool 
> tarball would be easiest for me. What should I do to test it?

In another mail.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]