Compiling 5.10.00c on SunOS59 with SunWS9

Hi,

compiling 5.10.00c on a SunOS59 machine with the Sun workshop 9 compiler I get some
compile errors:

CC -O -KPIC -I/usr/openwin/include -ptr -Iinclude -mt -o matrix/src/TMatrixTBase.o -c matrix/src/TMatrixTBase.cxx
CC: Warning: Warning: no directory is given for -ptr, using default
"matrix/src/TMatrixTBase.cxx", line 1098: Error: Default arguments cannot be added in later declarations of the template function in the same scope.
“matrix/src/TMatrixTBase.cxx”, line 1142: Error: Default arguments cannot be added in later declarations of the template function in the same scope.
2 Error(s) detected.

Looking to the .h and the .cxx file of TMatrixTBase I don’t see what is wrong here. The
template in the header file has the same argument list as the corresponding function in
TMatrixTBase.

Does somebody has an idea?

Thanks,
Matthias

I do not have access to Solaris10, only Solaris9 where I cannot reproduce tthis problem.

Rene

Hi Rene,

it was on SunOS9:
(Wed 9:04) steinke@bldsol08 $ uname -r -s
SunOS 5.9

mmh, is that the same as Solaris10? On SunOS58 things worked w/o problem.
Which compiler did you use on Solaris9? For me it was …/sunworkshop/9/SUNWspro/bin/CC.

Matthias

[quote=“brun”]I do not have access to Solaris10, only Solaris9 where I cannot reproduce tthis problem.

Rene[/quote]

Hi Matthias,

I use

code [129] CC -V
CC: Sun C++ 5.5 2003/03/12
[/code]

on SUNWSpro8

Rene

Hi Rene,

yeah, that makes the difference.

(Wed 9:07) steinke@bldsol08 $ CC -V
CC: Sun C++ 5.6 2004/07/15

I’ll check whether we have installed a 5.5 compiler, and if it works to compile ROOT
with 5.5 and link with the rest of our code that was compiled with 5.6.

Thanks,
Matthias

[quote=“brun”]Hi Matthias,

I use

code [129] CC -V
CC: Sun C++ 5.5 2003/03/12
[/code]

on SUNWSpro8

Rene[/quote]

Hi Rene,

the compile error with the studio9 compiler comes form a default value for a templated
argument: In TMatrixTBase.h there is f.e.

template Bool_t VerifyMatrixValue (const TMatrixTBase &m,Element val, Int_t verbose=1,Element maxDevAllow=0.0);

If I remove the default values for verbose and maxDevAllow here and
in the next declaration, I can compile TMatrixTBase and I run into the same problem with
TVectorT.h.

With a first grep I found two places inside the ROOT sources which make use of the
templated default value. Would it make sense to change that and to remove templated
default values?

Matthias