bug-libtool
[Top][All Lists]
Advanced

[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: Tue, 30 Aug 2005 09:43:43 +0200
User-agent: Mutt/1.4.1i

Hi Derek,

* Derek Feichtinger wrote on Tue, Aug 30, 2005 at 09:19:04AM CEST:
> 
> I have more or less given up to get the project I am porting to autotools to 
> compile on Solaris9 with the Forte-7 compiler. With the newer Sun compilers 
> it works well, so I think it does not pay off to do a lot of crazy tricks to 
> get this infamous combination to work.

OK.

> Details for those who are interested:
> 
> The problem has to do with the C++ template instantiation mechanism used in 
> this old compiler:
> - In every directory where an object is created, the compiler places a 
> SunWS_cache directory with the template related objects.

What you could try to use only one big Makefile (see "info Automake
Alternative") and do not build convenience libraries at all, but go
straight for the output library.

> - The symbols in these objects are not (as in other compilers) defined as 
> weak.

That itself is not the biggest problem.  The issue with subdirectories
is usually that the linker does not find the corresponding
cache/template directories.

> This completely prevents the sensible use of convenience libraries and 
> integrating them in an encompassing shared library, because if two of them 
> work with the same template instantiations, one gets multiply defined 
> symbols.

If someone can give me access to both this compiler suite (a login or a
debug-over-email session would both work) and possibly also to the
project or a small example that reproduces the failures, I could look
into this issue myself.  It'd be a few weeks, though, other issues are
more important at the moment.

> One could rearrange the build structure of a project (directory layout) so 
> that in the end one manages to compile the thing with the current libtool, 
> but I think it's just not worth it. One looses all the nice structure that 
> libtool offers, just to accomodate this old compiler. On all kind of Linuxes, 
> MacOS, and newer Sun compilers the thing works perfectly.

That's good to know!

> > > > 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.
> 
> The documents state that -xar is just for static archives while -G does the 
> same for dynamic libraries. Still I was able to compile one of my libraries 
> using "-G -xar" and I did not see the multiply defined symbols error there. I 
> got other problems later. The behavior seems to be undefined and I would not 
> recommend it.

As said above, if you have something reproducible, and/or can show the
failures, we might be able to help a bit more.

> Sorry, Ralf. Because of all these above problems, I was not able to test the 
> tarball you sent me.

No problem at all.  In any case, thanks for the heads-up!

Cheers,
Ralf




reply via email to

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