Compilingg with CC and -library=stlport4

Hi

I am trying to build ROOT on SunOS 9 with CC 5.8 (part of Sun Studio 11 that is free!!).
We have decided to build all of our software with the “-library=stlport4” flag which has a good conformity with STL but with the drawback to not be compatible with libraries not built with this flag.
The regular flag “-library=libCstd” is not good enough for our software which use intensively templates.

When trying to build ROOT, since I want to link the libraries with our software, I added the flags “-library=stlport4” in the root/config/Makefile.solarisCC5 to the CINTCXXFLAGS and CXXFLAGS.
However, now I am confused to what to do with cint since it has to deal now with the new iostream. I tried to change the root/cint/Module.mk without any succes (replacing “libstrm.cxx” with “gcc3strm.cxx”)

Any suggestion? I have to do all those changes in order to be sure that all software is buit with the “-library=stlport4” flag

Thanks in advance.

you could also try iccstrm.cxx and vc7strm.cxx.
Alternatively you’ll need to generate a new dictionary file by copying for example cint/lib/gcc3strm and modifying the header files to match your implementation.

Philippe

Hi Philippe

I tried to use the gcc3strm.cxx and adapt it as well as the corresponding cint/lib/gcc3strm/iostrm.h to reflect SUN’s implementation. I almost succeded but then I encountered this problem:

cint/src/gcc3strm.cxx", line 1456: Error: std::istream::sentry::sentry(const std::istream::sentry&) is not accessible from G__G__stream_21_3_0(G__value*, const char*, G__param*, int)

In this implementation, std::istream::sentry has a copy constructor declared (but not defined) in the private part. The same is true for the assigment operator.

This problem affect at least 2 platforms:
. SunOS 9 with CC 5.8 and -library=stlport4 flag to be ANSI C++ compliant
. HP-UX B.11 with aCC and -AA flag to be ANSI C++ compliant .

But not Linux with GCC nor Compaq Tru64 UNIX V5.1B with cxx which hasn’t declared any copy or assignment constructor.

Is there a way around this problem? I don’t see how I can do it with copy and assignment constructor protected.

[quote=“pcanal”]you could also try iccstrm.cxx and vc7strm.cxx.
Alternatively you’ll need to generate a new dictionary file by copying for example cint/lib/gcc3strm and modifying the header files to match your implementation.

Philippe[/quote]

Try the following:

[code] cd $ROOTSYS/cint/lib
cp -r gcc3strm newsunosstrm
cd newsunostrm

in the makefile change the words gcc3strm to something else

(A) in iostrm.h make the change needed for your platform

(aka declaring the appropriate constructor private/protected)

(B)

gmake

© try rebuilding ROOT

Repeat step (A), (B) and © until your corrected all the issues[/code]

When your done, send us the directory so we can update the CVS repository :slight_smile:

Cheers,
Philippe.