Compiling build environment fails in CMake directory
Posted: Wed Mar 09, 2016 8:56 pm
Hello,
My gcc version is gcc version 5.2.1 20151010 (Ubuntu 5.2.1-22ubuntu2)
I followed the build instructions here: https://github.com/RedPitaya/RedPitaya/ ... /README.md
Everything was fine until I got to CMake, which failed to build.
In Directory: /sandbox/test/RedPitaya/OS/buildroot/buildroot-2014.02/output/build/host-cmake-2.8.12.1
In file included from /sandbox/test/RedPitaya/OS/buildroot/buildroot-2014.02/output/build/host-cmake-2.8.12.1/Source/cmDocumentVariables.cxx:4:0:
/sandbox/test/RedPitaya/OS/buildroot/buildroot-2014.02/output/build/host-cmake-2.8.12.1/Bootstrap.cmk/cmsys/ios/sstream: In member function ‘void cmsys_ios::istringstream::clear(int)’:
/sandbox/test/RedPitaya/OS/buildroot/buildroot-2014.02/output/build/host-cmake-2.8.12.1/Bootstrap.cmk/cmsys/ios/sstream:176:34: error: invalid conversion from ‘int’ to ‘std::ios_base::iostate {aka std::_Ios_Iostate}’ [-fpermissive]
this->IStrStream::clear(flags);
The CMake mailing list seems to point to an issue with building CMake with GCC 5.1 (and very likely anything newer). The link is here: https://cmake.org/pipermail/cmake/2015- ... 60486.html
However the work-around is not very clear. As I understand it, the test for configure is having a hard time finding the sstream functions (which are defined in iostream). It should find these in the c++ library ...
The output of my ./configure was:
/sandbox/test/RedPitaya/OS/buildroot/buildroot-2014.02/output/build/host-cmake-2.8.12.1$ ./configure
---------------------------------------------
CMake 2.8.12.1, Copyright 2000-2012 Kitware, Inc.
Found GNU toolchain
C compiler on this system is: gcc
C++ compiler on this system is: g++
Makefile processor on this system is: gmake
g++ is GNU compiler
g++ has setenv
g++ has unsetenv
g++ does not have environ in stdlib.h
g++ has STL in std:: namespace
g++ has ANSI streams
g++ has streams in std:: namespace
g++ does not have sstream
g++ does not have strstream.h
g++ does not have strstrea.h
g++ does not have operator!=(string, char*)
g++ has stl iterator_traits
g++ has standard template allocator
g++ has allocator<>::rebind<>
g++ does not have non-standard allocator<>::max_size argument
g++ has stl containers supporting allocator objects
g++ has header cstddef
g++ requires template friends to use <>
g++ supports member templates
g++ has standard template specialization syntax
g++ has argument dependent lookup
g++ has struct stat with st_mtim member
g++ has ios::binary openmode
g++ has ANSI for scoping
////
My gcc version is gcc version 5.2.1 20151010 (Ubuntu 5.2.1-22ubuntu2)
I followed the build instructions here: https://github.com/RedPitaya/RedPitaya/ ... /README.md
Everything was fine until I got to CMake, which failed to build.
In Directory: /sandbox/test/RedPitaya/OS/buildroot/buildroot-2014.02/output/build/host-cmake-2.8.12.1
In file included from /sandbox/test/RedPitaya/OS/buildroot/buildroot-2014.02/output/build/host-cmake-2.8.12.1/Source/cmDocumentVariables.cxx:4:0:
/sandbox/test/RedPitaya/OS/buildroot/buildroot-2014.02/output/build/host-cmake-2.8.12.1/Bootstrap.cmk/cmsys/ios/sstream: In member function ‘void cmsys_ios::istringstream::clear(int)’:
/sandbox/test/RedPitaya/OS/buildroot/buildroot-2014.02/output/build/host-cmake-2.8.12.1/Bootstrap.cmk/cmsys/ios/sstream:176:34: error: invalid conversion from ‘int’ to ‘std::ios_base::iostate {aka std::_Ios_Iostate}’ [-fpermissive]
this->IStrStream::clear(flags);
The CMake mailing list seems to point to an issue with building CMake with GCC 5.1 (and very likely anything newer). The link is here: https://cmake.org/pipermail/cmake/2015- ... 60486.html
However the work-around is not very clear. As I understand it, the test for configure is having a hard time finding the sstream functions (which are defined in iostream). It should find these in the c++ library ...
The output of my ./configure was:
/sandbox/test/RedPitaya/OS/buildroot/buildroot-2014.02/output/build/host-cmake-2.8.12.1$ ./configure
---------------------------------------------
CMake 2.8.12.1, Copyright 2000-2012 Kitware, Inc.
Found GNU toolchain
C compiler on this system is: gcc
C++ compiler on this system is: g++
Makefile processor on this system is: gmake
g++ is GNU compiler
g++ has setenv
g++ has unsetenv
g++ does not have environ in stdlib.h
g++ has STL in std:: namespace
g++ has ANSI streams
g++ has streams in std:: namespace
g++ does not have sstream
g++ does not have strstream.h
g++ does not have strstrea.h
g++ does not have operator!=(string, char*)
g++ has stl iterator_traits
g++ has standard template allocator
g++ has allocator<>::rebind<>
g++ does not have non-standard allocator<>::max_size argument
g++ has stl containers supporting allocator objects
g++ has header cstddef
g++ requires template friends to use <>
g++ supports member templates
g++ has standard template specialization syntax
g++ has argument dependent lookup
g++ has struct stat with st_mtim member
g++ has ios::binary openmode
g++ has ANSI for scoping
////