CartwrightLab / dawg

Simulating Sequence Evolution
GNU General Public License v2.0
11 stars 3 forks source link

Make compilation error #45

Closed Morteza-M-Saber closed 6 years ago

Morteza-M-Saber commented 6 years ago

First of all thank you very much for developing Dawg and making it freely available. I am trying to install make on supercomputer running Red Hat. I installed boost 1.65.0 and Cmake version 3.9.4 for running " cmake .. -G 'Unix Makefiles'" and then running make. But I keep getting the following error:

[ 6%] Building CXX object src/lib/CMakeFiles/libdawg2.dir/ma.cpp.o In file included from /home/masih/Baterial_simulator/DAWG/dawg-develop/src/include/dawg/ma.h:12, from /home/masih/Baterial_simulator/DAWG/dawg-develop/src/lib/ma.cpp:4: /home/masih/Baterial_simulator/DAWG/dawg-develop/src/include/dawg/trick.h: In member function ‘void dawg::trick::section::get(const std::string&, std::vector<_Tp, _Alloc>&) const’: /home/masih/Baterial_simulator/DAWG/dawg-develop/src/include/dawg/trick.h:78: error: expected initializer before ‘:’ token /home/masih/Baterial_simulator/DAWG/dawg-develop/src/include/dawg/trick.h:82: error: expected primary-expression before ‘}’ token /home/masih/Baterial_simulator/DAWG/dawg-develop/src/include/dawg/trick.h:82: error: expected ‘;’ before ‘}’ token /home/masih/Baterial_simulator/DAWG/dawg-develop/src/include/dawg/trick.h:82: error: expected primary-expression before ‘}’ token /home/masih/Baterial_simulator/DAWG/dawg-develop/src/include/dawg/trick.h:82: error: expected ‘)’ before ‘}’ token /home/masih/Baterial_simulator/DAWG/dawg-develop/src/include/dawg/trick.h:82: error: expected primary-expression before ‘}’ token /home/masih/Baterial_simulator/DAWG/dawg-develop/src/include/dawg/trick.h:82: error: expected ‘;’ before ‘}’ token /home/masih/Baterial_simulator/DAWG/dawg-develop/src/include/dawg/trick.h: In static member function ‘static void dawg::trick::section::conv(const std::string&, double&)’: /home/masih/Baterial_simulator/DAWG/dawg-develop/src/include/dawg/trick.h:107: error: ‘nullptr’ was not declared in this scope /home/masih/Baterial_simulator/DAWG/dawg-develop/src/include/dawg/trick.h: In static member function ‘static void dawg::trick::section::conv(const std::string&, unsigned int&)’: /home/masih/Baterial_simulator/DAWG/dawg-develop/src/include/dawg/trick.h:111: error: ‘nullptr’ was not declared in this scope /home/masih/Baterial_simulator/DAWG/dawg-develop/src/include/dawg/trick.h: In static member function ‘static void dawg::trick::section::conv(const std::string&, int&)’: /home/masih/Baterial_simulator/DAWG/dawg-develop/src/include/dawg/trick.h:115: error: ‘nullptr’ was not declared in this scope In file included from /home/masih/Baterial_simulator/DAWG/dawg-develop/src/include/dawg/ma.h:12, from /home/masih/Baterial_simulator/DAWG/dawg-develop/src/lib/ma.cpp:4: /home/masih/Baterial_simulator/DAWG/dawg-develop/src/include/dawg/trick.h: In member function ‘void dawg::trick::read_aliases()’: /home/masih/Baterial_simulator/DAWG/dawg-develop/src/include/dawg/trick.h:140: error: expected initializer before ‘:’ token /home/masih/Baterial_simulator/DAWG/dawg-develop/src/include/dawg/trick.h:143: error: expected primary-expression before ‘}’ token /home/masih/Baterial_simulator/DAWG/dawg-develop/src/include/dawg/trick.h:143: error: expected ‘;’ before ‘}’ token /home/masih/Baterial_simulator/DAWG/dawg-develop/src/include/dawg/trick.h:143: error: expected primary-expression before ‘}’ token /home/masih/Baterial_simulator/DAWG/dawg-develop/src/include/dawg/trick.h:143: error: expected ‘)’ before ‘}’ token /home/masih/Baterial_simulator/DAWG/dawg-develop/src/include/dawg/trick.h:143: error: expected primary-expression before ‘}’ token /home/masih/Baterial_simulator/DAWG/dawg-develop/src/include/dawg/trick.h:143: error: expected ‘;’ before ‘}’ token /home/masih/Baterial_simulator/DAWG/dawg-develop/src/lib/ma.cpp: In static member function ‘static bool dawg::ma::from_trick(const dawg::trick&, std::vector<dawg::ma, std::allocator >&)’: /home/masih/Baterial_simulator/DAWG/dawg-develop/src/lib/ma.cpp:41: error: ‘nullptr’ was not declared in this scope In file included from /home/masih/Baterial_simulator/DAWG/dawg-develop/src/include/dawg/ma.h:12, from /home/masih/Baterial_simulator/DAWG/dawg-develop/src/lib/ma.cpp:4: /home/masih/Baterial_simulator/DAWG/dawg-develop/src/include/dawg/trick.h: In member function ‘void dawg::trick::section::get(const std::string&, std::vector<_Tp, _Alloc>&) const [with T = double, A = std::allocator]’: /home/masih/Baterial_simulator/DAWG/dawg-develop/src/include/dawg/details/dawgma.xmh:20: instantiated from here /home/masih/Baterial_simulator/DAWG/dawg-develop/src/include/dawg/trick.h:76: warning: unused variable ‘x’ make[2]: [src/lib/CMakeFiles/libdawg2.dir/ma.cpp.o] Error 1 make[1]: [src/lib/CMakeFiles/libdawg2.dir/all] Error 2 make: *** [all] Error 2

I would appreciate if you could help figuring out what goes wrong.

reedacartwright commented 6 years ago

What compiler and version are you using to compile Dawg? I suspect that you need to try something more recent than what is used by default on your Redhat machine.

Morteza-M-Saber commented 6 years ago

I am using GNU Make 4.2.1 and GCC 6.1.0. Here is what I do in order:

1)Unzip DAWG and make a new directory inside named 'my_build' and cd into it 2)run Cmake .. -G 'Unix Makefiles' which returns -- The C compiler identification is GNU 4.4.7 -- The CXX compiler identification is GNU 4.4.7 -- Check for working C compiler: /usr/bin/cc -- Check for working C compiler: /usr/bin/cc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Detecting C compile features -- Detecting C compile features - done -- Check for working CXX compiler: /usr/bin/c++ -- Check for working CXX compiler: /usr/bin/c++ -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Detecting CXX compile features -- Detecting CXX compile features - done -- Found Git: /usr/bin/git (found version "1.7.1") -- version: 2.0.1-unknown. -- Looking for pthread.h -- Looking for pthread.h - found -- Looking for pthread_create -- Looking for pthread_create - not found -- Check if compiler accepts -pthread -- Check if compiler accepts -pthread - yes -- Found Threads: TRUE -- Boost version: 1.65.1 -- Found the following Boost libraries: -- program_options -- unit_test_framework -- Boost library: /home/masih/miniconda3/lib -- Boost headers: /home/masih/miniconda3/include -- Could NOT find TESTU01 (missing: TESTU01_LIBRARY TESTU01_INCLUDE_DIR) -- Configuring done -- Generating done -- Build files have been written to: /home/masih/Baterial_simulator/DAWG/dawg-develop/my_build 3)Run make which gives the above-mentioned error.

Everything run without problem except for the final step. Everything seems to be in their latest version!

reedacartwright commented 6 years ago

You are going to need to use at least GCC 4.8.2 to get the development branch to compile as it uses C++11 features. You can change which compiler CMake uses by default by setting the CXX and CC environmental variables.

Morteza-M-Saber commented 6 years ago

Thanks. That solved the problem.