This is the mail archive of the automake@gnu.org mailing list for the automake project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

libtool problem with Solaris C++ templates


I've just come across a nasty problem.

The Solaris WorkShop Pro C++ compiler is very picky about the names of
object files.

The project I'm working on, uses C++ templates extensively (from
RogueWave). We have been having difficulty making the linker instansiate
the methods on objects in shared libraries created by libtool. It turns
out that the linker DOES instantiate them if the input files end in .o but
does NOT instatiate them if they have been moved to a .lo suffix (by
libtool).

We suspect that the templates database generated by the compiler
(Templates.DB) holds the name of the object file created. Then when it is
linked, the linker knows to find the method(s) that need to be
instantiated. Renaming the object file breaks this.

IE.  CC xxx.cp   ---> xxx.o  (info about xxx.o held in Templates.DB)
     libtool does     mv xxx.o xxx.lo
     CC xxx.lo  ---> xxx 
          (linker has no references to xxx.lo in Templates.DB)
          (so methods on template classes are not instatiated)

Since we are only generating shared libraries ... I'd be grateful for
hints on how to mangle libtool to just work with the .o files and not
rename them.

Ron O'Hara


------------------------------------------------------------------
email:  rono@sentuny.com.au
BH: (GMT)    +353 21 281469
Mobile: +61 419 873 801


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]