no match for ‘operator<<’
Currently, master fails to build with
/home/nschloe/software/moab/source-upstream/tools/mbpart.cpp:494:19: error: operand types are ‘std::ostream {aka std::basic_ostream<char>}’ and ‘std::ostringstream {aka std::__cxx11::basic_ostringstream<char>}’)
std::cerr << tmp_output_file << " : failed to write file." << std::endl;
~~~~~~~~~~^~~~~~~~~~~~~~~~~~
Comments (7)
-
reporter -
reporter The important change here seems to be that C++14 is the default version on GCC6. For older versions of GCC, I can reproduce the error when enabling at least C++11, e.g.,
CC=mpicc CXX=mpicxx FC=mpif90 F77=mpif77 \ cmake \ -DCMAKE_INSTALL_PREFIX:PATH=/opt/moab/ \ -DCMAKE_CXX_FLAGS:STRING="${CMAKE_CXX_FLAGS} -Wno-literal-suffix -std=c++11" \ -DCMAKE_SHARED_LINKER_FLAGS="$CMAKE_SHARED_LINKER_FLAGS -Wl,--no-undefined" \ -DBUILD_SHARED_LIBS:BOOL=ON \ -DENABLE_CGM:BOOL=OFF \ -DENABLE_HDF5:BOOL=ON \ -DENABLE_IMESH:BOOL=ON \ -DENABLE_IGEOM:BOOL=ON \ -DENABLE_MPI:BOOL=ON \ -DENABLE_NETCDF:BOOL=OFF \ -DENABLE_METIS:BOOL=ON \ -DENABLE_PARMETIS:BOOL=OFF \ -DENABLE_ZOLTAN:BOOL=OFF \ -DMOAB_BUILD_MBPART:BOOL=ON \ ../../source-upstream/
(Some of the options may not be necessary to reproduce the error.)
-
Thanks, I was able to finally reproduce this. The fix was quite simple and should have been caught before.
Again, try the branch "vijaysm/cmake-fixes" and let me know if this error is fixed. The numerous Eigen related warnings should also be suppressed now.
-
reporter Tested and confirmed working. This bug can be closed as soon as
vijaysm/cmake-fixes
is merged. -
Your testing is much appreciated. I have merged the branch to develop and so it should graduate to master in couple of days (with a corresponding PR). Can you confirm if the numerous warnings are also fixed ?
-
reporter Can you confirm if the numerous warnings are also fixed ?
Indeed.
-
reporter - changed status to resolved
This is now fixed.
- Log in to comment
I should add that this is with GCC 6 (as is default on Ubuntu 16.10+).