Re: [ROOT] Compilation trouble on Solaris 2.8 with CC 5.3

From: Rene Brun (Rene.Brun@cern.ch)
Date: Tue Jul 16 2002 - 10:55:11 MEST


Hi Andreas,

OK, I understand better now.

YOU SHOULD NOT USE gmake -j 2
if your classes contain templates. This is a limitation with
several compilers (I know at least Solaris and KCC on SGI).

Rene Brun

On Tue, 16 Jul 2002, Andreas Zoglauer wrote:

> 
> 
> Hi Rene,
> 
> The problem only occured during linking.
> 
> After not finding any solution at the root web pages, I searched the
> solaris related news-groups and found that this problem was described
> there.
> I played around a bit with several options and finally I added the option
> -xar at the LDFlags in Makefile.config - *NOT* at the start of the
> compilation, but when the error the first time happens.
> Then root compiled and finally also my program.
> 
> But...
> Unfortuately I discovered this morning that I in fact can compile my
> program, but can not start the root interpreter....
> 
> ;-(
> 
> After deleting the current ROOT installation and restaring from scratch it
> compiled without any modifications! (Remark: Yesterday I also started from
> scratch!)
> 
> One difference was that I only compiled with gmake instead of gmake -j 2,
> ie I only used one processor instead of all two.
> 
> I have no idea if this was the reason (gmake -j 2 works on Linux).
> 
> 
> I would be interested if anybody else had similar problems with Solaris
> 2.8 and Compiler 5.3.
> Otherwise the problem could be related to our installation.
> 
> 
> Andreas
> 
> 
> 
> 
> 
> > Hi Andreas,
> >
> > Do you have problems in compiling or linking?
> > I do not understand your use of the option "-xar" below.
> > The man page in CC5.2 says:
> >      -xar      Creates archive libraries.
> >
> >                When building a C++ archive that uses templates,
> >                it is necessary in most cases to include in the
> >                archive those template functions that are instan-
> >                tiated in the template repository.  Using this
> >                option automatically adds those templates to the
> >                archive as needed.
> >
> >                Examples:
> >
> >                The following command archives the template func-
> >                tions contained in the repository and the object
> >                files.
> >
> >                % CC -xar -o libmain.a a.o b.o c.o
> >
> > In your example, you use this option to create an executable rootcint.
> > Do you see the problem only when linking rootcint and cint?
> >
> > Rene Brun
> >
> 
> ----------------------------------------------------------------------
> Andreas Zoglauer
> 
> MPI fuer extraterrestrische Physik         Phone:    +49/89-30000-3848
> Postfach 1312                              Fax:      +49/89-30000-3569
> 85741 Garching, Germany                    Email:    zog@mpe.mpg.de
> ----------------------------------------------------------------------
> 
> 



This archive was generated by hypermail 2b29 : Sat Jan 04 2003 - 23:50:59 MET