Compile errors with 5.13.04 on SunOS8 and SunOS9

Hi,

I tried to compile 5.13.04 on SunOS8 and SunOS9 and got two compilation errors:

SunOS8 Sun WorkShop 6 update 1 C++ 5.2 Patch 109508-03

CC -O -KPIC -I/usr/openwin/include -ptr -Iinclude -mt -o reflex/src/ScopeBase.o -c reflex/src/ScopeBase.cxx
CC: Warning: Warning: no directory is given for -ptr, using default
"include/Reflex/internal/InternalTools.h", line 28: Error: “static ROOT::Reflex::OTools::ToIterROOT::Refl\ex::Member::Begin<std::vector<ROOT::Reflex::OwnedMember, std::allocatorROOT::Reflex::OwnedMember>>(cons\t std::vector<ROOT::Reflex::OwnedMember, std::allocatorROOT::Reflex::OwnedMember>&)” is expected to retu\rn a value.
“reflex/src/ScopeBase.cxx”, line 305: Where: While instantiating “static ROOT::Reflex::OTools::ToIter<\ROOT::Reflex::Member>::Begin<std::vector<ROOT::Reflex::OwnedMember, std::allocatorROOT::Reflex::OwnedMemb\er>>(const std::vector<ROOT::Reflex::OwnedMember, std::allocatorROOT::Reflex::OwnedMember>&)”.
“reflex/src/ScopeBase.cxx”, line 305: Where: Instantiated from non-template code.
“include/Reflex/internal/InternalTools.h”, line 28: Error: Use “;” to terminate statements.
“reflex/src/ScopeBase.cxx”, line 305: Where: While instantiating “static ROOT::Reflex::OTools::ToIter<\ROOT::Reflex::Member>::Begin<std::vector<ROOT::Reflex::OwnedMember, std::allocatorROOT::Reflex::OwnedMemb\er>>(const std::vector<ROOT::Reflex::OwnedMember, std::allocatorROOT::Reflex::OwnedMember>&)”.
“reflex/src/ScopeBase.cxx”, line 305: Where: Instantiated from non-template code.
“include/Reflex/internal/InternalTools.h”, line 28: Error: A statement (even if empty) is required here.
“reflex/src/ScopeBase.cxx”, line 305: Where: While instantiating “static ROOT::Reflex::OTools::ToIter<\ROOT::Reflex::Member>::Begin<std::vector<ROOT::Reflex::OwnedMember, std::allocatorROOT::Reflex::OwnedMemb\er>>(const std::vector<ROOT::Reflex::OwnedMember, std::allocatorROOT::Reflex::OwnedMember>&)”.
“reflex/src/ScopeBase.cxx”, line 305: Where: Instantiated from non-template code.
3 Error(s) detected.
gmake: *** [reflex/src/ScopeBase.o] Error 3

I think the compiler is right here. I could work around this problem by disabling reflex.

SunOS9 Studio 9 compiler:

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

This is more serious for us (the BaBar people) b/c we do not want to drop TMatrix.

Greetings,
Matthias

Hi Matthias,

A patch will be uploaded shortly to resolve this Sun compiler issue .

Eddy

Hi Matthias,

concerning the SunOS8, CC 5.2 compiler errors IIRC correctly this compiler does not like the keyword “typename”, could you try without? Unfortunately I can’t try because I neither have the OS nor the compiler available.

Best

Stefan