Error during compilation on Ubuntu 20.04 and 22.04
Closed this issue · 5 comments
Mautly commented
Compilation on Ubuntu generates an error while linking the exectuable.
$ /mnt/d/HZB/Software/Linux/cpp/kafka-to-nexus/_build$ make
[ 45%] Built target kafka_to_nexus__objects
[ 49%] Built target NeXusDataset
[ 50%] Built target f142_writer
[ 52%] Built target ev42_writer
[ 53%] Built target senv_writer
[ 54%] Built target NDAr_writer
[ 56%] Built target ADAr_writer
[ 57%] Built target template_writer
[ 63%] Built target hs00_writer
[ 64%] Built target tdct_writer
[ 64%] Built target ns10_writer
[ 66%] Built target f142_test_writer
[ 66%] Built target ep00_writer
[ 66%] Built target scal_writer
[ 67%] Built target pvAl_writer
[ 69%] Built target pvCn_writer
[ 69%] Built target f142_extractor
[ 70%] Built target ev42_extractor
[ 71%] Built target senv_extractor
[ 71%] Built target NDAr_extractor
[ 71%] Built target ADAr_extractor
[ 71%] Built target template_module_extractor
[ 73%] Built target hs00_extractor
[ 73%] Built target tdct_extractor
[ 74%] Built target ns10_extractor
[ 76%] Built target ep00_extractor
[ 76%] Built target pvCn_extractor
[ 77%] Built target pvAl_extractor
[ 78%] Built target scal_extractor
[ 80%] Linking CXX executable ../bin/kafka-to-nexus
/home/mautly/.conan/data/fmt/8.1.1/_/_/package/3bb43d390932310d9ef00e9986e41f02509d79e8/include/fmt/core.h:3119: error: undefined reference to 'fmt::v8::vformat[abi:cxx11](fmt::v8::basic_string_view<char>, fmt::v8::basic_format_args<fmt::v8::basic_format_context<fmt::v8::appender, char> >)'
/home/mautly/.conan/data/fmt/8.1.1/_/_/package/3bb43d390932310d9ef00e9986e41f02509d79e8/include/fmt/core.h:3119: error: undefined reference to 'fmt::v8::vformat[abi:cxx11](fmt::v8::basic_string_view<char>, fmt::v8::basic_format_args<fmt::v8::basic_format_context<fmt::v8::appender, char> >)'
/home/mautly/.conan/data/fmt/8.1.1/_/_/package/3bb43d390932310d9ef00e9986e41f02509d79e8/include/fmt/core.h:3119: error: undefined reference to 'fmt::v8::vformat[abi:cxx11](fmt::v8::basic_string_view<char>, fmt::v8::basic_format_args<fmt::v8::basic_format_context<fmt::v8::appender, char> >)'
/home/mautly/.conan/data/fmt/8.1.1/_/_/package/3bb43d390932310d9ef00e9986e41f02509d79e8/include/fmt/core.h:3119: error: undefined reference to 'fmt::v8::vformat[abi:cxx11](fmt::v8::basic_string_view<char>, fmt::v8::basic_format_args<fmt::v8::basic_format_context<fmt::v8::appender, char> >)'
/mnt/c/Users/Hector/Work/HZB/Software/Linux/python/kafka-to-nexus/src/JobCreator.cpp:130: error: undefined reference to 'hdf5::Path::Path(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
/mnt/c/Users/Hector/Work/HZB/Software/Linux/python/kafka-to-nexus/src/JobCreator.cpp:184: error: undefined reference to 'hdf5::Path::Path(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
/mnt/c/Users/Hector/Work/HZB/Software/Linux/python/kafka-to-nexus/src/JobCreator.cpp:249: error: undefined reference to 'hdf5::attribute::AttributeManager::exists(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const'
/mnt/c/Users/Hector/Work/HZB/Software/Linux/python/kafka-to-nexus/src/JobCreator.cpp:242: error: undefined reference to 'hdf5::Path::Path(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
/home/mautly/.conan/data/h5cpp/0.5.1/_/_/package/176e530cce5f9a1b9026532a0b919b74a1053321/include/h5cpp/attribute/attribute_manager.hpp:239: error: undefined reference to 'hdf5::attribute::AttributeManager::create(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, hdf5::datatype::Datatype const&, hdf5::dataspace::Dataspace const&, hdf5::property::AttributeCreationList const&) const'
/home/mautly/.conan/data/h5cpp/0.5.1/_/_/package/176e530cce5f9a1b9026532a0b919b74a1053321/include/h5cpp/attribute/attribute.hpp:329: error: undefined reference to 'hdf5::attribute::Attribute::check_size(hdf5::dataspace::Dataspace const&, hdf5::dataspace::Dataspace const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const'
/home/mautly/.conan/data/h5cpp/0.5.1/_/_/package/176e530cce5f9a1b9026532a0b919b74a1053321/include/h5cpp/attribute/attribute.hpp:240: error: undefined reference to 'hdf5::error::Singleton::throw_with_stack(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
/home/mautly/.conan/data/h5cpp/0.5.1/_/_/package/176e530cce5f9a1b9026532a0b919b74a1053321/include/h5cpp/attribute/attribute.hpp:224: error: undefined reference to 'hdf5::error::Singleton::throw_with_stack(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
/home/mautly/.conan/data/h5cpp/0.5.1/_/_/package/176e530cce5f9a1b9026532a0b919b74a1053321/include/h5cpp/attribute/attribute.hpp:252: error: undefined reference to 'hdf5::error::Singleton::throw_with_stack(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
/mnt/c/Users/Hector/Work/HZB/Software/Linux/python/kafka-to-nexus/src/MetaData/ValueInternal.h:60: error: undefined reference to 'hdf5::Path::Path(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
/mnt/c/Users/Hector/Work/HZB/Software/Linux/python/kafka-to-nexus/src/HDFFile.cpp:40: error: undefined reference to 'hdf5::file::create(std::filesystem::__cxx11::path const&, unsigned int, hdf5::property::FileCreationList const&, hdf5::property::FileAccessList const&)'
/mnt/c/Users/Hector/Work/HZB/Software/Linux/python/kafka-to-nexus/src/HDFFile.cpp:82: error: undefined reference to 'hdf5::ObjectId::file_name[abi:cxx11]() const'
/mnt/c/Users/Hector/Work/HZB/Software/Linux/python/kafka-to-nexus/src/HDFFile.cpp:91: error: undefined reference to 'hdf5::error::print_nested[abi:cxx11](std::exception const&, unsigned long)'
/mnt/c/Users/Hector/Work/HZB/Software/Linux/python/kafka-to-nexus/src/HDFFile.cpp:90: error: undefined reference to 'hdf5::ObjectId::file_name[abi:cxx11]() const'
/mnt/c/Users/Hector/Work/HZB/Software/Linux/python/kafka-to-nexus/src/HDFFile.cpp:99: error: undefined reference to 'hdf5::ObjectId::file_name[abi:cxx11]() const'
/mnt/c/Users/Hector/Work/HZB/Software/Linux/python/kafka-to-nexus/src/HDFFile.cpp:106: error: undefined reference to 'hdf5::error::print_nested[abi:cxx11](std::exception const&, unsigned long)'
/mnt/c/Users/Hector/Work/HZB/Software/Linux/python/kafka-to-nexus/src/HDFFile.cpp:108: error: undefined reference to 'hdf5::ObjectId::file_name[abi:cxx11]() const'
/mnt/c/Users/Hector/Work/HZB/Software/Linux/python/kafka-to-nexus/src/HDFFile.cpp:118: error: undefined reference to 'hdf5::file::open(std::filesystem::__cxx11::path const&, unsigned int, hdf5::property::FileAccessList const&)'
/mnt/c/Users/Hector/Work/HZB/Software/Linux/python/kafka-to-nexus/src/HDFFile.cpp:139: error: undefined reference to 'hdf5::file::open(std::filesystem::__cxx11::path const&, hdf5::file::AccessFlags, hdf5::property::FileAccessList const&)'
/mnt/c/Users/Hector/Work/HZB/Software/Linux/python/kafka-to-nexus/src/HDFAttributes.h:23: error: undefined reference to 'hdf5::attribute::AttributeManager::create(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, hdf5::datatype::Datatype const&, hdf5::dataspace::Dataspace const&, hdf5::property::AttributeCreationList const&) const'
/mnt/c/Users/Hector/Work/HZB/Software/Linux/python/kafka-to-nexus/src/Kafka/Consumer.cpp:53: error: undefined reference to 'RdKafka::err2str[abi:cxx11](RdKafka::ErrorCode)'
/mnt/c/Users/Hector/Work/HZB/Software/Linux/python/kafka-to-nexus/src/Kafka/Consumer.cpp:56: error: undefined reference to 'RdKafka::TopicPartition::create(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int, long)'
/mnt/c/Users/Hector/Work/HZB/Software/Linux/python/kafka-to-nexus/src/Kafka/Consumer.cpp:62: error: undefined reference to 'RdKafka::err2str[abi:cxx11](RdKafka::ErrorCode)'
/mnt/c/Users/Hector/Work/HZB/Software/Linux/python/kafka-to-nexus/src/Kafka/Consumer.cpp:75: error: undefined reference to 'RdKafka::err2str[abi:cxx11](RdKafka::ErrorCode)'
/mnt/c/Users/Hector/Work/HZB/Software/Linux/python/kafka-to-nexus/src/Kafka/Consumer.cpp:84: error: undefined reference to 'RdKafka::err2str[abi:cxx11](RdKafka::ErrorCode)'
/mnt/c/Users/Hector/Work/HZB/Software/Linux/python/kafka-to-nexus/src/Kafka/Producer.cpp:56: error: undefined reference to 'RdKafka::Producer::create(RdKafka::Conf const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&)'
/mnt/c/Users/Hector/Work/HZB/Software/Linux/python/kafka-to-nexus/src/Kafka/ProducerTopic.cpp:22: error: undefined reference to 'RdKafka::Topic::create(RdKafka::Handle*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, RdKafka::Conf const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&)'
/mnt/c/Users/Hector/Work/HZB/Software/Linux/python/kafka-to-nexus/src/Kafka/ConsumerFactory.cpp:41: error: undefined reference to 'RdKafka::KafkaConsumer::create(RdKafka::Conf const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&)'
/mnt/c/Users/Hector/Work/HZB/Software/Linux/python/kafka-to-nexus/src/Kafka/MetaDataQueryImpl.h:55: error: undefined reference to 'RdKafka::TopicPartition::create(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int, long)'
/mnt/c/Users/Hector/Work/HZB/Software/Linux/python/kafka-to-nexus/src/Kafka/MetaDataQueryImpl.h:99: error: undefined reference to 'RdKafka::Topic::create(RdKafka::Handle*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, RdKafka::Conf const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&)'
/mnt/c/Users/Hector/Work/HZB/Software/Linux/python/kafka-to-nexus/src/Kafka/MetaDataQueryImpl.h:38: error: undefined reference to 'RdKafka::Consumer::create(RdKafka::Conf const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&)'
/mnt/c/Users/Hector/Work/HZB/Software/Linux/python/kafka-to-nexus/src/HDFOperations.cpp:110: error: undefined reference to 'hdf5::attribute::AttributeManager::exists(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const'
/mnt/c/Users/Hector/Work/HZB/Software/Linux/python/kafka-to-nexus/src/HDFOperations.cpp:111: error: undefined reference to 'hdf5::attribute::AttributeManager::remove(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const'
/mnt/c/Users/Hector/Work/HZB/Software/Linux/python/kafka-to-nexus/src/HDFOperations.cpp:176: error: undefined reference to 'hdf5::attribute::AttributeManager::exists(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const'
/mnt/c/Users/Hector/Work/HZB/Software/Linux/python/kafka-to-nexus/src/HDFOperations.cpp:177: error: undefined reference to 'hdf5::attribute::AttributeManager::remove(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const'
/mnt/c/Users/Hector/Work/HZB/Software/Linux/python/kafka-to-nexus/src/HDFOperations.cpp:255: error: undefined reference to 'hdf5::node::Group::create_dataset(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, hdf5::datatype::Datatype const&, hdf5::dataspace::Dataspace const&, hdf5::property::DatasetCreationList const&, hdf5::property::LinkCreationList const&, hdf5::property::DatasetAccessList const&) const'
/mnt/c/Users/Hector/Work/HZB/Software/Linux/python/kafka-to-nexus/src/HDFOperations.cpp:370: error: undefined reference to 'hdf5::node::Group::create_group(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, hdf5::property::LinkCreationList const&, hdf5::property::GroupCreationList const&, hdf5::property::GroupAccessList const&) const'
/mnt/c/Users/Hector/Work/HZB/Software/Linux/python/kafka-to-nexus/src/HDFOperations.cpp:220: error: undefined reference to 'hdf5::node::Group::create_dataset(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, hdf5::datatype::Datatype const&, hdf5::dataspace::Dataspace const&, hdf5::property::DatasetCreationList const&, hdf5::property::LinkCreationList const&, hdf5::property::DatasetAccessList const&) const'
/mnt/c/Users/Hector/Work/HZB/Software/Linux/python/kafka-to-nexus/src/HDFOperations.cpp:220: error: undefined reference to 'hdf5::node::Group::create_dataset(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, hdf5::datatype::Datatype const&, hdf5::dataspace::Dataspace const&, hdf5::property::DatasetCreationList const&, hdf5::property::LinkCreationList const&, hdf5::property::DatasetAccessList const&) const'
/mnt/c/Users/Hector/Work/HZB/Software/Linux/python/kafka-to-nexus/src/HDFOperations.cpp:220: error: undefined reference to 'hdf5::node::Group::create_dataset(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, hdf5::datatype::Datatype const&, hdf5::dataspace::Dataspace const&, hdf5::property::DatasetCreationList const&, hdf5::property::LinkCreationList const&, hdf5::property::DatasetAccessList const&) const'
/home/mautly/.conan/data/h5cpp/0.5.1/_/_/package/176e530cce5f9a1b9026532a0b919b74a1053321/include/h5cpp/core/path.hpp:89: error: undefined reference to 'hdf5::Path::to_string[abi:cxx11]() const'
/mnt/c/Users/Hector/Work/HZB/Software/Linux/python/kafka-to-nexus/src/HDFAttributes.h:47: error: undefined reference to 'hdf5::attribute::AttributeManager::create(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, hdf5::datatype::Datatype const&, hdf5::dataspace::Dataspace const&, hdf5::property::AttributeCreationList const&) const'
/home/mautly/.conan/data/h5cpp/0.5.1/_/_/package/176e530cce5f9a1b9026532a0b919b74a1053321/include/h5cpp/attribute/attribute.hpp:329: error: undefined reference to 'hdf5::attribute::Attribute::check_size(hdf5::dataspace::Dataspace const&, hdf5::dataspace::Dataspace const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const'
/home/mautly/.conan/data/h5cpp/0.5.1/_/_/package/176e530cce5f9a1b9026532a0b919b74a1053321/include/h5cpp/attribute/attribute.hpp:240: error: undefined reference to 'hdf5::error::Singleton::throw_with_stack(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
/home/mautly/.conan/data/h5cpp/0.5.1/_/_/package/176e530cce5f9a1b9026532a0b919b74a1053321/include/h5cpp/attribute/attribute_manager.hpp:239: error: undefined reference to 'hdf5::attribute::AttributeManager::create(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, hdf5::datatype::Datatype const&, hdf5::dataspace::Dataspace const&, hdf5::property::AttributeCreationList const&) const'
/home/mautly/.conan/data/h5cpp/0.5.1/_/_/package/176e530cce5f9a1b9026532a0b919b74a1053321/include/h5cpp/attribute/attribute.hpp:329: error: undefined reference to 'hdf5::attribute::Attribute::check_size(hdf5::dataspace::Dataspace const&, hdf5::dataspace::Dataspace const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const'
/home/mautly/.conan/data/h5cpp/0.5.1/_/_/package/176e530cce5f9a1b9026532a0b919b74a1053321/include/h5cpp/attribute/attribute.hpp:329: error: undefined reference to 'hdf5::attribute::Attribute::check_size(hdf5::dataspace::Dataspace const&, hdf5::dataspace::Dataspace const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const'
/mnt/c/Users/Hector/Work/HZB/Software/Linux/python/kafka-to-nexus/src/WriterModule/f142/f142_Writer.cpp:115: error: undefined reference to 'hdf5::error::print_nested[abi:cxx11](std::exception const&, unsigned long)'
/mnt/c/Users/Hector/Work/HZB/Software/Linux/python/kafka-to-nexus/src/WriterModule/ev42/ev42_Writer.cpp:96: error: undefined reference to 'hdf5::error::print_nested[abi:cxx11](std::exception const&, unsigned long)'
/mnt/c/Users/Hector/Work/HZB/Software/Linux/python/kafka-to-nexus/src/WriterModule/hs00/WriterTyped.h:188: error: undefined reference to 'hdf5::attribute::AttributeManager::operator[](std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const'
/mnt/c/Users/Hector/Work/HZB/Software/Linux/python/kafka-to-nexus/src/WriterModule/hs00/WriterTyped.h:188: error: undefined reference to 'hdf5::attribute::AttributeManager::operator[](std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const'
/mnt/c/Users/Hector/Work/HZB/Software/Linux/python/kafka-to-nexus/src/WriterModule/hs00/WriterTyped.h:188: error: undefined reference to 'hdf5::attribute::AttributeManager::operator[](std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const'
/mnt/c/Users/Hector/Work/HZB/Software/Linux/python/kafka-to-nexus/src/WriterModule/hs00/WriterTyped.h:188: error: undefined reference to 'hdf5::attribute::AttributeManager::operator[](std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const'
/mnt/c/Users/Hector/Work/HZB/Software/Linux/python/kafka-to-nexus/src/WriterModule/hs00/WriterTyped.h:282: error: undefined reference to 'hdf5::attribute::AttributeManager::exists(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const'
collect2: error: ld returned 1 exit status
make[2]: *** [src/CMakeFiles/kafka-to-nexus.dir/build.make:279: bin/kafka-to-nexus] Error 1
make[1]: *** [CMakeFiles/Makefile2:784: src/CMakeFiles/kafka-to-nexus.dir/all] Error 2
make: *** [Makefile:91: all] Error 2
mattclarke commented
@Mautly: thanks! What was your cmake command?
amues commented
Hi @Mautly, from the error message, I believe you might need to update your Conan profile (located by default in ~/.conan/profiles/) and set compiler.libcxx=libstdc++11
instead of libstdc++
.
mattclarke commented
@Mautly: any progress?