Bug #9916
openCLASS compilation fails with gcc5 ( 5.1.0 )
100%
Description
Compiler diagnosis :
In file included from /Users/leniau/Applications/APP_SCIENCES/CLASS_Support/source/include/CLASSLogger.hxx:19:0,
from /Users/leniau/Applications/APP_SCIENCES/CLASS_Support/source/include/CLASSObject.hxx:18,
from CLASSObjectDict.h:34,
from CLASSObjectDict.cxx:17:
/opt/local/include/gcc5/c++/sstream:300:7: error: 'struct std::__cxx11::basic_stringbuf<_CharT, Traits, _Alloc>::_xfer_bufptrs' redeclared with different access
struct _xfer_bufptrs
^
In file included from /Users/leniau/Applications/APP_SCIENCES/CLASS_Support/source/include/CLASSLogger.hxx:19:0,
from /Users/leniau/Applications/APP_SCIENCES/CLASS_Support/source/include/CLASSObject.hxx:18,
from /Users/leniau/Applications/APP_SCIENCES/CLASS_Support/source/include/CLASSFacility.hxx:15,
from CLASSFacilityDict.h:34,
from CLASSFacilityDict.cxx:17:
/opt/local/include/gcc5/c++/sstream:300:7: error: 'struct std::_cxx11::basic_stringbuf<_CharT, Traits, _Alloc>::_xfer_bufptrs' redeclared with different access
struct _xfer_bufptrs
^
In file included from /Users/leniau/Applications/APP_SCIENCES/CLASS_Support/source/include/CLASSLogger.hxx:19:0,
from /Users/leniau/Applications/APP_SCIENCES/CLASS_Support/source/include/CLASSObject.hxx:18,
from /Users/leniau/Applications/APP_SCIENCES/CLASS_Support/source/include/DecayDataBank.hxx:10,
from /Users/leniau/Applications/APP_SCIENCES/CLASS_Support/source/include/CLASSConstante.hxx:8,
from /Users/leniau/Applications/APP_SCIENCES/CLASS_Support/source/include/FabricationPlant.hxx:15,
from FabricationPlantDict.h:34,
from FabricationPlantDict.cxx:17:
/opt/local/include/gcc5/c++/sstream:300:7: error: 'struct std::_cxx11::basic_stringbuf<_CharT, Traits, _Alloc>::_xfer_bufptrs' redeclared with different access
struct __xfer_bufptrs
^
make: * [CLASSObjectDict.o] Error 1
make: Waiting for unfinished jobs....
make: [CLASSFacilityDict.o] Error 1
make: * [FabricationPlantDict.o] Error 1
Updated by LENIAU Baptiste over 9 years ago
- Status changed from New to Resolved
- % Done changed from 0 to 100
Compilation is 100% functional with gcc5 but ...
YOU NEED TO RE-BUILD ROOT WITH GCC5.
For macOSX user :
0a-Install gcc5 : sudo port install gcc5
0b-Set gcc5 as default : sudo port select --set gcc gcc5
1-Delete your root folder and download it again (tested with root v5.34.30). To be sure to fresh install
2-configure root with :
./configure --with-cxx=/opt/local/bin/g++ --with-cc=/opt/local/bin/gcc --with-f77=/opt/local/bin/gfortran --with-ld=/opt/local/bin/g++ --enable-builtin-freetype --disable-cocoa --enable-minuit2
3- go to src folder of class and make clean; make; make install
Updated by MOUGINOT Baptiste over 9 years ago
- Status changed from Resolved to Feedback
Updated by MOUGINOT Baptiste over 9 years ago
I had to add a "--disable-bonjour" on my macbook pro
so if "./configure --with-cxx=/opt/local/bin/g++ --with-cc=/opt/local/bin/gcc --with-f77=/opt/local/bin/gfortran --with-ld=/opt/local/bin/g++ --enable-builtin-freetype --disable-cocoa --enable-minuit2" fails
try
"./configure --with-cxx=/opt/local/bin/g++ --with-cc=/opt/local/bin/gcc --with-f77=/opt/local/bin/gfortran --with-ld=/opt/local/bin/g++ --enable-builtin-freetype --disable-cocoa --enable-minuit2 --disable-bonjour"
BaM