Skip to content

Installation error during compiling #7

@well-zt

Description

@well-zt

Dear all,
I'm a new CFDer trying to do something with deepflame, but when compiling deepflame with bash install.sh I encountered such an error:

/home/wellzt/anaconda3/envs/deepflame-notorch/include/cantera/base/AnyMap.h:308:10: 
error: ‘any’ in namespace ‘std’ does not name a type
  308 |     std::any m_value;
/home/wellzt/anaconda3/envs/deepflame-notorch/include/cantera/base/AnyMap.h:308:5: 
note: ‘std::any’ is only available from C++17 onwards
  308 |     std::any m_value;

as well as

home/wellzt/anaconda3/envs/deepflame-notorch/include/cantera/base/utilities.h:209:64: error: template argument 2 is invalid
  209 |     struct detector_name<T, std::void_t<decltype(&T::func_name)>> : std::true_type {};
      |                                                                ^~
/home/wellzt/anaconda3/envs/deepflame-notorch/include/cantera/kinetics/MultiRate.h:24:5: note: in expansion of macro ‘CT_DEFINE_HAS_MEMBER’
   24 |     CT_DEFINE_HAS_MEMBER(has_ddT, ddTScaledFromStruct)
      |     ^~~~~~~~~~~~~~~~~~~~
/home/wellzt/anaconda3/envs/deepflame-notorch/include/cantera/base/utilities.h:209:34: note: ‘std::void_t’ is only available from C++17 onwards
  209 |     struct detector_name<T, std::void_t<decltype(&T::func_name)>> : std::true_type {};
      |                                  ^~~~~~
/home/wellzt/anaconda3/envs/deepflame-notorch/include/cantera/kinetics/MultiRate.h:25:5: note: in expansion of macro ‘CT_DEFINE_HAS_MEMBER’
   25 |     CT_DEFINE_HAS_MEMBER(has_ddP, perturbPressure)
      |     ^~~~~~~~~~~~~~~~~~~~
/home/wellzt/anaconda3/envs/deepflame-notorch/include/cantera/base/utilities.h:209:34: error: ‘void_t’ is not a member of ‘std’
  209 |     struct detector_name<T, std::void_t<decltype(&T::func_name)>> : std::true_type {};

I think it has something to do with C++ standard, so I try to switch my compiler to g++10 and 13 but it didn't work.

How can I fix this error?

Thank you so much.

2025/01/07 mark

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions