RE: [ROOT] iostream problems

From: Nicole Chevalier (phnic@SLAC.stanford.edu)
Date: Fri Mar 01 2002 - 13:03:59 MET


That worked!
I got Root to build fine (I had to add -library=iostream  to LDFLAGS aswell)
and now the Babar code is happily compiling with the new root build.

Thanks very much for the help Philippe.
nicole


> Hi Nicole,
>
> On Solaris, the ROOT configuration assumes that if the compiler is recent
> (I think 5 or more), it assumes that the iostream library is standard
> compliant.  If I understand correct the -library=iostream make the
> compiler use the older version of iostream ....  So maybe just telling
> the ROOT code that the iostream library is NOT recent might work.
>
> In RConfig.h, could you test you code by commenting out line 107:
> #   if __SUNPRO_CC > 0x420
> #      define R__SOLARIS_CC50
> // #      define R__ANSISTREAM      /* ANSI C++ Standard Library conformant */
> #   endif
>
> and let us know.
>
> Thanks,
> Philippe.
>
> -----Original Message-----
> From: owner-roottalk@pcroot.cern.ch
> [mailto:owner-roottalk@pcroot.cern.ch]On Behalf Of Nicole Chevalier
> Sent: Thursday, February 28, 2002 10:29 AM
> To: roottalk@pcroot.cern.ch
> Subject: [ROOT] iostream problems
>
>
>
>
> Hi,
>
> The BaBar code uses root files for storing data. Currently it uses root
> 2.23-12 but we're trying to upgrade this to >3 to make use of the new
> features.
>
> The problems come with using the platform SunOS58 and WS6.  Here we need
> the CC flag -library=iostream to make the BaBar code compile, otherwise we
> get loads of errors like:
>   Error: The name ostream is ambiguous, ostream and std::ostream
> The errors are because the iostream names that used to be simple classes
> have been changed to something complicated that creates std::ostream
> and then does "using std::ostream" to put it into the global namespace,
> simulating the behaviour of the old class. If we have forward declaration
> "class ostream" there are two things called ostream and the compiler
> gives up.
> This flag forces the use of libiostream, the classic iostreams library.
> This works fine with old Root 2, however when I try to compile with Root 3
> I get similar ambiguous iostream errors in the packages that rely on root.
>
> I thought this might be because Root was using the new iostream libs,
> so I figured if I built root with the classic iostream libs it might be
> compatible with the BaBar code.
> I tried building Root 3.01-06 from the source with ARCH := solarisCC5 (but
> using WS6U1) and the CC flag -library=iostream added to CXXFLAGS, CFLAGS,
> CINTCXXFLAGS and CINTCFLAGS in config/Makefile.solarisCC5.
> However on compilation I got similar ambiguous iostream errors:
>  include/TString.h", line 319: Error: The name istream is ambiguous,
>  istream and std::istream
>
> There were also earlier warning messages:
>  utils/src/rootcint.cxx", line 1727: Warning: String literal converted to
>  char* in assignment.
>
> Is it possible to build root with the old iostream headers?
> If so, what am I missing?
>
> Any help in understanding the source of the problem or any possible
> solutions would be very welcome.
> Thanks in advance.
>
> nicole
>
>
>
>



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