FreeBSD10 and clang

Hi,

I try to compile ROOT on the new FreeBSD 10.0 release
which has swapped its default compiler from gcc to clang.
On the last FreeBSD 9.2 with gcc by default, its works fine.
On FreeBSD10, forcing gcc, it works, but it’s frustrating.
On my Fedora20, I compile ROOT with clang without any problem.

Here is the error message.

bin/rmkdepend -R -fcint/cint/src/dict/gcc4strm.d -Y -w 1000 – -pipe -W -Wall -fPIC -DG__REGEXP -Iinclude -DG__UNIX -DG__SHAREDLIB -DG__ROOT -DG__REDIRECTIO -DG__OSF
clang++ -O -pipe -W -Wall -fPIC -DG__REGEXP -Iinclude -DG__UNIX -DG__SHAREDLIB -DG__ROOT -DG__REDIRECTIO -DG__OSFDLL -DG__HAVE_CONFIG -DG__NOMAKEINFO -DG__CINTBODY
In file included from cint/cint/src/dict/gcc4strm.cxx:7:
In file included from /export/home/ga133949/logiciel/root/cint/cint/src/dict/gcc4strm.h:30:
cint/cint/lib/gcc4strm/iostrm.h:85:17: error: no type named ‘__streambuf_type’ in 'std::__1::basic_ostream’
static ostream::__streambuf_type G__store_cout;
~~~~~~~~~^
cint/cint/lib/gcc4strm/iostrm.h:86:17: error: no type named ‘__streambuf_type’ in 'std::__1::basic_ostream’
static ostream::__streambuf_type G__store_cerr;
~~~~~~~~~^
cint/cint/lib/gcc4strm/iostrm.h:87:17: error: no type named ‘__streambuf_type’ in 'std::__1::basic_istream’
static istream::__streambuf_type G__store_cin;
~~~~~~~~~^
cint/cint/src/dict/gcc4strm.cxx:760:56: error: no type named ‘__istream_type’ in 'std::__1::basic_istream’
const basic_istream<char,char_traits >::__istream_type& obj = ((basic_istream<char,char_traits >

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
cint/cint/src/dict/gcc4strm.cxx:771:56: error: no type named ‘__istream_type’ in 'std::__1::basic_istream’
const basic_istream<char,char_traits >::__istream_type& obj = ((basic_istream<char,char_traits >

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
cint/cint/src/dict/gcc4strm.cxx:781:56: error: no type named ‘__istream_type’ in 'std::__1::basic_istream’
const basic_istream<char,char_traits >::__istream_type& obj = ((basic_istream<char,char_traits >

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
[…]

After diving into the code, I found that standard include file (fstream in these
case) seems to come from clang code rather than gcc4. One defines the __istream_type
and __streambuf_type typedef, but not the other.

So I wonder if using the gcc4strm bridge is the adequate solution for these new
FreeBSD release, if there is another more adapted bridge, or if it has to be created
and where the choice of the bridge is defined.

it seems that libcxxstrm is the appropriate bridge to used in these case
still need to find where to switch to it.

the switch to libcxxstrm is available in the configure option

./configure --with-clang --enable-libcxx --enable-explicitlink …

and it compiles straightforward