[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: Derek Feichtinger
Subject: Re: multiply-defined symbols problem on solaris9 (libtool-1.5.18)
Date: Tue, 30 Aug 2005 09:19:04 +0200
User-agent: KMail/1.7.2


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.

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.
- The symbols in these objects are not (as in other compilers) defined as 

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 

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.

> > > 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.

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


reply via email to

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