mgra icon indicating copy to clipboard operation
mgra copied to clipboard

Compilation issues (GCC 4.8.5 & 5.4.0)

Open channsoden opened this issue 9 years ago • 2 comments

I tried compiling with GCC 4.8.5 and CMake 3.5.2. First, cmake did not correctly detect my GCC version, and failed with error "GCC version must be at least 4.7!". I commented out the if clause testing for GCC at least 4.7 and continued, but then compilation failed with:

-- Build files have been written to: /global/home/users/hannsode/pkgs/mgra/build 15:34:37 build$ make [ 5%] Building CXX object src/utils/io/CMakeFiles/input.dir/path_helper.cpp.o cc1plus: error: unrecognized command line option "-std=c++11" make[2]: *** [src/utils/io/CMakeFiles/input.dir/path_helper.cpp.o] Error 1 make[1]: *** [src/utils/io/CMakeFiles/input.dir/all] Error 2 make: *** [all] Error 2

So I gave up and tried compiling on a different machine with GCC 5.4.0 and CMake 3.5.1. cmake worked fine, but then building path_helper failed again, this time with a "error: ‘template class std::auto_ptr’ is deprecated" error. I edited line 37 of CmakeLists.txt to "set(COMPILE_OPTION_FLAG "-std=c++11 -Wno-deprecated-declarations")" and tried again successfully.

I would still love to get MGRA installed on the first machine. Is that going to be possible without installing a newer version of the GCC?

channsoden avatar Jan 08 '17 01:01 channsoden

Hello,

About GCC 4.8.5. You can change line 37 of CmakeLists.txt -- set(COMPILE_OPTION_FLAG "-std=c++11" ) on line set(COMPILE_OPTION_FLAG "-std=c++0x" ). I believe that it will work well but we have not tested MGRA on older compilers.

Thank you for interesting our tool and notification about problem with GCC 5.4.0. I am sorry for delay with answer.

PavelAvdeyev avatar Jan 11 '17 16:01 PavelAvdeyev

Thanks, Avdeev.

I'm still not having any luck with 4.8.5. I'll try to get a newer version of the GCC installed.

I'm having difficulty running MGRA now, and I'll create a new thread for that issue.

channsoden avatar Jan 11 '17 21:01 channsoden