amkozlov / raxml-ng

RAxML Next Generation: faster, easier-to-use and more flexible
GNU Affero General Public License v3.0
383 stars 64 forks source link

compilation fails #17

Closed alex-seitz closed 7 years ago

alex-seitz commented 7 years ago

Hello, I'm getting the following errors when compile the software: ParallelContext.hpp:32:61: error: ‘function’ in namespace ‘std’ does not name a template type static void init_pthreads(const Options& opts, const std::function<void()>& thread_main); ParallelContext.hpp:32:69: error: expected ‘,’ or ‘...’ before ‘<’ token static void init_pthreads(const Options& opts, const std::function<void()>& thread_main); ParallelContext.hpp:45:38: error: ‘std::function’ has not been declared static void mpi_gather_custom(std::function<int(void,int)> prepare_send_cb, ParallelContext.hpp:45:46: error: expected ‘,’ or ‘...’ before ‘<’ token static void mpi_gather_custom(std::function<int(void,int)> prepare_send_cb, ParallelContext.hpp:83:57: error: ‘function’ in namespace ‘std’ does not name a template type static void start_thread(size_t thread_id, const std::function<void()>& thread_main); ParallelContext.hpp:83:65: error: expected ‘,’ or ‘...’ before ‘<’ token static void start_thread(size_t thread_id, const std::function<void()>& thread_main); Checkpoint.cpp:165:58: error: no matching function for call to ‘ParallelContext::mpi_gather_custom(CheckpointManager::gather_model_params()::<lambda(void, size_t)>&, CheckpointManager::gather_model_params()::<lambda(void, size_t)>&)’ ParallelContext::mpi_gather_custom(worker_cb, master_cb);

Can you maybe give me a hint about what I'm doing wrong? Thank you Alex

amkozlov commented 7 years ago

Hi Alex,

it looks like you're using an older/incompatible compiler. Could you please post your full CMake and make output here? (ideally with VERBOSE=1)

Thanks, Alexey

alex-seitz commented 7 years ago

Hi Alexey, here are the files containing the output of cmake and make (both with VERBOSE=1) cmake.txt make.txt

Thanks for your fast response Alex

amkozlov commented 7 years ago

Thanks for reporting, this is a gcc7-specific issue and it should be fixed now with the latest commit (285d4f1).

Could you please double-check?

alex-seitz commented 7 years ago

Hey, sorry for the late answer. Your fix works fine. Thank you Best, Alex