fatal error: cantera/ext/fmt/format.h: No such file or directory

985 views
Skip to first unread message

Thamarai Kannan

unread,
Aug 5, 2021, 8:18:44 AM8/5/21
to Cantera Users' Group
Dear all, 

Im very new to programming and cantera. I downloaded the source code from https://github.com/Cantera/cantera/releases and have installed cantera in my ubunu 20.04.2.0 as mentioned here https://cantera.org/install/ubuntu-install.html .when I tired to run a simple example https://cantera.org/tutorials/cxx-guide/simple-example.html im getting the following error 

In file included from /home/lab427/cantera/cantera2.5.1/include/cantera/base/ctexceptions.h:14,
                 from /home/lab427/cantera/cantera2.5.1/include/cantera/thermo/Phase.h:12,
                 from /home/lab427/cantera/cantera2.5.1/include/cantera/thermo/ThermoPhase.h:14,
                 from /home/lab427/cantera/cantera2.5.1/include/cantera/thermo.h:12,
                 from ex.cpp:1:
/home/lab427/cantera/cantera2.5.1/include/cantera/base/fmt.h:27:12: fatal error: cantera/ext/fmt/format.h: No such file or directory
   27 |   #include "cantera/ext/fmt/format.h"
      |            ^~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
As the error mentions format.h file is missing. But while downloading from the source code itself there is no such file.

can anyone please guide me in this.

Thank you.

Ray Speth

unread,
Aug 5, 2021, 11:33:04 PM8/5/21
to Cantera Users' Group

Hi,

Following the installation instructions you linked to would have installed Cantera’s header files into the system directories, e.g. /usr/include, not a location in your home directory as reported in that . So how did you actually install Cantera?

Regards,
Ray

Thamarai Kannan

unread,
Aug 6, 2021, 10:56:17 AM8/6/21
to Cantera Users' Group
Hi Ray,
Thanks for your response. Yes cantera is installed in cantera: /usr/include/cantera /usr/share/cantera. And I compiled my program as g++ ex.cpp -I/home/lab427/cantera/cantera2.5.1/include -lcantera -lsundials_cvodes -lsundials_ida -lsundials_nvecserial . 

Thank you,
ThamaraikannanM

Ray Speth

unread,
Aug 6, 2021, 12:36:47 PM8/6/21
to Cantera Users' Group

Hi ThamaraikannanM,

What Ubuntu packages did you install? To compile C++ programs using Cantera, you must install the cantera-dev package, as it says in the instructions. You may also need to install the libfmt-dev package.

If you want to use the Ubuntu packages that you installed, you should not be referencing the location /home/lab427/cantera/cantera2.5.1 in your compiler command line. I can’t tell from what you’ve posted whether this is a copy of the Cantera source code, or an installed copy of Cantera.

If you’re still having trouble, can you please post the complete command line that you’re passing to the compiler?

Regards,
Ray

Thamarai Kannan

unread,
Aug 10, 2021, 5:46:15 AM8/10/21
to Cantera Users' Group
Dear Ray,
Thanks for your response. yes the location I posted is copy of Cantera source code. After your message I tried compiling from the installed directory using the following different command lines

1.g++ ex.cpp -o combustor -pthread -lstdc++ -I/usr/include/cantera -L/opt/cantera-2.5.1/lib -lsundials_cvodes -lsundials_ida -lsundials_nvecserial
2.g++ ex.cpp -o combustor -pthread -lstdc++ -I/usr/include/cantera
3.g++ ex.cpp -o combustor -pthread -lstdc++ -I/usr/include/cantera -L/opt/cantera-2.5.1/lib

and I  got the same  error for all the command line 

/usr/bin/ld: /tmp/ccLgzCrL.o: in function `thermo_demo(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)':
ex.cpp:(.text+0x54): undefined reference to `Cantera::newPhase(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)'
/usr/bin/ld: ex.cpp:(.text+0x33c): undefined reference to `Cantera::Phase::speciesName[abi:cxx11](unsigned long) const'
/usr/bin/ld: /tmp/ccLgzCrL.o:(.data.rel.local.DW.ref._ZTIN7Cantera12CanteraErrorE[DW.ref._ZTIN7Cantera12CanteraErrorE]+0x0): undefined reference to `typeinfo for Cantera::CanteraError'
collect2: error: ld returned 1 exit status
Thank you,

Kind Regards,
Thamaraikannan M
Message has been deleted

Thamarai Kannan

unread,
Aug 10, 2021, 9:20:09 PM8/10/21
to Cantera Users' Group
Dear Ray,

In continuation to the previous mail, I have installed Ubuntu 20.04.2.0 ,also installed cantera-dev and  libfmt-dev packages. Please help me in this. 


Thank you,
Kind Regards,
Thamaraikannan M

Ray Speth

unread,
Aug 11, 2021, 9:23:44 AM8/11/21
to Cantera Users' Group

Hi Thamaraikannan,

If you want to use the Ubuntu packages that you’ve installed, you shouldn’t specify any paths for header and library directories on the command line with the -I and -L flags. Those files are in the system-managed directories already searched by the compiler/linker. However, you do need to specify the libraries you want to link to, including Cantera. So the first thing I would try is:

 g++ ex.cpp -o combustor -pthread  -lcantera -lsundials_cvodes -lsundials_ida  -lsundials_nvecserial

If you get another error like the one you mentioned, look at names specified in the message after “undefined reference to”, e.g. Cantera::Phase::speciesName[abi:cxx11](unsigned long) const. This is telling you that in this case, it’s the Cantera library that you are missing on your command line.

Regards,
Ray

Thamarai Kannan

unread,
Aug 12, 2021, 8:23:01 AM8/12/21
to Cantera Users' Group
Hi Ray,

I understood now. I tried to compile the program wit the command 

g++ ex.cpp -o combustor -pthread -lcantera -lsundials_cvodes -lsundials_ida -lsundials_nvecserial

I got the same type of error like "undefined reference" which means that Cantera library is missing in the command line.  I tried to add the library using  usr/lib  the following command as per my knowledge libraries will be installed in usr/lib  

g++ ex.cpp -o combustor -pthread -lcantera -L/usr/lib -lsundials_cvodes -lsundials_ida -lsundials_nvecserial

again got the same error. I dont know how to add library in the command line. As cantera library is not installed in usr/lib it seems.Can you please guide me. I have attached the screen shot of the use/lib folder for you reference

Screenshot from 2021-08-12 18-33-33.pngScreenshot from 2021-08-12 20-13-38.png

Thank you,
Kind Regards,
Thamaraikannan M

Ray Speth

unread,
Aug 12, 2021, 9:13:09 AM8/12/21
to Cantera Users' Group

Hi Thamaraikannan ,

Are you sure you’re getting the exact same message, referencing the Cantera::Phase::speciesName method, or is there a different function being mentioned? The Cantera library is indeed installed in /usr/lib from the screenshot (although a text-based directory listing would have been much easier to read). The file is the one named libcantera.a. This is the file that the compiler knows to look for when you specify -lcantera on the command line. If the Cantera library was not present, then you would get a different error, something like cannot find -lcantera.

Regards,
Ray

Thamarai Kannan

unread,
Aug 12, 2021, 9:27:20 AM8/12/21
to Cantera Users' Group
Hi Ray,

Good to know that library file is installed , I'm not getting the same error but I mean same type of error. Here is the error .

/usr/bin/ld: /usr/lib/libcantera.a(DenseMatrix.os): in function `Cantera::DenseMatrix::mult(double const*, double*) const [clone .localalias]':
(.text+0x23f): undefined reference to `dgemv_'
/usr/bin/ld: /usr/lib/libcantera.a(DenseMatrix.os): in function `Cantera::multiply(Cantera::DenseMatrix const&, double const*, double*)':
(.text+0x434): undefined reference to `dgemv_'
/usr/bin/ld: /usr/lib/libcantera.a(DenseMatrix.os): in function `Cantera::increment(Cantera::DenseMatrix const&, double const*, double*)':
(.text+0x4fe): undefined reference to `dgemv_'
/usr/bin/ld: /usr/lib/libcantera.a(DenseMatrix.os): in function `Cantera::DenseMatrix::mult(Cantera::DenseMatrix const&, Cantera::DenseMatrix&) const':
(.text+0xc10): undefined reference to `dgemv_'
/usr/bin/ld: /usr/lib/libcantera.a(DenseMatrix.os): in function `Cantera::solve(Cantera::DenseMatrix&, double*, unsigned long, unsigned long)':
(.text+0xddd): undefined reference to `dgetrf_'
/usr/bin/ld: (.text+0xe46): undefined reference to `dgetrs_'
/usr/bin/ld: /usr/lib/libcantera.a(DenseMatrix.os): in function `Cantera::invert(Cantera::DenseMatrix&, unsigned long)':
(.text+0x107e): undefined reference to `dgetrf_'
/usr/bin/ld: (.text+0x1183): undefined reference to `dgetri_'
/usr/bin/ld: /usr/lib/libcantera.a(AnyMap.os): in function `Cantera::AnyMap::fromYamlString(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)':
(.text+0x7164): undefined reference to `YAML::Load(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
/usr/bin/ld: /usr/lib/libcantera.a(AnyMap.os): in function `Cantera::AnyMap::fromYamlFile(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)':
(.text+0x7696): undefined reference to `YAML::LoadFile(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
/usr/bin/ld: /usr/lib/libcantera.a(AnyMap.os): in function `YAML::TypedBadConversion<Cantera::AnyMap>::~TypedBadConversion()':
(.text._ZN4YAML18TypedBadConversionIN7Cantera6AnyMapEED2Ev[_ZN4YAML18TypedBadConversionIN7Cantera6AnyMapEED5Ev]+0x13): undefined reference to `YAML::BadConversion::~BadConversion()'
/usr/bin/ld: /usr/lib/libcantera.a(AnyMap.os): in function `YAML::TypedBadConversion<Cantera::AnyMap>::~TypedBadConversion()':
(.text._ZN4YAML18TypedBadConversionIN7Cantera6AnyMapEED0Ev[_ZN4YAML18TypedBadConversionIN7Cantera6AnyMapEED5Ev]+0x17): undefined reference to `YAML::BadConversion::~BadConversion()'
/usr/bin/ld: /usr/lib/libcantera.a(AnyMap.os): in function `YAML::TypedBadConversion<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >::~TypedBadConversion()':
(.text._ZN4YAML18TypedBadConversionINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEED2Ev[_ZN4YAML18TypedBadConversionINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEED5Ev]+0x13): undefined reference to `YAML::BadConversion::~BadConversion()'
/usr/bin/ld: /usr/lib/libcantera.a(AnyMap.os): in function `YAML::TypedBadConversion<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >::~TypedBadConversion()':
(.text._ZN4YAML18TypedBadConversionINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEED0Ev[_ZN4YAML18TypedBadConversionINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEED5Ev]+0x17): undefined reference to `YAML::BadConversion::~BadConversion()'
/usr/bin/ld: /usr/lib/libcantera.a(AnyMap.os): in function `YAML::TypedBadConversion<Cantera::AnyValue>::~TypedBadConversion()':
(.text._ZN4YAML18TypedBadConversionIN7Cantera8AnyValueEED2Ev[_ZN4YAML18TypedBadConversionIN7Cantera8AnyValueEED5Ev]+0x13): undefined reference to `YAML::BadConversion::~BadConversion()'
/usr/bin/ld: /usr/lib/libcantera.a(AnyMap.os):(.text._ZN4YAML18TypedBadConversionIN7Cantera8AnyValueEED0Ev[_ZN4YAML18TypedBadConversionIN7Cantera8AnyValueEED5Ev]+0x17): more undefined references to `YAML::BadConversion::~BadConversion()' follow
/usr/bin/ld: /usr/lib/libcantera.a(AnyMap.os): in function `YAML::BadConversion::BadConversion(YAML::Mark const&)':
(.text._ZN4YAML13BadConversionC2ERKNS_4MarkE[_ZN4YAML13BadConversionC5ERKNS_4MarkE]+0x8e): undefined reference to `vtable for YAML::Exception'
/usr/bin/ld: (.text._ZN4YAML13BadConversionC2ERKNS_4MarkE[_ZN4YAML13BadConversionC5ERKNS_4MarkE]+0xc7): undefined reference to `vtable for YAML::RepresentationException'
/usr/bin/ld: (.text._ZN4YAML13BadConversionC2ERKNS_4MarkE[_ZN4YAML13BadConversionC5ERKNS_4MarkE]+0xe4): undefined reference to `vtable for YAML::BadConversion'
/usr/bin/ld: /usr/lib/libcantera.a(AnyMap.os): in function `YAML::InvalidNode::InvalidNode()':
(.text._ZN4YAML11InvalidNodeC2Ev[_ZN4YAML11InvalidNodeC5Ev]+0xed): undefined reference to `vtable for YAML::Exception'
/usr/bin/ld: (.text._ZN4YAML11InvalidNodeC2Ev[_ZN4YAML11InvalidNodeC5Ev]+0x129): undefined reference to `vtable for YAML::RepresentationException'
/usr/bin/ld: (.text._ZN4YAML11InvalidNodeC2Ev[_ZN4YAML11InvalidNodeC5Ev]+0x147): undefined reference to `vtable for YAML::InvalidNode'
/usr/bin/ld: /usr/lib/libcantera.a(AnyMap.os): in function `YAML::Node::Type() const':
(.text._ZNK4YAML4Node4TypeEv[_ZNK4YAML4Node4TypeEv]+0x4d): undefined reference to `YAML::InvalidNode::~InvalidNode()'
/usr/bin/ld: (.text._ZNK4YAML4Node4TypeEv[_ZNK4YAML4Node4TypeEv]+0x54): undefined reference to `typeinfo for YAML::InvalidNode'
/usr/bin/ld: /usr/lib/libcantera.a(AnyMap.os): in function `YAML::Node::Mark() const':
(.text._ZNK4YAML4Node4MarkEv[_ZNK4YAML4Node4MarkEv]+0x6b): undefined reference to `YAML::InvalidNode::~InvalidNode()'
/usr/bin/ld: (.text._ZNK4YAML4Node4MarkEv[_ZNK4YAML4Node4MarkEv]+0x72): undefined reference to `typeinfo for YAML::InvalidNode'
/usr/bin/ld: /usr/lib/libcantera.a(AnyMap.os): in function `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > YAML::Node::as<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >() const':
(.text._ZNK4YAML4Node2asINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEET_v[_ZNK4YAML4Node2asINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEET_v]+0xea): undefined reference to `YAML::InvalidNode::~InvalidNode()'
/usr/bin/ld: (.text._ZNK4YAML4Node2asINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEET_v[_ZNK4YAML4Node2asINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEET_v]+0xf1): undefined reference to `typeinfo for YAML::InvalidNode'
/usr/bin/ld: /usr/lib/libcantera.a(AnyMap.os): in function `YAML::Node::begin() const':
(.text._ZNK4YAML4Node5beginEv[_ZNK4YAML4Node5beginEv]+0x5f): undefined reference to `YAML::detail::node_data::begin()'
/usr/bin/ld: /usr/lib/libcantera.a(AnyMap.os): in function `YAML::Node::end() const':
(.text._ZNK4YAML4Node3endEv[_ZNK4YAML4Node3endEv]+0x5f): undefined reference to `YAML::detail::node_data::end()'
/usr/bin/ld: /usr/lib/libcantera.a(AnyMap.os): in function `(anonymous namespace)::elementTypes(YAML::Node const&)':
(.text._ZN12_GLOBAL__N_112elementTypesERKN4YAML4NodeE[_ZN4YAML7convertIN7Cantera8AnyValueEE6decodeERKNS_4NodeERS2_]+0x40b): undefined reference to `YAML::InvalidNode::~InvalidNode()'
/usr/bin/ld: (.text._ZN12_GLOBAL__N_112elementTypesERKN4YAML4NodeE[_ZN4YAML7convertIN7Cantera8AnyValueEE6decodeERKNS_4NodeERS2_]+0x412): undefined reference to `typeinfo for YAML::InvalidNode'
/usr/bin/ld: /usr/lib/libcantera.a(AnyMap.os): in function `YAML::convert<std::vector<double, std::allocator<double> > >::decode(YAML::Node const&, std::vector<double, std::allocator<double> >&)':
(.text._ZN4YAML7convertISt6vectorIdSaIdEEE6decodeERKNS_4NodeERS3_[_ZN4YAML7convertISt6vectorIdSaIdEEE6decodeERKNS_4NodeERS3_]+0xe6): undefined reference to `YAML::detail::node_data::end()'
/usr/bin/ld: (.text._ZN4YAML7convertISt6vectorIdSaIdEEE6decodeERKNS_4NodeERS3_[_ZN4YAML7convertISt6vectorIdSaIdEEE6decodeERKNS_4NodeERS3_]+0xee2): undefined reference to `YAML::InvalidNode::~InvalidNode()'
/usr/bin/ld: (.text._ZN4YAML7convertISt6vectorIdSaIdEEE6decodeERKNS_4NodeERS3_[_ZN4YAML7convertISt6vectorIdSaIdEEE6decodeERKNS_4NodeERS3_]+0xee9): undefined reference to `typeinfo for YAML::InvalidNode'
/usr/bin/ld: (.text._ZN4YAML7convertISt6vectorIdSaIdEEE6decodeERKNS_4NodeERS3_[_ZN4YAML7convertISt6vectorIdSaIdEEE6decodeERKNS_4NodeERS3_]+0x1007): undefined reference to `YAML::InvalidNode::~InvalidNode()'
/usr/bin/ld: (.text._ZN4YAML7convertISt6vectorIdSaIdEEE6decodeERKNS_4NodeERS3_[_ZN4YAML7convertISt6vectorIdSaIdEEE6decodeERKNS_4NodeERS3_]+0x100e): undefined reference to `typeinfo for YAML::InvalidNode'
/usr/bin/ld: /usr/lib/libcantera.a(AnyMap.os): in function `YAML::convert<std::vector<std::vector<double, std::allocator<double> >, std::allocator<std::vector<double, std::allocator<double> > > > >::decode(YAML::Node const&, std::vector<std::vector<double, std::allocator<double> >, std::allocator<std::vector<double, std::allocator<double> > > >&)':
(.text._ZN4YAML7convertISt6vectorIS1_IdSaIdEESaIS3_EEE6decodeERKNS_4NodeERS5_[_ZN4YAML7convertISt6vectorIS1_IdSaIdEESaIS3_EEE6decodeERKNS_4NodeERS5_]+0x102): undefined reference to `YAML::detail::node_data::end()'
/usr/bin/ld: (.text._ZN4YAML7convertISt6vectorIS1_IdSaIdEESaIS3_EEE6decodeERKNS_4NodeERS5_[_ZN4YAML7convertISt6vectorIS1_IdSaIdEESaIS3_EEE6decodeERKNS_4NodeERS5_]+0x97d): undefined reference to `YAML::InvalidNode::~InvalidNode()'
/usr/bin/ld: (.text._ZN4YAML7convertISt6vectorIS1_IdSaIdEESaIS3_EEE6decodeERKNS_4NodeERS5_[_ZN4YAML7convertISt6vectorIS1_IdSaIdEESaIS3_EEE6decodeERKNS_4NodeERS5_]+0x984): undefined reference to `typeinfo for YAML::InvalidNode'
/usr/bin/ld: (.text._ZN4YAML7convertISt6vectorIS1_IdSaIdEESaIS3_EEE6decodeERKNS_4NodeERS5_[_ZN4YAML7convertISt6vectorIS1_IdSaIdEESaIS3_EEE6decodeERKNS_4NodeERS5_]+0x9d9): undefined reference to `YAML::InvalidNode::~InvalidNode()'
/usr/bin/ld: (.text._ZN4YAML7convertISt6vectorIS1_IdSaIdEESaIS3_EEE6decodeERKNS_4NodeERS5_[_ZN4YAML7convertISt6vectorIS1_IdSaIdEESaIS3_EEE6decodeERKNS_4NodeERS5_]+0x9e0): undefined reference to `typeinfo for YAML::InvalidNode'
/usr/bin/ld: /usr/lib/libcantera.a(AnyMap.os): in function `YAML::convert<double>::decode(YAML::Node const&, double&)':
(.text._ZN4YAML7convertIdE6decodeERKNS_4NodeERd[_ZN4YAML7convertIdE6decodeERKNS_4NodeERd]+0x406): undefined reference to `YAML::InvalidNode::~InvalidNode()'
/usr/bin/ld: (.text._ZN4YAML7convertIdE6decodeERKNS_4NodeERd[_ZN4YAML7convertIdE6decodeERKNS_4NodeERd]+0x40d): undefined reference to `typeinfo for YAML::InvalidNode'
/usr/bin/ld: /usr/lib/libcantera.a(AnyMap.os): in function `double YAML::Node::as<double>() const':
(.text._ZNK4YAML4Node2asIdEET_v[_ZNK4YAML4Node2asIdEET_v]+0xf1): undefined reference to `YAML::InvalidNode::~InvalidNode()'
/usr/bin/ld: (.text._ZNK4YAML4Node2asIdEET_v[_ZNK4YAML4Node2asIdEET_v]+0xf8): undefined reference to `typeinfo for YAML::InvalidNode'
/usr/bin/ld: /usr/lib/libcantera.a(AnyMap.os): in function `YAML::convert<std::vector<bool, std::allocator<bool> > >::decode(YAML::Node const&, std::vector<bool, std::allocator<bool> >&)':
(.text._ZN4YAML7convertISt6vectorIbSaIbEEE6decodeERKNS_4NodeERS3_[_ZN4YAML7convertISt6vectorIbSaIbEEE6decodeERKNS_4NodeERS3_]+0xda): undefined reference to `YAML::detail::node_data::end()'
/usr/bin/ld: (.text._ZN4YAML7convertISt6vectorIbSaIbEEE6decodeERKNS_4NodeERS3_[_ZN4YAML7convertISt6vectorIbSaIbEEE6decodeERKNS_4NodeERS3_]+0x32e): undefined reference to `YAML::convert<bool>::decode(YAML::Node const&, bool&)'
/usr/bin/ld: (.text._ZN4YAML7convertISt6vectorIbSaIbEEE6decodeERKNS_4NodeERS3_[_ZN4YAML7convertISt6vectorIbSaIbEEE6decodeERKNS_4NodeERS3_]+0x8a9): undefined reference to `YAML::InvalidNode::~InvalidNode()'
/usr/bin/ld: (.text._ZN4YAML7convertISt6vectorIbSaIbEEE6decodeERKNS_4NodeERS3_[_ZN4YAML7convertISt6vectorIbSaIbEEE6decodeERKNS_4NodeERS3_]+0x8b0): undefined reference to `typeinfo for YAML::InvalidNode'
/usr/bin/ld: (.text._ZN4YAML7convertISt6vectorIbSaIbEEE6decodeERKNS_4NodeERS3_[_ZN4YAML7convertISt6vectorIbSaIbEEE6decodeERKNS_4NodeERS3_]+0x98f): undefined reference to `YAML::InvalidNode::~InvalidNode()'
/usr/bin/ld: (.text._ZN4YAML7convertISt6vectorIbSaIbEEE6decodeERKNS_4NodeERS3_[_ZN4YAML7convertISt6vectorIbSaIbEEE6decodeERKNS_4NodeERS3_]+0x996): undefined reference to `typeinfo for YAML::InvalidNode'
/usr/bin/ld: /usr/lib/libcantera.a(AnyMap.os): in function `YAML::convert<std::vector<long, std::allocator<long> > >::decode(YAML::Node const&, std::vector<long, std::allocator<long> >&)':
(.text._ZN4YAML7convertISt6vectorIlSaIlEEE6decodeERKNS_4NodeERS3_[_ZN4YAML7convertISt6vectorIlSaIlEEE6decodeERKNS_4NodeERS3_]+0xe1): undefined reference to `YAML::detail::node_data::end()'
/usr/bin/ld: (.text._ZN4YAML7convertISt6vectorIlSaIlEEE6decodeERKNS_4NodeERS3_[_ZN4YAML7convertISt6vectorIlSaIlEEE6decodeERKNS_4NodeERS3_]+0xca6): undefined reference to `YAML::InvalidNode::~InvalidNode()'
/usr/bin/ld: (.text._ZN4YAML7convertISt6vectorIlSaIlEEE6decodeERKNS_4NodeERS3_[_ZN4YAML7convertISt6vectorIlSaIlEEE6decodeERKNS_4NodeERS3_]+0xcad): undefined reference to `typeinfo for YAML::InvalidNode'
/usr/bin/ld: (.text._ZN4YAML7convertISt6vectorIlSaIlEEE6decodeERKNS_4NodeERS3_[_ZN4YAML7convertISt6vectorIlSaIlEEE6decodeERKNS_4NodeERS3_]+0xd9b): undefined reference to `YAML::InvalidNode::~InvalidNode()'
/usr/bin/ld: (.text._ZN4YAML7convertISt6vectorIlSaIlEEE6decodeERKNS_4NodeERS3_[_ZN4YAML7convertISt6vectorIlSaIlEEE6decodeERKNS_4NodeERS3_]+0xda2): undefined reference to `typeinfo for YAML::InvalidNode'
/usr/bin/ld: /usr/lib/libcantera.a(AnyMap.os): in function `std::vector<long, std::allocator<long> > YAML::Node::as<std::vector<long, std::allocator<long> > >() const':
(.text._ZNK4YAML4Node2asISt6vectorIlSaIlEEEET_v[_ZNK4YAML4Node2asISt6vectorIlSaIlEEEET_v]+0x15d): undefined reference to `YAML::InvalidNode::~InvalidNode()'
/usr/bin/ld: (.text._ZNK4YAML4Node2asISt6vectorIlSaIlEEEET_v[_ZNK4YAML4Node2asISt6vectorIlSaIlEEEET_v]+0x164): undefined reference to `typeinfo for YAML::InvalidNode'
/usr/bin/ld: /usr/lib/libcantera.a(AnyMap.os): in function `YAML::convert<std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > >::decode(YAML::Node const&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >&)':
(.text._ZN4YAML7convertISt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS7_EEE6decodeERKNS_4NodeERS9_[_ZN4YAML7convertISt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS7_EEE6decodeERKNS_4NodeERS9_]+0x109): undefined reference to `YAML::detail::node_data::end()'
/usr/bin/ld: (.text._ZN4YAML7convertISt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS7_EEE6decodeERKNS_4NodeERS9_[_ZN4YAML7convertISt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS7_EEE6decodeERKNS_4NodeERS9_]+0x93d): undefined reference to `YAML::InvalidNode::~InvalidNode()'
/usr/bin/ld: (.text._ZN4YAML7convertISt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS7_EEE6decodeERKNS_4NodeERS9_[_ZN4YAML7convertISt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS7_EEE6decodeERKNS_4NodeERS9_]+0x944): undefined reference to `typeinfo for YAML::InvalidNode'
/usr/bin/ld: (.text._ZN4YAML7convertISt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS7_EEE6decodeERKNS_4NodeERS9_[_ZN4YAML7convertISt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS7_EEE6decodeERKNS_4NodeERS9_]+0x9c4): undefined reference to `YAML::InvalidNode::~InvalidNode()'
/usr/bin/ld: (.text._ZN4YAML7convertISt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS7_EEE6decodeERKNS_4NodeERS9_[_ZN4YAML7convertISt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS7_EEE6decodeERKNS_4NodeERS9_]+0x9cb): undefined reference to `typeinfo for YAML::InvalidNode'
/usr/bin/ld: /usr/lib/libcantera.a(AnyMap.os): in function `YAML::convert<std::vector<std::vector<long, std::allocator<long> >, std::allocator<std::vector<long, std::allocator<long> > > > >::decode(YAML::Node const&, std::vector<std::vector<long, std::allocator<long> >, std::allocator<std::vector<long, std::allocator<long> > > >&)':
(.text._ZN4YAML7convertISt6vectorIS1_IlSaIlEESaIS3_EEE6decodeERKNS_4NodeERS5_[_ZN4YAML7convertISt6vectorIS1_IlSaIlEESaIS3_EEE6decodeERKNS_4NodeERS5_]+0x102): undefined reference to `YAML::detail::node_data::end()'
/usr/bin/ld: (.text._ZN4YAML7convertISt6vectorIS1_IlSaIlEESaIS3_EEE6decodeERKNS_4NodeERS5_[_ZN4YAML7convertISt6vectorIS1_IlSaIlEESaIS3_EEE6decodeERKNS_4NodeERS5_]+0x802): undefined reference to `YAML::InvalidNode::~InvalidNode()'
/usr/bin/ld: (.text._ZN4YAML7convertISt6vectorIS1_IlSaIlEESaIS3_EEE6decodeERKNS_4NodeERS5_[_ZN4YAML7convertISt6vectorIS1_IlSaIlEESaIS3_EEE6decodeERKNS_4NodeERS5_]+0x809): undefined reference to `typeinfo for YAML::InvalidNode'
/usr/bin/ld: (.text._ZN4YAML7convertISt6vectorIS1_IlSaIlEESaIS3_EEE6decodeERKNS_4NodeERS5_[_ZN4YAML7convertISt6vectorIS1_IlSaIlEESaIS3_EEE6decodeERKNS_4NodeERS5_]+0x89c): undefined reference to `YAML::InvalidNode::~InvalidNode()'
/usr/bin/ld: (.text._ZN4YAML7convertISt6vectorIS1_IlSaIlEESaIS3_EEE6decodeERKNS_4NodeERS5_[_ZN4YAML7convertISt6vectorIS1_IlSaIlEESaIS3_EEE6decodeERKNS_4NodeERS5_]+0x8a3): undefined reference to `typeinfo for YAML::InvalidNode'
/usr/bin/ld: /usr/lib/libcantera.a(AnyMap.os): in function `YAML::convert<Cantera::AnyMap>::decode(YAML::Node const&, Cantera::AnyMap&)':
(.text._ZN4YAML7convertIN7Cantera6AnyMapEE6decodeERKNS_4NodeERS2_[_ZN4YAML7convertIN7Cantera6AnyMapEE6decodeERKNS_4NodeERS2_]+0x92): undefined reference to `YAML::Dump[abi:cxx11](YAML::Node const&)'
/usr/bin/ld: (.text._ZN4YAML7convertIN7Cantera6AnyMapEE6decodeERKNS_4NodeERS2_[_ZN4YAML7convertIN7Cantera6AnyMapEE6decodeERKNS_4NodeERS2_]+0x413): undefined reference to `YAML::detail::node_data::empty_scalar[abi:cxx11]'
/usr/bin/ld: (.text._ZN4YAML7convertIN7Cantera6AnyMapEE6decodeERKNS_4NodeERS2_[_ZN4YAML7convertIN7Cantera6AnyMapEE6decodeERKNS_4NodeERS2_]+0x555): undefined reference to `YAML::InvalidNode::~InvalidNode()'
/usr/bin/ld: (.text._ZN4YAML7convertIN7Cantera6AnyMapEE6decodeERKNS_4NodeERS2_[_ZN4YAML7convertIN7Cantera6AnyMapEE6decodeERKNS_4NodeERS2_]+0x55c): undefined reference to `typeinfo for YAML::InvalidNode'
/usr/bin/ld: (.text._ZN4YAML7convertIN7Cantera6AnyMapEE6decodeERKNS_4NodeERS2_[_ZN4YAML7convertIN7Cantera6AnyMapEE6decodeERKNS_4NodeERS2_]+0x701): undefined reference to `YAML::InvalidNode::~InvalidNode()'
/usr/bin/ld: (.text._ZN4YAML7convertIN7Cantera6AnyMapEE6decodeERKNS_4NodeERS2_[_ZN4YAML7convertIN7Cantera6AnyMapEE6decodeERKNS_4NodeERS2_]+0x708): undefined reference to `typeinfo for YAML::InvalidNode'
/usr/bin/ld: (.text._ZN4YAML7convertIN7Cantera6AnyMapEE6decodeERKNS_4NodeERS2_[_ZN4YAML7convertIN7Cantera6AnyMapEE6decodeERKNS_4NodeERS2_]+0x76c): undefined reference to `YAML::InvalidNode::~InvalidNode()'
/usr/bin/ld: (.text._ZN4YAML7convertIN7Cantera6AnyMapEE6decodeERKNS_4NodeERS2_[_ZN4YAML7convertIN7Cantera6AnyMapEE6decodeERKNS_4NodeERS2_]+0x773): undefined reference to `typeinfo for YAML::InvalidNode'
/usr/bin/ld: /usr/lib/libcantera.a(AnyMap.os): in function `Cantera::AnyMap YAML::Node::as<Cantera::AnyMap>() const':
(.text._ZNK4YAML4Node2asIN7Cantera6AnyMapEEET_v[_ZNK4YAML4Node2asIN7Cantera6AnyMapEEET_v]+0x197): undefined reference to `YAML::InvalidNode::~InvalidNode()'
/usr/bin/ld: (.text._ZNK4YAML4Node2asIN7Cantera6AnyMapEEET_v[_ZNK4YAML4Node2asIN7Cantera6AnyMapEEET_v]+0x19e): undefined reference to `typeinfo for YAML::InvalidNode'
/usr/bin/ld: /usr/lib/libcantera.a(AnyMap.os): in function `YAML::convert<std::vector<Cantera::AnyMap, std::allocator<Cantera::AnyMap> > >::decode(YAML::Node const&, std::vector<Cantera::AnyMap, std::allocator<Cantera::AnyMap> >&)':
(.text._ZN4YAML7convertISt6vectorIN7Cantera6AnyMapESaIS3_EEE6decodeERKNS_4NodeERS5_[_ZN4YAML7convertISt6vectorIN7Cantera6AnyMapESaIS3_EEE6decodeERKNS_4NodeERS5_]+0xee): undefined reference to `YAML::detail::node_data::end()'
/usr/bin/ld: (.text._ZN4YAML7convertISt6vectorIN7Cantera6AnyMapESaIS3_EEE6decodeERKNS_4NodeERS5_[_ZN4YAML7convertISt6vectorIN7Cantera6AnyMapESaIS3_EEE6decodeERKNS_4NodeERS5_]+0xa51): undefined reference to `YAML::InvalidNode::~InvalidNode()'
/usr/bin/ld: (.text._ZN4YAML7convertISt6vectorIN7Cantera6AnyMapESaIS3_EEE6decodeERKNS_4NodeERS5_[_ZN4YAML7convertISt6vectorIN7Cantera6AnyMapESaIS3_EEE6decodeERKNS_4NodeERS5_]+0xa58): undefined reference to `typeinfo for YAML::InvalidNode'
/usr/bin/ld: (.text._ZN4YAML7convertISt6vectorIN7Cantera6AnyMapESaIS3_EEE6decodeERKNS_4NodeERS5_[_ZN4YAML7convertISt6vectorIN7Cantera6AnyMapESaIS3_EEE6decodeERKNS_4NodeERS5_]+0xa7c): undefined reference to `YAML::InvalidNode::~InvalidNode()'
/usr/bin/ld: (.text._ZN4YAML7convertISt6vectorIN7Cantera6AnyMapESaIS3_EEE6decodeERKNS_4NodeERS5_[_ZN4YAML7convertISt6vectorIN7Cantera6AnyMapESaIS3_EEE6decodeERKNS_4NodeERS5_]+0xa83): undefined reference to `typeinfo for YAML::InvalidNode'
/usr/bin/ld: /usr/lib/libcantera.a(AnyMap.os): in function `YAML::convert<Cantera::AnyValue>::decode(YAML::Node const&, Cantera::AnyValue&)':
(.text._ZN4YAML7convertIN7Cantera8AnyValueEE6decodeERKNS_4NodeERS2_[_ZN4YAML7convertIN7Cantera8AnyValueEE6decodeERKNS_4NodeERS2_]+0x2ce): undefined reference to `YAML::convert<bool>::decode(YAML::Node const&, bool&)'
/usr/bin/ld: (.text._ZN4YAML7convertIN7Cantera8AnyValueEE6decodeERKNS_4NodeERS2_[_ZN4YAML7convertIN7Cantera8AnyValueEE6decodeERKNS_4NodeERS2_]+0x3a3): undefined reference to `YAML::detail::node_data::empty_scalar[abi:cxx11]'
/usr/bin/ld: (.text._ZN4YAML7convertIN7Cantera8AnyValueEE6decodeERKNS_4NodeERS2_[_ZN4YAML7convertIN7Cantera8AnyValueEE6decodeERKNS_4NodeERS2_]+0x964): undefined reference to `YAML::detail::node_data::empty_scalar[abi:cxx11]'
/usr/bin/ld: (.text._ZN4YAML7convertIN7Cantera8AnyValueEE6decodeERKNS_4NodeERS2_[_ZN4YAML7convertIN7Cantera8AnyValueEE6decodeERKNS_4NodeERS2_]+0xc65): undefined reference to `YAML::InvalidNode::~InvalidNode()'
/usr/bin/ld: (.text._ZN4YAML7convertIN7Cantera8AnyValueEE6decodeERKNS_4NodeERS2_[_ZN4YAML7convertIN7Cantera8AnyValueEE6decodeERKNS_4NodeERS2_]+0xc6c): undefined reference to `typeinfo for YAML::InvalidNode'
/usr/bin/ld: (.text._ZN4YAML7convertIN7Cantera8AnyValueEE6decodeERKNS_4NodeERS2_[_ZN4YAML7convertIN7Cantera8AnyValueEE6decodeERKNS_4NodeERS2_]+0xfcc): undefined reference to `YAML::InvalidNode::~InvalidNode()'
/usr/bin/ld: (.text._ZN4YAML7convertIN7Cantera8AnyValueEE6decodeERKNS_4NodeERS2_[_ZN4YAML7convertIN7Cantera8AnyValueEE6decodeERKNS_4NodeERS2_]+0xfd3): undefined reference to `typeinfo for YAML::InvalidNode'
/usr/bin/ld: (.text._ZN4YAML7convertIN7Cantera8AnyValueEE6decodeERKNS_4NodeERS2_[_ZN4YAML7convertIN7Cantera8AnyValueEE6decodeERKNS_4NodeERS2_]+0x1260): undefined reference to `YAML::InvalidNode::~InvalidNode()'
/usr/bin/ld: (.text._ZN4YAML7convertIN7Cantera8AnyValueEE6decodeERKNS_4NodeERS2_[_ZN4YAML7convertIN7Cantera8AnyValueEE6decodeERKNS_4NodeERS2_]+0x1267): undefined reference to `typeinfo for YAML::InvalidNode'
/usr/bin/ld: (.text._ZN4YAML7convertIN7Cantera8AnyValueEE6decodeERKNS_4NodeERS2_[_ZN4YAML7convertIN7Cantera8AnyValueEE6decodeERKNS_4NodeERS2_]+0x12a9): undefined reference to `YAML::InvalidNode::~InvalidNode()'
/usr/bin/ld: (.text._ZN4YAML7convertIN7Cantera8AnyValueEE6decodeERKNS_4NodeERS2_[_ZN4YAML7convertIN7Cantera8AnyValueEE6decodeERKNS_4NodeERS2_]+0x12b0): undefined reference to `typeinfo for YAML::InvalidNode'
/usr/bin/ld: (.text._ZN4YAML7convertIN7Cantera8AnyValueEE6decodeERKNS_4NodeERS2_[_ZN4YAML7convertIN7Cantera8AnyValueEE6decodeERKNS_4NodeERS2_]+0x1330): undefined reference to `YAML::InvalidNode::~InvalidNode()'
/usr/bin/ld: (.text._ZN4YAML7convertIN7Cantera8AnyValueEE6decodeERKNS_4NodeERS2_[_ZN4YAML7convertIN7Cantera8AnyValueEE6decodeERKNS_4NodeERS2_]+0x1337): undefined reference to `typeinfo for YAML::InvalidNode'
/usr/bin/ld: /usr/lib/libcantera.a(AnyMap.os): in function `Cantera::AnyValue YAML::Node::as<Cantera::AnyValue>() const':
(.text._ZNK4YAML4Node2asIN7Cantera8AnyValueEEET_v[_ZNK4YAML4Node2asIN7Cantera8AnyValueEEET_v]+0x14d): undefined reference to `YAML::InvalidNode::~InvalidNode()'
/usr/bin/ld: (.text._ZNK4YAML4Node2asIN7Cantera8AnyValueEEET_v[_ZNK4YAML4Node2asIN7Cantera8AnyValueEEET_v]+0x154): undefined reference to `typeinfo for YAML::InvalidNode'
/usr/bin/ld: /usr/lib/libcantera.a(AnyMap.os): in function `YAML::convert<std::vector<Cantera::AnyValue, std::allocator<Cantera::AnyValue> > >::decode(YAML::Node const&, std::vector<Cantera::AnyValue, std::allocator<Cantera::AnyValue> >&)':
(.text._ZN4YAML7convertISt6vectorIN7Cantera8AnyValueESaIS3_EEE6decodeERKNS_4NodeERS5_[_ZN4YAML7convertISt6vectorIN7Cantera8AnyValueESaIS3_EEE6decodeERKNS_4NodeERS5_]+0xfa): undefined reference to `YAML::detail::node_data::end()'
/usr/bin/ld: (.text._ZN4YAML7convertISt6vectorIN7Cantera8AnyValueESaIS3_EEE6decodeERKNS_4NodeERS5_[_ZN4YAML7convertISt6vectorIN7Cantera8AnyValueESaIS3_EEE6decodeERKNS_4NodeERS5_]+0x885): undefined reference to `YAML::InvalidNode::~InvalidNode()'
/usr/bin/ld: (.text._ZN4YAML7convertISt6vectorIN7Cantera8AnyValueESaIS3_EEE6decodeERKNS_4NodeERS5_[_ZN4YAML7convertISt6vectorIN7Cantera8AnyValueESaIS3_EEE6decodeERKNS_4NodeERS5_]+0x88c): undefined reference to `typeinfo for YAML::InvalidNode'
/usr/bin/ld: (.text._ZN4YAML7convertISt6vectorIN7Cantera8AnyValueESaIS3_EEE6decodeERKNS_4NodeERS5_[_ZN4YAML7convertISt6vectorIN7Cantera8AnyValueESaIS3_EEE6decodeERKNS_4NodeERS5_]+0x9cd): undefined reference to `YAML::InvalidNode::~InvalidNode()'
/usr/bin/ld: (.text._ZN4YAML7convertISt6vectorIN7Cantera8AnyValueESaIS3_EEE6decodeERKNS_4NodeERS5_[_ZN4YAML7convertISt6vectorIN7Cantera8AnyValueESaIS3_EEE6decodeERKNS_4NodeERS5_]+0x9d4): undefined reference to `typeinfo for YAML::InvalidNode'
/usr/bin/ld: /usr/lib/libcantera.a(AnyMap.os): in function `std::vector<Cantera::AnyValue, std::allocator<Cantera::AnyValue> > YAML::Node::as<std::vector<Cantera::AnyValue, std::allocator<Cantera::AnyValue> > >() const':
(.text._ZNK4YAML4Node2asISt6vectorIN7Cantera8AnyValueESaIS4_EEEET_v[_ZNK4YAML4Node2asISt6vectorIN7Cantera8AnyValueESaIS4_EEEET_v]+0x157): undefined reference to `YAML::InvalidNode::~InvalidNode()'
/usr/bin/ld: (.text._ZNK4YAML4Node2asISt6vectorIN7Cantera8AnyValueESaIS4_EEEET_v[_ZNK4YAML4Node2asISt6vectorIN7Cantera8AnyValueESaIS4_EEEET_v]+0x15e): undefined reference to `typeinfo for YAML::InvalidNode'
/usr/bin/ld: /usr/lib/libcantera.a(AnyMap.os):(.data.rel.ro._ZTIN4YAML18TypedBadConversionINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEE[_ZTIN4YAML18TypedBadConversionINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEE]+0x10): undefined reference to `typeinfo for YAML::BadConversion'
/usr/bin/ld: /usr/lib/libcantera.a(AnyMap.os):(.data.rel.ro._ZTIN4YAML18TypedBadConversionIN7Cantera8AnyValueEEE[_ZTIN4YAML18TypedBadConversionIN7Cantera8AnyValueEEE]+0x10): undefined reference to `typeinfo for YAML::BadConversion'
/usr/bin/ld: /usr/lib/libcantera.a(AnyMap.os):(.data.rel.ro._ZTIN4YAML18TypedBadConversionIN7Cantera6AnyMapEEE[_ZTIN4YAML18TypedBadConversionIN7Cantera6AnyMapEEE]+0x10): undefined reference to `typeinfo for YAML::BadConversion'
/usr/bin/ld: /usr/lib/libcantera.a(AnyMap.os):(.data.rel.ro._ZTIN4YAML18TypedBadConversionIlEE[_ZTIN4YAML18TypedBadConversionIlEE]+0x10): undefined reference to `typeinfo for YAML::BadConversion'
/usr/bin/ld: /usr/lib/libcantera.a(AnyMap.os):(.data.rel.ro._ZTIN4YAML18TypedBadConversionIdEE[_ZTIN4YAML18TypedBadConversionIdEE]+0x10): undefined reference to `typeinfo for YAML::BadConversion'
/usr/bin/ld: /usr/lib/libcantera.a(AnyMap.os):(.data.rel.ro._ZTIN4YAML18TypedBadConversionIbEE[_ZTIN4YAML18TypedBadConversionIbEE]+0x10): more undefined references to `typeinfo for YAML::BadConversion' follow
/usr/bin/ld: /usr/lib/libcantera.a(AnyMap.os):(.data.rel.local.DW.ref._ZTIN4YAML9ExceptionE[DW.ref._ZTIN4YAML9ExceptionE]+0x0): undefined reference to `typeinfo for YAML::Exception'

collect2: error: ld returned 1 exit status


Thank you,
Kind Regards,
Thamaraikannan M

Thamarai Kannan

unread,
Aug 16, 2021, 12:19:43 AM8/16/21
to Cantera Users' Group
Dear Ray,
With your help I got the expected output. I added -lyaml-cpp -lblas -llapack to my command line.

I used g++ ex.cpp -o combustor -pthread  -lcantera -lyaml-cpp -lblas -llapack -lsundials_cvodes -lsundials_ida  -lsundials_nvecserial and got the output.

Thanks for your help.

Once again Thank you,

Kind Regards,
Thamaraikannan M

Reply all
Reply to author
Forward
0 new messages