I am new to linux and c++. I am trying to run veins gym on Ubuntu-18.04. When I run snakemake -jall (see the link) I receive an error:
make: Entering directory '/home/rost/serpentine-env/src'
Creating executable: out/gcc-debug//experiment_dbg
/usr/bin/ld: cannot find -lprotobuf
collect2: error: ld returned 1 exit status
Makefile:96: recipe for target 'out/gcc-debug//experiment_dbg' failed
make: *** [out/gcc-debug//experiment_dbg] Error 1
make: Leaving directory '/home/rost/serpentine-env/src'
[Thu Dec 30 12:34:46 2021]
Error in rule build:
jobid: 1
output: src/experiment_dbg
shell:
make -j8 -C src MODE=debug
(one of the commands exited with non-zero exit code; note that snakemake uses bash strict mode!)
Shutting down, this might take some time.
Exiting because a job execution failed. Look above for error message
Complete log: /home/rost/serpentine-env/.snakemake/log/2021-12-30T123446.742985.snakemake.log
To obtain a little more information, I run (source)
ld -lprotobuf --verbose
and I get
attempt to open //usr/local/lib/x86_64-linux-gnu/libprotobuf.so failed
attempt to open //usr/local/lib/x86_64-linux-gnu/libprotobuf.a failed
attempt to open //lib/x86_64-linux-gnu/libprotobuf.so failed
attempt to open //lib/x86_64-linux-gnu/libprotobuf.a failed
attempt to open //usr/lib/x86_64-linux-gnu/libprotobuf.so failed
attempt to open //usr/lib/x86_64-linux-gnu/libprotobuf.a failed
attempt to open //usr/lib/x86_64-linux-gnu64/libprotobuf.so failed
attempt to open //usr/lib/x86_64-linux-gnu64/libprotobuf.a failed
attempt to open //usr/local/lib64/libprotobuf.so failed
attempt to open //usr/local/lib64/libprotobuf.a failed
attempt to open //lib64/libprotobuf.so failed
attempt to open //lib64/libprotobuf.a failed
attempt to open //usr/lib64/libprotobuf.so failed
attempt to open //usr/lib64/libprotobuf.a failed
attempt to open //usr/local/lib/libprotobuf.so failed
attempt to open //usr/local/lib/libprotobuf.a failed
attempt to open //lib/libprotobuf.so failed
attempt to open //lib/libprotobuf.a failed
attempt to open //usr/lib/libprotobuf.so failed
attempt to open //usr/lib/libprotobuf.a failed
attempt to open //usr/x86_64-linux-gnu/lib64/libprotobuf.so failed
attempt to open //usr/x86_64-linux-gnu/lib64/libprotobuf.a failed
attempt to open //usr/x86_64-linux-gnu/lib/libprotobuf.so failed
attempt to open //usr/x86_64-linux-gnu/lib/libprotobuf.a failed
ld: cannot find -lprotobuf
I guess, I would have to make symlink manually, but I do not find any .so files in the archives from protobuf. Or maybe my interpretation is wrong. If some information is missing - I will provide.
Thank you!
UPDATE:
after runningsudo apt install libprotobuf-dev, command snakemake -jall produces
make: Entering directory '/home/rost/serpentine-env/src'
Creating executable: out/gcc-debug//experiment_dbg
out/gcc-debug//protobuf/veinsgym.pb.o: In function `veinsgym::proto::Request::_InternalParse(char const*, google::protobuf::internal::ParseContext*)':
/home/rost/serpentine-env/src/protobuf/veinsgym.pb.cc:563: undefined reference to `google::protobuf::internal::ParseContext::ParseMessage(google::protobuf::MessageLite*, char const*)'
/home/rost/serpentine-env/src/protobuf/veinsgym.pb.cc:571: undefined reference to `google::protobuf::internal::ParseContext::ParseMessage(google::protobuf::MessageLite*, char const*)'
/home/rost/serpentine-env/src/protobuf/veinsgym.pb.cc:579: undefined reference to `google::protobuf::internal::ParseContext::ParseMessage(google::protobuf::MessageLite*, char const*)'
/home/rost/serpentine-env/src/protobuf/veinsgym.pb.cc:593: undefined reference to `google::protobuf::internal::UnknownFieldParse(unsigned long, google::protobuf::UnknownFieldSet*, char const*, google::protobuf::internal::ParseContext*)'
out/gcc-debug//protobuf/veinsgym.pb.o: In function `veinsgym::proto::Request::_InternalSerialize(unsigned char*, google::protobuf::io::EpsCopyOutputStream*) const':
/home/rost/serpentine-env/src/protobuf/veinsgym.pb.cc:644: undefined reference to `google::protobuf::internal::WireFormat::InternalSerializeUnknownFieldsToArray(google::protobuf::UnknownFieldSet const&, unsigned char*, google::protobuf::io::EpsCopyOutputStream*)'
out/gcc-debug//protobuf/veinsgym.pb.o: In function `veinsgym::proto::Request::ByteSizeLong() const':
/home/rost/serpentine-env/src/protobuf/veinsgym.pb.cc:690: undefined reference to `google::protobuf::Message::MaybeComputeUnknownFieldsSize(unsigned long, google::protobuf::internal::CachedSize*) const'
out/gcc-debug//protobuf/veinsgym.pb.o: In function `veinsgym::proto::Request::GetMetadata() const':
/home/rost/serpentine-env/src/protobuf/veinsgym.pb.cc:757: undefined reference to `google::protobuf::internal::AssignDescriptors(google::protobuf::internal::DescriptorTable const* (*)(), std::once_flag*, google::protobuf::Metadata const&)'
out/gcc-debug//protobuf/veinsgym.pb.o: In function `veinsgym::proto::Reply::_InternalParse(char const*, google::protobuf::internal::ParseContext*)':
/home/rost/serpentine-env/src/protobuf/veinsgym.pb.cc:946: undefined reference to `google::protobuf::internal::ParseContext::ParseMessage(google::protobuf::MessageLite*, char const*)'
/home/rost/serpentine-env/src/protobuf/veinsgym.pb.cc:954: undefined reference to `google::protobuf::internal::ParseContext::ParseMessage(google::protobuf::MessageLite*, char const*)'
/home/rost/serpentine-env/src/protobuf/veinsgym.pb.cc:962: undefined reference to `google::protobuf::internal::ParseContext::ParseMessage(google::protobuf::MessageLite*, char const*)'
/home/rost/serpentine-env/src/protobuf/veinsgym.pb.cc:976: undefined reference to `google::protobuf::internal::UnknownFieldParse(unsigned long, google::protobuf::UnknownFieldSet*, char const*, google::protobuf::internal::ParseContext*)'
out/gcc-debug//protobuf/veinsgym.pb.o: In function `veinsgym::proto::Reply::_InternalSerialize(unsigned char*, google::protobuf::io::EpsCopyOutputStream*) const':
/home/rost/serpentine-env/src/protobuf/veinsgym.pb.cc:1027: undefined reference to `google::protobuf::internal::WireFormat::InternalSerializeUnknownFieldsToArray(google::protobuf::UnknownFieldSet const&, unsigned char*, google::protobuf::io::EpsCopyOutputStream*)'
out/gcc-debug//protobuf/veinsgym.pb.o: In function `veinsgym::proto::Reply::ByteSizeLong() const':
/home/rost/serpentine-env/src/protobuf/veinsgym.pb.cc:1073: undefined reference to `google::protobuf::Message::MaybeComputeUnknownFieldsSize(unsigned long, google::protobuf::internal::CachedSize*) const'
out/gcc-debug//protobuf/veinsgym.pb.o: In function `veinsgym::proto::Reply::GetMetadata() const':
/home/rost/serpentine-env/src/protobuf/veinsgym.pb.cc:1140: undefined reference to `google::protobuf::internal::AssignDescriptors(google::protobuf::internal::DescriptorTable const* (*)(), std::once_flag*, google::protobuf::Metadata const&)'
out/gcc-debug//protobuf/veinsgym.pb.o: In function `veinsgym::proto::Init::Init(veinsgym::proto::Init const&)':
/home/rost/serpentine-env/src/protobuf/veinsgym.pb.cc:1166: undefined reference to `google::protobuf::internal::ArenaStringPtr::Set(google::protobuf::internal::ArenaStringPtr::EmptyDefault, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, google::protobuf::Arena*)'
/home/rost/serpentine-env/src/protobuf/veinsgym.pb.cc:1174: undefined reference to `google::protobuf::internal::ArenaStringPtr::Set(google::protobuf::internal::ArenaStringPtr::EmptyDefault, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, google::protobuf::Arena*)'
/home/rost/serpentine-env/src/protobuf/veinsgym.pb.cc:1182: undefined reference to `google::protobuf::internal::ArenaStringPtr::Set(google::protobuf::internal::ArenaStringPtr::EmptyDefault, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, google::protobuf::Arena*)'
out/gcc-debug//protobuf/veinsgym.pb.o: In function `veinsgym::proto::Init::Clear()':
/home/rost/serpentine-env/src/protobuf/veinsgym.pb.cc:1233: undefined reference to `google::protobuf::internal::ArenaStringPtr::ClearToEmpty()'
/home/rost/serpentine-env/src/protobuf/veinsgym.pb.cc:1234: undefined reference to `google::protobuf::internal::ArenaStringPtr::ClearToEmpty()'
/home/rost/serpentine-env/src/protobuf/veinsgym.pb.cc:1235: undefined reference to `google::protobuf::internal::ArenaStringPtr::ClearToEmpty()'
out/gcc-debug//protobuf/veinsgym.pb.o: In function `veinsgym::proto::Init::_InternalParse(char const*, google::protobuf::internal::ParseContext*)':
/home/rost/serpentine-env/src/protobuf/veinsgym.pb.cc:1249: undefined reference to `google::protobuf::internal::InlineGreedyStringParser(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*, char const*, google::protobuf::internal::ParseContext*)'
/home/rost/serpentine-env/src/protobuf/veinsgym.pb.cc:1259: undefined reference to `google::protobuf::internal::InlineGreedyStringParser(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*, char const*, google::protobuf::internal::ParseContext*)'
/home/rost/serpentine-env/src/protobuf/veinsgym.pb.cc:1269: undefined reference to `google::protobuf::internal::InlineGreedyStringParser(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*, char const*, google::protobuf::internal::ParseContext*)'
/home/rost/serpentine-env/src/protobuf/veinsgym.pb.cc:1284: undefined reference to `google::protobuf::internal::UnknownFieldParse(unsigned long, google::protobuf::UnknownFieldSet*, char const*, google::protobuf::internal::ParseContext*)'
out/gcc-debug//protobuf/veinsgym.pb.o: In function `veinsgym::proto::Init::_InternalSerialize(unsigned char*, google::protobuf::io::EpsCopyOutputStream*) const':
/home/rost/serpentine-env/src/protobuf/veinsgym.pb.cc:1335: undefined reference to `google::protobuf::internal::WireFormat::InternalSerializeUnknownFieldsToArray(google::protobuf::UnknownFieldSet const&, unsigned char*, google::protobuf::io::EpsCopyOutputStream*)'
out/gcc-debug//protobuf/veinsgym.pb.o: In function `veinsgym::proto::Init::ByteSizeLong() const':
/home/rost/serpentine-env/src/protobuf/veinsgym.pb.cc:1371: undefined reference to `google::protobuf::Message::MaybeComputeUnknownFieldsSize(unsigned long, google::protobuf::internal::CachedSize*) const'
out/gcc-debug//protobuf/veinsgym.pb.o: In function `veinsgym::proto::Init::MergeFrom(veinsgym::proto::Init const&)':
/home/rost/serpentine-env/src/protobuf/veinsgym.pb.h:2983: undefined reference to `google::protobuf::internal::ArenaStringPtr::Set(google::protobuf::internal::ArenaStringPtr::EmptyDefault, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, google::protobuf::Arena*)'
/home/rost/serpentine-env/src/protobuf/veinsgym.pb.h:3034: undefined reference to `google::protobuf::internal::ArenaStringPtr::Set(google::protobuf::internal::ArenaStringPtr::EmptyDefault, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, google::protobuf::Arena*)'
/home/rost/serpentine-env/src/protobuf/veinsgym.pb.h:3085: undefined reference to `google::protobuf::internal::ArenaStringPtr::Set(google::protobuf::internal::ArenaStringPtr::EmptyDefault, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, google::protobuf::Arena*)'
out/gcc-debug//protobuf/veinsgym.pb.o: In function `veinsgym::proto::Init::GetMetadata() const':
/home/rost/serpentine-env/src/protobuf/veinsgym.pb.cc:1441: undefined reference to `google::protobuf::internal::AssignDescriptors(google::protobuf::internal::DescriptorTable const* (*)(), std::once_flag*, google::protobuf::Metadata const&)'
out/gcc-debug//protobuf/veinsgym.pb.o: In function `veinsgym::proto::Shutdown::Shutdown(veinsgym::proto::Shutdown const&)':
/home/rost/serpentine-env/src/protobuf/veinsgym.pb.cc:1456: undefined reference to `google::protobuf::internal::ZeroFieldsBase::~ZeroFieldsBase()'
out/gcc-debug//protobuf/veinsgym.pb.o: In function `veinsgym::proto::Shutdown::GetMetadata() const':
/home/rost/serpentine-env/src/protobuf/veinsgym.pb.cc:1480: undefined reference to `google::protobuf::internal::AssignDescriptors(google::protobuf::internal::DescriptorTable const* (*)(), std::once_flag*, google::protobuf::Metadata const&)'
out/gcc-debug//protobuf/veinsgym.pb.o: In function `veinsgym::proto::Step::_InternalParse(char const*, google::protobuf::internal::ParseContext*)':
/home/rost/serpentine-env/src/protobuf/veinsgym.pb.cc:1580: undefined reference to `google::protobuf::internal::ParseContext::ParseMessage(google::protobuf::MessageLite*, char const*)'
/home/rost/serpentine-env/src/protobuf/veinsgym.pb.cc:1588: undefined reference to `google::protobuf::internal::ParseContext::ParseMessage(google::protobuf::MessageLite*, char const*)'
/home/rost/serpentine-env/src/protobuf/veinsgym.pb.cc:1602: undefined reference to `google::protobuf::internal::UnknownFieldParse(unsigned long, google::protobuf::UnknownFieldSet*, char const*, google::protobuf::internal::ParseContext*)'
out/gcc-debug//protobuf/veinsgym.pb.o: In function `veinsgym::proto::Step::_InternalSerialize(unsigned char*, google::protobuf::io::EpsCopyOutputStream*) const':
/home/rost/serpentine-env/src/protobuf/veinsgym.pb.cc:1639: undefined reference to `google::protobuf::internal::WireFormat::InternalSerializeUnknownFieldsToArray(google::protobuf::UnknownFieldSet const&, unsigned char*, google::protobuf::io::EpsCopyOutputStream*)'
out/gcc-debug//protobuf/veinsgym.pb.o: In function `veinsgym::proto::Step::ByteSizeLong() const':
/home/rost/serpentine-env/src/protobuf/veinsgym.pb.cc:1668: undefined reference to `google::protobuf::Message::MaybeComputeUnknownFieldsSize(unsigned long, google::protobuf::internal::CachedSize*) const'
out/gcc-debug//protobuf/veinsgym.pb.o: In function `veinsgym::proto::Step::GetMetadata() const':
/home/rost/serpentine-env/src/protobuf/veinsgym.pb.cc:1724: undefined reference to `google::protobuf::internal::AssignDescriptors(google::protobuf::internal::DescriptorTable const* (*)(), std::once_flag*, google::protobuf::Metadata const&)'
out/gcc-debug//protobuf/veinsgym.pb.o: In function `veinsgym::proto::Space::_InternalParse(char const*, google::protobuf::internal::ParseContext*)':
/home/rost/serpentine-env/src/protobuf/veinsgym.pb.cc:1992: undefined reference to `google::protobuf::internal::ParseContext::ParseMessage(google::protobuf::MessageLite*, char const*)'
/home/rost/serpentine-env/src/protobuf/veinsgym.pb.cc:2000: undefined reference to `google::protobuf::internal::ParseContext::ParseMessage(google::protobuf::MessageLite*, char const*)'
/home/rost/serpentine-env/src/protobuf/veinsgym.pb.cc:2008: undefined reference to `google::protobuf::internal::ParseContext::ParseMessage(google::protobuf::MessageLite*, char const*)'
/home/rost/serpentine-env/src/protobuf/veinsgym.pb.cc:2016: undefined reference to `google::protobuf::internal::ParseContext::ParseMessage(google::protobuf::MessageLite*, char const*)'
/home/rost/serpentine-env/src/protobuf/veinsgym.pb.cc:2024: undefined reference to `google::protobuf::internal::ParseContext::ParseMessage(google::protobuf::MessageLite*, char const*)'
out/gcc-debug//protobuf/veinsgym.pb.o:/home/rost/serpentine-env/src/protobuf/veinsgym.pb.cc:2032: more undefined references to `google::protobuf::internal::ParseContext::ParseMessage(google::protobuf::MessageLite*, char const*)' follow
out/gcc-debug//protobuf/veinsgym.pb.o: In function `veinsgym::proto::Space::_InternalParse(char const*, google::protobuf::internal::ParseContext*)':
/home/rost/serpentine-env/src/protobuf/veinsgym.pb.cc:2046: undefined reference to `google::protobuf::internal::UnknownFieldParse(unsigned long, google::protobuf::UnknownFieldSet*, char const*, google::protobuf::internal::ParseContext*)'
out/gcc-debug//protobuf/veinsgym.pb.o: In function `veinsgym::proto::Space::_InternalSerialize(unsigned char*, google::protobuf::io::EpsCopyOutputStream*) const':
/home/rost/serpentine-env/src/protobuf/veinsgym.pb.cc:2115: undefined reference to `google::protobuf::internal::WireFormat::InternalSerializeUnknownFieldsToArray(google::protobuf::UnknownFieldSet const&, unsigned char*, google::protobuf::io::EpsCopyOutputStream*)'
out/gcc-debug//protobuf/veinsgym.pb.o: In function `veinsgym::proto::Space::ByteSizeLong() const':
/home/rost/serpentine-env/src/protobuf/veinsgym.pb.cc:2177: undefined reference to `google::protobuf::Message::MaybeComputeUnknownFieldsSize(unsigned long, google::protobuf::internal::CachedSize*) const'
out/gcc-debug//protobuf/veinsgym.pb.o: In function `veinsgym::proto::Space::GetMetadata() const':
/home/rost/serpentine-env/src/protobuf/veinsgym.pb.cc:2252: undefined reference to `google::protobuf::internal::AssignDescriptors(google::protobuf::internal::DescriptorTable const* (*)(), std::once_flag*, google::protobuf::Metadata const&)'
out/gcc-debug//protobuf/veinsgym.pb.o: In function `veinsgym::proto::Box::Box(google::protobuf::Arena*, bool)':
/home/rost/serpentine-env/src/protobuf/veinsgym.pb.cc:2264: undefined reference to `google::protobuf::RepeatedField<double>::RepeatedField(google::protobuf::Arena*)'
/home/rost/serpentine-env/src/protobuf/veinsgym.pb.cc:2264: undefined reference to `google::protobuf::RepeatedField<double>::~RepeatedField()'
out/gcc-debug//protobuf/veinsgym.pb.o: In function `veinsgym::proto::Box::Box(veinsgym::proto::Box const&)':
/home/rost/serpentine-env/src/protobuf/veinsgym.pb.cc:2273: undefined reference to `google::protobuf::RepeatedField<double>::RepeatedField(google::protobuf::RepeatedField<double> const&)'
/home/rost/serpentine-env/src/protobuf/veinsgym.pb.cc:2273: undefined reference to `google::protobuf::RepeatedField<double>::~RepeatedField()'
out/gcc-debug//protobuf/veinsgym.pb.o: In function `veinsgym::proto::Box::~Box()':
/home/rost/serpentine-env/src/protobuf/veinsgym.pb.cc:2281: undefined reference to `google::protobuf::RepeatedField<double>::~RepeatedField()'
out/gcc-debug//protobuf/veinsgym.pb.o: In function `veinsgym::proto::Box::Clear()':
/home/rost/serpentine-env/src/protobuf/veinsgym.pb.cc:2308: undefined reference to `google::protobuf::RepeatedField<double>::Clear()'
out/gcc-debug//protobuf/veinsgym.pb.o: In function `veinsgym::proto::Box::_InternalParse(char const*, google::protobuf::internal::ParseContext*)':
/home/rost/serpentine-env/src/protobuf/veinsgym.pb.cc:2321: undefined reference to `google::protobuf::internal::PackedDoubleParser(void*, char const*, google::protobuf::internal::ParseContext*)'
...
/home/rost/serpentine-env/src/./protobuf/veinsgym.pb.h:780: undefined reference to `google::protobuf::internal::ZeroFieldsBase::InternalSwap(google::protobuf::internal::ZeroFieldsBase*)'
out/gcc-debug//serpentine/GymSplitter.o: In function `veinsgym::proto::Shutdown::CopyFrom(veinsgym::proto::Shutdown const&)':
/home/rost/serpentine-env/src/./protobuf/veinsgym.pb.h:835: undefined reference to `google::protobuf::internal::ZeroFieldsBase::CopyImpl(google::protobuf::Message*, google::protobuf::Message const&)'
out/gcc-debug//serpentine/GymSplitter.o: In function `veinsgym::proto::Box::set_values(int, double)':
/home/rost/serpentine-env/src/./protobuf/veinsgym.pb.h:3778: undefined reference to `google::protobuf::RepeatedField<double>::Set(int, double const&)'
out/gcc-debug//serpentine/GymSplitter.o: In function `void google::protobuf::RepeatedField<double>::Add<double const*>(double const*, double const*)':
/usr/local/include/google/protobuf/repeated_field.h:705: undefined reference to `google::protobuf::RepeatedField<double>::size() const'
/usr/local/include/google/protobuf/repeated_field.h:712: undefined reference to `google::protobuf::RepeatedField<double>::elements() const'
/usr/local/include/google/protobuf/repeated_field.h:712: undefined reference to `google::protobuf::RepeatedField<double>::size() const'
/usr/local/include/google/protobuf/repeated_field.h:713: undefined reference to `google::protobuf::RepeatedField<double>::size() const'
out/gcc-debug//serpentine/GymSplitter.o: In function `google::protobuf::RepeatedField<double>::FastAdderImpl<0, true>::FastAdderImpl(google::protobuf::RepeatedField<double>*)':
/usr/local/include/google/protobuf/repeated_field.h:448: undefined reference to `google::protobuf::RepeatedField<double>::unsafe_elements() const'
out/gcc-debug//serpentine/GymSplitter.o: In function `google::protobuf::RepeatedField<double>::FastAdderImpl<0, true>::Add(double)':
/usr/local/include/google/protobuf/repeated_field.h:457: undefined reference to `google::protobuf::RepeatedField<double>::unsafe_elements() const'
collect2: error: ld returned 1 exit status
Makefile:96: recipe for target 'out/gcc-debug//experiment_dbg' failed
make: *** [out/gcc-debug//experiment_dbg] Error 1
make: Leaving directory '/home/rost/serpentine-env/src'
Related
My code was working fine on windows, now that I am trying to compile on ubuntu 20.4; I am getting this error; I am copying part of the error as there are a lot:
after runing : mpicc C.cpp -o C
usr/bin/ld: C.cpp:(.text._ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag[_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag]+0xb8): undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_capacity(unsigned long)'
/usr/bin/ld: C.cpp:(.text._ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag[_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag]+0xc4): undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_data() const'
/usr/bin/ld: C.cpp:(.text._ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag[_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag]+0xda): undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_S_copy_chars(char*, char*, char*)'
/usr/bin/ld: C.cpp:(.text._ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag[_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag]+0xed): undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_set_length(unsigned long)'
/usr/bin/ld: C.cpp:(.text._ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag[_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag]+0x10b): undefined reference to `__cxa_begin_catch'
/usr/bin/ld: C.cpp:(.text._ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag[_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag]+0x117): undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_dispose()'
/usr/bin/ld: C.cpp:(.text._ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag[_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag]+0x11c): undefined reference to `__cxa_rethrow'
/usr/bin/ld: C.cpp:(.text._ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag[_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag]+0x128): undefined reference to `__cxa_end_catch'
/usr/bin/ld: /tmp/ccNx3sbm.o: in function `__gnu_cxx::new_allocator<int>::deallocate(int*, unsigned long)':
C.cpp:(.text._ZN9__gnu_cxx13new_allocatorIiE10deallocateEPim[_ZN9__gnu_cxx13new_allocatorIiE10deallocateEPim]+0x20): undefined reference to `operator delete(void*)'
/usr/bin/ld: /tmp/ccNx3sbm.o: in function `__gnu_cxx::new_allocator<int>::allocate(unsigned long, void const*)':
C.cpp:(.text._ZN9__gnu_cxx13new_allocatorIiE8allocateEmPKv[_ZN9__gnu_cxx13new_allocatorIiE8allocateEmPKv]+0x30): undefined reference to `std::__throw_bad_alloc()'
/usr/bin/ld: C.cpp:(.text._ZN9__gnu_cxx13new_allocatorIiE8allocateEmPKv[_ZN9__gnu_cxx13new_allocatorIiE8allocateEmPKv]+0x40): undefined reference to `operator new(unsigned long)'
/usr/bin/ld: /tmp/ccNx3sbm.o:(.data.rel.ro._ZTVN3MPI3WinE[_ZTVN3MPI3WinE]+0x48): undefined reference to `MPI::Win::Free()'
/usr/bin/ld: /tmp/ccNx3sbm.o: in function `MPI::Intercomm::~Intercomm()':
C.cpp:(.text._ZN3MPI9IntercommD0Ev[_ZN3MPI9IntercommD5Ev]+0x29): undefined reference to `operator delete(void*, unsigned long)'
/usr/bin/ld: /tmp/ccNx3sbm.o: in function `MPI::Graphcomm::~Graphcomm()':
C.cpp:(.text._ZN3MPI9GraphcommD0Ev[_ZN3MPI9GraphcommD5Ev]+0x29): undefined reference to `operator delete(void*, unsigned long)'
/usr/bin/ld: /tmp/ccNx3sbm.o: in function `MPI::Cartcomm::~Cartcomm()':
when I check mpirun --version: I get this : mpirun (Open MPI) 4.0.3
This error:
usr/bin/ld: C.cpp:(.text._ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag[_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag]+0xb8): undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_capacity(unsigned long)'
/usr/bin/ld: C.cpp:(.text._ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag[_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag]+0xc4): undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_data() const'
/usr/bin/ld: C.cpp:(.text._ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag[_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag]+0xda): undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_S_copy_chars(char*, char*, char*)'
/usr/bin/ld: C.cpp:(.text._ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag[_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag]+0xed): undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_set_length(unsigned long)'
/usr/bin/ld: C.cpp:(.text._ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag[_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag]+0x10b): undefined reference to `__cxa_begin_catch'
/usr/bin/ld: C.cpp:(.text._ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag[_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag]+0x117): undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_dispose()'
/usr/bin/ld: C.cpp:(.text._ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag[_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag]+0x11c): undefined reference to `__cxa_rethrow'
/usr/bin/ld: C.cpp:(.text._ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag[_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag]+0x128): undefined reference to `__cxa_end_catch'
/usr/bin/ld: /tmp/ccNx3sbm.o: in function `__gnu_cxx::new_allocator<int>::deallocate(int*, unsigned long)':
C.cpp:(.text._ZN9__gnu_cxx13new_allocatorIiE10deallocateEPim[_ZN9__gnu_cxx13new_allocatorIiE10deallocateEPim]+0x20): undefined reference to `operator delete(void*)'
/usr/bin/ld: /tmp/ccNx3sbm.o: in function `__gnu_cxx::new_allocator<int>::allocate(unsigned long, void const*)':
C.cpp:(.text._ZN9__gnu_cxx13new_allocatorIiE8allocateEmPKv[_ZN9__gnu_cxx13new_allocatorIiE8allocateEmPKv]+0x30): undefined reference to `std::__throw_bad_alloc()'
/usr/bin/ld: C.cpp:(.text._ZN9__gnu_cxx13new_allocatorIiE8allocateEmPKv[_ZN9__gnu_cxx13new_allocatorIiE8allocateEmPKv]+0x40): undefined reference to `operator new(unsigned long)'
/usr/bin/ld: /tmp/ccNx3sbm.o:(.data.rel.ro._ZTVN3MPI3WinE[_ZTVN3MPI3WinE]+0x48): undefined reference to `MPI::Win::Free()'
/usr/bin/ld: /tmp/ccNx3sbm.o: in function `MPI::Intercomm::~Intercomm()':
C.cpp:(.text._ZN3MPI9IntercommD0Ev[_ZN3MPI9IntercommD5Ev]+0x29): undefined reference to `operator delete(void*, unsigned long)'
/usr/bin/ld: /tmp/ccNx3sbm.o: in function `MPI::Graphcomm::~Graphcomm()':
C.cpp:(.text._ZN3MPI9GraphcommD0Ev[_ZN3MPI9GraphcommD5Ev]+0x29): undefined reference to `operator delete(void*, unsigned long)'
/usr/bin/ld: /tmp/ccNx3sbm.o: in function `MPI::Cartcomm::~Cartcomm()':
Because you are compiling with mpicc:
Compiles and links MPI programs written in C
but you should be using in this case mpic++
mpic++ -- Open MPI C++ wrapper compiler
Context
I have pulled code from the concord repo at https://github.com/vmware/concord. I managed to build the docker images fine.
In the documentation at https://concord.readthedocs.io/en/latest/deployment/deployment.html#confguration-file-generator they mention a configuration file generator that is used to generate configuration files which is required to run a concord node using docker run (the command to run the concord node is defined at https://concord.readthedocs.io/en/latest/deployment/deployment.html#concord-nodes). This configuration file generator is a .cpp called conc_genconfig.cpp (available at https://github.com/vmware/concord/blob/master/tools/conc_genconfig.cpp) and requires a .yml as an input. This uses library files from log4cplus and boost. I installed these by looking at the Dockerfile under the builder folder (available at https://github.com/vmware/concord/blob/master/docker/dockerfiles/builder/Dockerfile)
Problem
When I compile conc_genconfig.cpp using the following command:
g++ -Wall -g -std=c++11 -LLIBDIR -I /home/ubuntu/concord/src -I /home/ubuntu/concord-bft/threshsign/include/threshsign conc_genconfig.cpp
I get the following output/compilation errors:
In file included from conc_genconfig.cpp:23:0:
/home/ubuntu/concord/src/config/configuration_manager.hpp:1547:23: warning: inline variables are only available with -std=c++1z or -std=gnu++1z
kPositiveIntLimits({1, INT_MAX});
^
/home/ubuntu/concord/src/config/configuration_manager.hpp:1549:26: warning: inline variables are only available with -std=c++1z or -std=gnu++1z
kPositiveUInt16Limits({1, UINT16_MAX});
^
/home/ubuntu/concord/src/config/configuration_manager.hpp:1551:26: warning: inline variables are only available with -std=c++1z or -std=gnu++1z
kPositiveUInt64Limits({1, UINT64_MAX});
^
/home/ubuntu/concord/src/config/configuration_manager.hpp:1553:29: warning: inline variables are only available with -std=c++1z or -std=gnu++1z
kPositiveULongLongLimits({1, ULLONG_MAX});
^
/home/ubuntu/concord/src/config/configuration_manager.hpp:1554:77: warning: inline variables are only available with -std=c++1z or -std=gnu++1z
inline const std::pair<unsigned long long, unsigned long long> kUInt16Limits(
^
/home/ubuntu/concord/src/config/configuration_manager.hpp:1556:77: warning: inline variables are only available with -std=c++1z or -std=gnu++1z
inline const std::pair<unsigned long long, unsigned long long> kUInt32Limits(
^
/home/ubuntu/concord/src/config/configuration_manager.hpp:1558:77: warning: inline variables are only available with -std=c++1z or -std=gnu++1z
inline const std::pair<unsigned long long, unsigned long long> kUInt64Limits(
^
/home/ubuntu/concord/src/config/configuration_manager.hpp:1560:58: warning: inline variables are only available with -std=c++1z or -std=gnu++1z
inline const std::pair<long long, long long> kInt32Limits({INT32_MIN,
^
/home/ubuntu/concord/src/config/configuration_manager.hpp:1566:45: warning: inline variables are only available with -std=c++1z or -std=gnu++1z
kConcordBFTCommunicationBufferSizeLimits({512, UINT32_MAX});
^
/tmp/cc2pIDGw.o: In function `main':
/home/ubuntu/concord/tools/conc_genconfig.cpp:44: undefined reference to `log4cplus::initialize()'
/home/ubuntu/concord/tools/conc_genconfig.cpp:45: undefined reference to `log4cplus::Logger::getDefaultHierarchy()'
/home/ubuntu/concord/tools/conc_genconfig.cpp:45: undefined reference to `log4cplus::BasicConfigurator::BasicConfigurator(log4cplus::Hierarchy&, bool)'
/home/ubuntu/concord/tools/conc_genconfig.cpp:46: undefined reference to `log4cplus::PropertyConfigurator::configure()'
/home/ubuntu/concord/tools/conc_genconfig.cpp:48: undefined reference to `log4cplus::Logger::getInstance(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
/home/ubuntu/concord/tools/conc_genconfig.cpp:54: undefined reference to `boost::program_options::variables_map::variables_map()'
/home/ubuntu/concord/tools/conc_genconfig.cpp:55: undefined reference to `boost::program_options::options_description::m_default_line_length'
/home/ubuntu/concord/tools/conc_genconfig.cpp:55: undefined reference to `boost::program_options::options_description::m_default_line_length'
/home/ubuntu/concord/tools/conc_genconfig.cpp:55: undefined reference to `boost::program_options::options_description::options_description(unsigned int, unsigned int)'
/home/ubuntu/concord/tools/conc_genconfig.cpp:58: undefined reference to `boost::program_options::options_description::add_options()'
/home/ubuntu/concord/tools/conc_genconfig.cpp:59: undefined reference to `boost::program_options::options_description_easy_init::operator()(char const*, char const*)'
/home/ubuntu/concord/tools/conc_genconfig.cpp:63: undefined reference to `boost::program_options::options_description_easy_init::operator()(char const*, boost::program_options::value_semantic const*, char const*)'
/home/ubuntu/concord/tools/conc_genconfig.cpp:70: undefined reference to `boost::program_options::options_description_easy_init::operator()(char const*, boost::program_options::value_semantic const*, char const*)'
/home/ubuntu/concord/tools/conc_genconfig.cpp:71: undefined reference to `boost::program_options::options_description_easy_init::operator()(char const*, boost::program_options::value_semantic const*, char const*)'
/home/ubuntu/concord/tools/conc_genconfig.cpp:85: undefined reference to `boost::program_options::store(boost::program_options::basic_parsed_options<char> const&, boost::program_options::variables_map&, bool)'
/home/ubuntu/concord/tools/conc_genconfig.cpp:92: undefined reference to `boost::program_options::operator<<(std::ostream&, boost::program_options::options_description const&)'
/home/ubuntu/concord/tools/conc_genconfig.cpp:95: undefined reference to `boost::program_options::notify(boost::program_options::variables_map&)'
/home/ubuntu/concord/tools/conc_genconfig.cpp:97: undefined reference to `log4cplus::Logger::isEnabledFor(int) const'
/home/ubuntu/concord/tools/conc_genconfig.cpp:97: undefined reference to `log4cplus::detail::get_macro_body_oss[abi:cxx11]()'
/home/ubuntu/concord/tools/conc_genconfig.cpp:97: undefined reference to `log4cplus::detail::macro_forced_log(log4cplus::Logger const&, int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, char const*, int, char const*)'
/home/ubuntu/concord/tools/conc_genconfig.cpp:100: undefined reference to `log4cplus::Logger::isEnabledFor(int) const'
/home/ubuntu/concord/tools/conc_genconfig.cpp:100: undefined reference to `log4cplus::detail::get_macro_body_oss[abi:cxx11]()'
/home/ubuntu/concord/tools/conc_genconfig.cpp:100: undefined reference to `log4cplus::detail::macro_forced_log(log4cplus::Logger const&, int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, char const*, int, char const*)'
/home/ubuntu/concord/tools/conc_genconfig.cpp:108: undefined reference to `log4cplus::Logger::isEnabledFor(int) const'
/home/ubuntu/concord/tools/conc_genconfig.cpp:108: undefined reference to `log4cplus::detail::get_macro_body_oss[abi:cxx11]()'
/home/ubuntu/concord/tools/conc_genconfig.cpp:108: undefined reference to `log4cplus::detail::macro_forced_log(log4cplus::Logger const&, int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, char const*, int, char const*)'
/home/ubuntu/concord/tools/conc_genconfig.cpp:114: undefined reference to `concord::config::YAMLConfigurationInput::YAMLConfigurationInput(std::istream&)'
/home/ubuntu/concord/tools/conc_genconfig.cpp:116: undefined reference to `concord::config::YAMLConfigurationInput::parseInput()'
/home/ubuntu/concord/tools/conc_genconfig.cpp:129: undefined reference to `concord::config::ConcordConfiguration::ConcordConfiguration()'
/home/ubuntu/concord/tools/conc_genconfig.cpp:130: undefined reference to `concord::config::specifyConfiguration(concord::config::ConcordConfiguration&)'
/home/ubuntu/concord/tools/conc_genconfig.cpp:131: undefined reference to `concord::config::ConcordConfiguration::setConfigurationStateLabel(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
/home/ubuntu/concord/tools/conc_genconfig.cpp:134: undefined reference to `concord::config::loadClusterSizeParameters(concord::config::YAMLConfigurationInput&, concord::config::ConcordConfiguration&)'
/home/ubuntu/concord/tools/conc_genconfig.cpp:141: undefined reference to `concord::config::instantiateTemplatedConfiguration(concord::config::YAMLConfigurationInput&, concord::config::ConcordConfiguration&)'
/home/ubuntu/concord/tools/conc_genconfig.cpp:150: undefined reference to `concord::config::loadConfigurationInputParameters(concord::config::YAMLConfigurationInput&, concord::config::ConcordConfiguration&)'
/home/ubuntu/concord/tools/conc_genconfig.cpp:156: undefined reference to `concord::config::ConcordConfiguration::loadAllDefaults(bool, bool)'
/home/ubuntu/concord/tools/conc_genconfig.cpp:158: undefined reference to `log4cplus::Logger::isEnabledFor(int) const'
/home/ubuntu/concord/tools/conc_genconfig.cpp:158: undefined reference to `log4cplus::detail::get_macro_body_oss[abi:cxx11]()'
/home/ubuntu/concord/tools/conc_genconfig.cpp:158: undefined reference to `log4cplus::detail::macro_forced_log(log4cplus::Logger const&, int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, char const*, int, char const*)'
/home/ubuntu/concord/tools/conc_genconfig.cpp:164: undefined reference to `log4cplus::Logger::isEnabledFor(int) const'
/home/ubuntu/concord/tools/conc_genconfig.cpp:164: undefined reference to `log4cplus::detail::get_macro_body_oss[abi:cxx11]()'
/home/ubuntu/concord/tools/conc_genconfig.cpp:164: undefined reference to `log4cplus::detail::macro_forced_log(log4cplus::Logger const&, int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, char const*, int, char const*)'
/home/ubuntu/concord/tools/conc_genconfig.cpp:167: undefined reference to `concord::config::generateConfigurationKeys(concord::config::ConcordConfiguration&)'
/home/ubuntu/concord/tools/conc_genconfig.cpp:168: undefined reference to `log4cplus::Logger::isEnabledFor(int) const'
/home/ubuntu/concord/tools/conc_genconfig.cpp:168: undefined reference to `log4cplus::detail::get_macro_body_oss[abi:cxx11]()'
/home/ubuntu/concord/tools/conc_genconfig.cpp:168: undefined reference to `log4cplus::detail::macro_forced_log(log4cplus::Logger const&, int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, char const*, int, char const*)'
/home/ubuntu/concord/tools/conc_genconfig.cpp:177: undefined reference to `concord::config::ConcordConfiguration::generateAll(bool, bool)'
/home/ubuntu/concord/tools/conc_genconfig.cpp:179: undefined reference to `log4cplus::Logger::isEnabledFor(int) const'
/home/ubuntu/concord/tools/conc_genconfig.cpp:179: undefined reference to `log4cplus::detail::get_macro_body_oss[abi:cxx11]()'
/home/ubuntu/concord/tools/conc_genconfig.cpp:179: undefined reference to `log4cplus::detail::macro_forced_log(log4cplus::Logger const&, int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, char const*, int, char const*)'
/home/ubuntu/concord/tools/conc_genconfig.cpp:185: undefined reference to `concord::config::ConcordConfiguration::scopeIsInstantiated(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const'
/home/ubuntu/concord/tools/conc_genconfig.cpp:186: undefined reference to `log4cplus::Logger::isEnabledFor(int) const'
/home/ubuntu/concord/tools/conc_genconfig.cpp:186: undefined reference to `log4cplus::detail::get_macro_body_oss[abi:cxx11]()'
/home/ubuntu/concord/tools/conc_genconfig.cpp:186: undefined reference to `log4cplus::detail::macro_forced_log(log4cplus::Logger const&, int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, char const*, int, char const*)'
/home/ubuntu/concord/tools/conc_genconfig.cpp:192: undefined reference to `concord::config::ConcordConfiguration::validateAll(bool, bool)'
/home/ubuntu/concord/tools/conc_genconfig.cpp:194: undefined reference to `log4cplus::Logger::isEnabledFor(int) const'
/home/ubuntu/concord/tools/conc_genconfig.cpp:194: undefined reference to `log4cplus::detail::get_macro_body_oss[abi:cxx11]()'
/home/ubuntu/concord/tools/conc_genconfig.cpp:194: undefined reference to `log4cplus::detail::macro_forced_log(log4cplus::Logger const&, int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, char const*, int, char const*)'
/home/ubuntu/concord/tools/conc_genconfig.cpp:199: undefined reference to `concord::config::hasAllParametersRequiredAtConfigurationGeneration(concord::config::ConcordConfiguration&)'
/home/ubuntu/concord/tools/conc_genconfig.cpp:200: undefined reference to `log4cplus::Logger::isEnabledFor(int) const'
/home/ubuntu/concord/tools/conc_genconfig.cpp:200: undefined reference to `log4cplus::detail::get_macro_body_oss[abi:cxx11]()'
/home/ubuntu/concord/tools/conc_genconfig.cpp:200: undefined reference to `log4cplus::detail::macro_forced_log(log4cplus::Logger const&, int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, char const*, int, char const*)'
/home/ubuntu/concord/tools/conc_genconfig.cpp:205: undefined reference to `concord::config::ConcordConfiguration::scopeSize(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const'
/home/ubuntu/concord/tools/conc_genconfig.cpp:210: undefined reference to `concord::config::YAMLConfigurationOutput::YAMLConfigurationOutput(std::ostream&)'
/home/ubuntu/concord/tools/conc_genconfig.cpp:212: undefined reference to `concord::config::outputConcordNodeConfiguration(concord::config::ConcordConfiguration const&, concord::config::YAMLConfigurationOutput&, unsigned long)'
/home/ubuntu/concord/tools/conc_genconfig.cpp:222: undefined reference to `log4cplus::Logger::isEnabledFor(int) const'
/home/ubuntu/concord/tools/conc_genconfig.cpp:222: undefined reference to `log4cplus::detail::get_macro_body_oss[abi:cxx11]()'
/home/ubuntu/concord/tools/conc_genconfig.cpp:222: undefined reference to `log4cplus::detail::macro_forced_log(log4cplus::Logger const&, int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, char const*, int, char const*)'
/home/ubuntu/concord/tools/conc_genconfig.cpp:222: undefined reference to `concord::config::YAMLConfigurationOutput::~YAMLConfigurationOutput()'
/home/ubuntu/concord/tools/conc_genconfig.cpp:231: undefined reference to `concord::config::outputPrincipalLocationsMappingJSON(concord::config::ConcordConfiguration&, std::ostream&)'
/home/ubuntu/concord/tools/conc_genconfig.cpp:241: undefined reference to `log4cplus::Logger::isEnabledFor(int) const'
/home/ubuntu/concord/tools/conc_genconfig.cpp:241: undefined reference to `log4cplus::detail::get_macro_body_oss[abi:cxx11]()'
/home/ubuntu/concord/tools/conc_genconfig.cpp:241: undefined reference to `log4cplus::detail::macro_forced_log(log4cplus::Logger const&, int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, char const*, int, char const*)'
/home/ubuntu/concord/tools/conc_genconfig.cpp:129: undefined reference to `concord::config::ConcordConfiguration::~ConcordConfiguration()'
/home/ubuntu/concord/tools/conc_genconfig.cpp:114: undefined reference to `concord::config::YAMLConfigurationInput::~YAMLConfigurationInput()'
/home/ubuntu/concord/tools/conc_genconfig.cpp:48: undefined reference to `log4cplus::Logger::~Logger()'
/home/ubuntu/concord/tools/conc_genconfig.cpp:45: undefined reference to `log4cplus::BasicConfigurator::~BasicConfigurator()'
/home/ubuntu/concord/tools/conc_genconfig.cpp:118: undefined reference to `log4cplus::Logger::isEnabledFor(int) const'
/home/ubuntu/concord/tools/conc_genconfig.cpp:118: undefined reference to `log4cplus::detail::get_macro_body_oss[abi:cxx11]()'
/home/ubuntu/concord/tools/conc_genconfig.cpp:118: undefined reference to `log4cplus::detail::macro_forced_log(log4cplus::Logger const&, int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, char const*, int, char const*)'
/home/ubuntu/concord/tools/conc_genconfig.cpp:124: undefined reference to `log4cplus::Logger::isEnabledFor(int) const'
/home/ubuntu/concord/tools/conc_genconfig.cpp:124: undefined reference to `log4cplus::detail::get_macro_body_oss[abi:cxx11]()'
/home/ubuntu/concord/tools/conc_genconfig.cpp:124: undefined reference to `log4cplus::detail::macro_forced_log(log4cplus::Logger const&, int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, char const*, int, char const*)'
/home/ubuntu/concord/tools/conc_genconfig.cpp:136: undefined reference to `log4cplus::Logger::isEnabledFor(int) const'
/home/ubuntu/concord/tools/conc_genconfig.cpp:136: undefined reference to `log4cplus::detail::get_macro_body_oss[abi:cxx11]()'
/home/ubuntu/concord/tools/conc_genconfig.cpp:136: undefined reference to `log4cplus::detail::macro_forced_log(log4cplus::Logger const&, int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, char const*, int, char const*)'
/home/ubuntu/concord/tools/conc_genconfig.cpp:143: undefined reference to `log4cplus::Logger::isEnabledFor(int) const'
/home/ubuntu/concord/tools/conc_genconfig.cpp:143: undefined reference to `log4cplus::detail::get_macro_body_oss[abi:cxx11]()'
/home/ubuntu/concord/tools/conc_genconfig.cpp:143: undefined reference to `log4cplus::detail::macro_forced_log(log4cplus::Logger const&, int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, char const*, int, char const*)'
/home/ubuntu/concord/tools/conc_genconfig.cpp:152: undefined reference to `log4cplus::Logger::isEnabledFor(int) const'
/home/ubuntu/concord/tools/conc_genconfig.cpp:152: undefined reference to `log4cplus::detail::get_macro_body_oss[abi:cxx11]()'
/home/ubuntu/concord/tools/conc_genconfig.cpp:152: undefined reference to `log4cplus::detail::macro_forced_log(log4cplus::Logger const&, int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, char const*, int, char const*)'
/home/ubuntu/concord/tools/conc_genconfig.cpp:170: undefined reference to `log4cplus::Logger::isEnabledFor(int) const'
/home/ubuntu/concord/tools/conc_genconfig.cpp:170: undefined reference to `log4cplus::detail::get_macro_body_oss[abi:cxx11]()'
/home/ubuntu/concord/tools/conc_genconfig.cpp:170: undefined reference to `log4cplus::detail::macro_forced_log(log4cplus::Logger const&, int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, char const*, int, char const*)'
/home/ubuntu/concord/tools/conc_genconfig.cpp:173: undefined reference to `log4cplus::Logger::isEnabledFor(int) const'
/home/ubuntu/concord/tools/conc_genconfig.cpp:173: undefined reference to `log4cplus::detail::get_macro_body_oss[abi:cxx11]()'
/home/ubuntu/concord/tools/conc_genconfig.cpp:173: undefined reference to `log4cplus::detail::macro_forced_log(log4cplus::Logger const&, int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, char const*, int, char const*)'
/home/ubuntu/concord/tools/conc_genconfig.cpp:214: undefined reference to `log4cplus::Logger::isEnabledFor(int) const'
/home/ubuntu/concord/tools/conc_genconfig.cpp:214: undefined reference to `log4cplus::detail::get_macro_body_oss[abi:cxx11]()'
/home/ubuntu/concord/tools/conc_genconfig.cpp:214: undefined reference to `log4cplus::detail::macro_forced_log(log4cplus::Logger const&, int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, char const*, int, char const*)'
/home/ubuntu/concord/tools/conc_genconfig.cpp:218: undefined reference to `log4cplus::Logger::isEnabledFor(int) const'
/home/ubuntu/concord/tools/conc_genconfig.cpp:218: undefined reference to `log4cplus::detail::get_macro_body_oss[abi:cxx11]()'
/home/ubuntu/concord/tools/conc_genconfig.cpp:218: undefined reference to `log4cplus::detail::macro_forced_log(log4cplus::Logger const&, int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, char const*, int, char const*)'
/home/ubuntu/concord/tools/conc_genconfig.cpp:210: undefined reference to `concord::config::YAMLConfigurationOutput::~YAMLConfigurationOutput()'
/home/ubuntu/concord/tools/conc_genconfig.cpp:233: undefined reference to `log4cplus::Logger::isEnabledFor(int) const'
/home/ubuntu/concord/tools/conc_genconfig.cpp:233: undefined reference to `log4cplus::detail::get_macro_body_oss[abi:cxx11]()'
/home/ubuntu/concord/tools/conc_genconfig.cpp:233: undefined reference to `log4cplus::detail::macro_forced_log(log4cplus::Logger const&, int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, char const*, int, char const*)'
/home/ubuntu/concord/tools/conc_genconfig.cpp:129: undefined reference to `concord::config::ConcordConfiguration::~ConcordConfiguration()'
/home/ubuntu/concord/tools/conc_genconfig.cpp:114: undefined reference to `concord::config::YAMLConfigurationInput::~YAMLConfigurationInput()'
/home/ubuntu/concord/tools/conc_genconfig.cpp:48: undefined reference to `log4cplus::Logger::~Logger()'
/home/ubuntu/concord/tools/conc_genconfig.cpp:45: undefined reference to `log4cplus::BasicConfigurator::~BasicConfigurator()'
/tmp/cc2pIDGw.o: In function `boost::program_options::value_semantic_codecvt_helper<char>::value_semantic_codecvt_helper()':
/usr/include/boost/program_options/value_semantic.hpp:91: undefined reference to `vtable for boost::program_options::value_semantic_codecvt_helper<char>'
/tmp/cc2pIDGw.o: In function `boost::program_options::value_semantic_codecvt_helper<char>::~value_semantic_codecvt_helper()':
/usr/include/boost/program_options/value_semantic.hpp:91: undefined reference to `vtable for boost::program_options::value_semantic_codecvt_helper<char>'
/tmp/cc2pIDGw.o: In function `boost::program_options::basic_command_line_parser<char>::basic_command_line_parser(int, char const* const*)':
/usr/include/boost/program_options/detail/parsers.hpp:44: undefined reference to `boost::program_options::detail::cmdline::cmdline(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> > > > const&)'
/tmp/cc2pIDGw.o: In function `boost::program_options::basic_command_line_parser<char>::options(boost::program_options::options_description const&)':
/usr/include/boost/program_options/detail/parsers.hpp:52: undefined reference to `boost::program_options::detail::cmdline::set_options_description(boost::program_options::options_description const&)'
/tmp/cc2pIDGw.o: In function `boost::program_options::basic_command_line_parser<char>::run()':
/usr/include/boost/program_options/detail/parsers.hpp:108: undefined reference to `boost::program_options::detail::cmdline::get_canonical_option_prefix()'
/usr/include/boost/program_options/detail/parsers.hpp:109: undefined reference to `boost::program_options::detail::cmdline::run()'
/tmp/cc2pIDGw.o: In function `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> > > > boost::program_options::to_internal<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >(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> > > > const&)':
/usr/include/boost/program_options/detail/convert.hpp:79: undefined reference to `boost::program_options::to_internal(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
/tmp/cc2pIDGw.o:(.data.rel.ro._ZTVN5boost15program_options11typed_valueINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEcEE[_ZTVN5boost15program_options11typed_valueINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEcEE]+0x38): undefined reference to `boost::program_options::value_semantic_codecvt_helper<char>::parse(boost::any&, 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> > > > const&, bool) const'
/tmp/cc2pIDGw.o:(.data.rel.ro._ZTIN5boost15program_options11typed_valueINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEcEE[_ZTIN5boost15program_options11typed_valueINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEcEE]+0x18): undefined reference to `typeinfo for boost::program_options::value_semantic_codecvt_helper<char>'
/tmp/cc2pIDGw.o: In function `boost::program_options::variables_map::~variables_map()':
/usr/include/boost/program_options/variables_map.hpp:146: undefined reference to `vtable for boost::program_options::variables_map'
/tmp/cc2pIDGw.o: In function `boost::program_options::typed_value<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, char>::name() const':
/usr/include/boost/program_options/detail/value_semantic.hpp:22: undefined reference to `boost::program_options::arg[abi:cxx11]'
/tmp/cc2pIDGw.o: In function `boost::program_options::typed_value<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, char>::xparse(boost::any&, 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> > > > const&) const':
/usr/include/boost/program_options/detail/value_semantic.hpp:184: undefined reference to `boost::program_options::validate(boost::any&, 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> > > > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*, int)'
collect2: error: ld returned 1 exit status
Versions and OS
I am using: Ubuntu 18.04.3 LTS
gcc version: gcc (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0
g++ version: g++ (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0
libboost version: Version: 1.65.1.0ubuntu1
Environment variables
I have set LD_LIBRARY_PATH to /usr/local/lib. This is where log4cplus libraries have been built.
I apologise if this question is not clear. Please let me know if that is the case so I can improve my question. If anyone can, please add the tag 'concord' to the question.
After installing the apache arrow library on my computer, I tried running the c++ code example in the website (https://github.com/apache/arrow/blob/master/cpp/examples/arrow/row-wise-conversion-example.cc) but consistently kept getting the same error. I though it was because of the compiler couldnot find the arrow directory but after putting the library in the same folder as the test, it still didnt run and kept giving the same error.
g++ test.cpp
/usr/bin/ld: /tmp/ccvG1aV8.o: in function `VectorToColumnarTable(std::vector<data_row, std::allocator<data_row> > const&, std::shared_ptr<arrow::Table>*)':
test.cpp:(.text+0x5c): undefined reference to `arrow::default_memory_pool()'
/usr/bin/ld: test.cpp:(.text+0x49b): undefined reference to `arrow::ArrayBuilder::Finish(std::shared_ptr<arrow::Array>*)'
/usr/bin/ld: test.cpp:(.text+0x555): undefined reference to `arrow::ArrayBuilder::Finish(std::shared_ptr<arrow::Array>*)'
/usr/bin/ld: test.cpp:(.text+0x60f): undefined reference to `arrow::ArrayBuilder::Finish(std::shared_ptr<arrow::Array>*)'
/usr/bin/ld: test.cpp:(.text+0x6b6): undefined reference to `arrow::int64()'
/usr/bin/ld: test.cpp:(.text+0x70b): undefined reference to `arrow::field(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::shared_ptr<arrow::DataType> const&, bool, std::shared_ptr<arrow::KeyValueMetadata const> const&)'
/usr/bin/ld: test.cpp:(.text+0x72e): undefined reference to `arrow::float64()'
/usr/bin/ld: test.cpp:(.text+0x783): undefined reference to `arrow::field(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::shared_ptr<arrow::DataType> const&, bool, std::shared_ptr<arrow::KeyValueMetadata const> const&)'
/usr/bin/ld: test.cpp:(.text+0x7a6): undefined reference to `arrow::float64()'
/usr/bin/ld: test.cpp:(.text+0x7bf): undefined reference to `arrow::list(std::shared_ptr<arrow::DataType> const&)'
/usr/bin/ld: test.cpp:(.text+0x814): undefined reference to `arrow::field(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::shared_ptr<arrow::DataType> const&, bool, std::shared_ptr<arrow::KeyValueMetadata const> const&)'
/usr/bin/ld: test.cpp:(.text+0xa1a): undefined reference to `arrow::Table::Make(std::shared_ptr<arrow::Schema> const&, std::vector<std::shared_ptr<arrow::Array>, std::allocator<std::shared_ptr<arrow::Array> > > const&, long)'
/usr/bin/ld: /tmp/ccvG1aV8.o: in function `ColumnarTableToVector(std::shared_ptr<arrow::Table> const&, std::vector<data_row, std::allocator<data_row> >*)':
test.cpp:(.text+0xef0): undefined reference to `arrow::int64()'
/usr/bin/ld: test.cpp:(.text+0xf45): undefined reference to `arrow::field(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::shared_ptr<arrow::DataType> const&, bool, std::shared_ptr<arrow::KeyValueMetadata const> const&)'
/usr/bin/ld: test.cpp:(.text+0xf68): undefined reference to `arrow::float64()'
/usr/bin/ld: test.cpp:(.text+0xfbd): undefined reference to `arrow::field(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::shared_ptr<arrow::DataType> const&, bool, std::shared_ptr<arrow::KeyValueMetadata const> const&)'
/usr/bin/ld: test.cpp:(.text+0xfe0): undefined reference to `arrow::float64()'
/usr/bin/ld: test.cpp:(.text+0xff9): undefined reference to `arrow::list(std::shared_ptr<arrow::DataType> const&)'
/usr/bin/ld: test.cpp:(.text+0x1048): undefined reference to `arrow::field(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::shared_ptr<arrow::DataType> const&, bool, std::shared_ptr<arrow::KeyValueMetadata const> const&)'
/usr/bin/ld: test.cpp:(.text+0x11eb): undefined reference to `arrow::Schema::Equals(arrow::Schema const&, bool) const'
/usr/bin/ld: /tmp/ccvG1aV8.o: in function `arrow::detail::Fingerprintable::Fingerprintable()':
test.cpp:(.text._ZN5arrow6detail15FingerprintableC2Ev[_ZN5arrow6detail15FingerprintableC5Ev]+0xf): undefined reference to `vtable for arrow::detail::Fingerprintable'
/usr/bin/ld: /tmp/ccvG1aV8.o: in function `arrow::DataType::DataType(arrow::Type::type)':
test.cpp:(.text._ZN5arrow8DataTypeC2ENS_4Type4typeE[_ZN5arrow8DataTypeC5ENS_4Type4typeE]+0x45): undefined reference to `vtable for arrow::DataType'
/usr/bin/ld: /tmp/ccvG1aV8.o: in function `arrow::NestedType::~NestedType()':
test.cpp:(.text._ZN5arrow10NestedTypeD2Ev[_ZN5arrow10NestedTypeD5Ev]+0x26): undefined reference to `arrow::DataType::~DataType()'
/usr/bin/ld: /tmp/ccvG1aV8.o: in function `arrow::ListType::ListType(std::shared_ptr<arrow::Field> const&)':
test.cpp:(.text._ZN5arrow8ListTypeC2ERKSt10shared_ptrINS_5FieldEE[_ZN5arrow8ListTypeC5ERKSt10shared_ptrINS_5FieldEE]+0x3c): undefined reference to `vtable for arrow::ListType'
/usr/bin/ld: /tmp/ccvG1aV8.o: in function `arrow::Buffer::ZeroPadding()':
test.cpp:(.text._ZN5arrow6Buffer11ZeroPaddingEv[_ZN5arrow6Buffer11ZeroPaddingEv]+0x18): undefined reference to `arrow::Buffer::CheckMutable() const'
/usr/bin/ld: /tmp/ccvG1aV8.o: in function `arrow::Buffer::mutable_data()':
test.cpp:(.text._ZN5arrow6Buffer12mutable_dataEv[_ZN5arrow6Buffer12mutable_dataEv]+0x18): undefined reference to `arrow::Buffer::CheckMutable() const'
/usr/bin/ld: /tmp/ccvG1aV8.o: in function `arrow::TypeTraits<arrow::Int64Type>::type_singleton()':
test.cpp:(.text._ZN5arrow10TypeTraitsINS_9Int64TypeEE14type_singletonEv[_ZN5arrow10TypeTraitsINS_9Int64TypeEE14type_singletonEv]+0x27): undefined reference to `arrow::int64()'
/usr/bin/ld: /tmp/ccvG1aV8.o: in function `arrow::TypeTraits<arrow::DoubleType>::type_singleton()':
test.cpp:(.text._ZN5arrow10TypeTraitsINS_10DoubleTypeEE14type_singletonEv[_ZN5arrow10TypeTraitsINS_10DoubleTypeEE14type_singletonEv]+0x27): undefined reference to `arrow::float64()'
/usr/bin/ld: /tmp/ccvG1aV8.o: in function `arrow::BufferBuilder::Resize(long, bool)':
test.cpp:(.text._ZN5arrow13BufferBuilder6ResizeElb[_ZN5arrow13BufferBuilder6ResizeElb]+0x76): undefined reference to `arrow::AllocateResizableBuffer(arrow::MemoryPool*, long, std::shared_ptr<arrow::ResizableBuffer>*)'
/usr/bin/ld: /tmp/ccvG1aV8.o: in function `arrow::BufferBuilder::Finish(std::shared_ptr<arrow::Buffer>*, bool)':
test.cpp:(.text._ZN5arrow13BufferBuilder6FinishEPSt10shared_ptrINS_6BufferEEb[_ZN5arrow13BufferBuilder6FinishEPSt10shared_ptrINS_6BufferEEb]+0x121): undefined reference to `arrow::AllocateBuffer(arrow::MemoryPool*, long, std::shared_ptr<arrow::Buffer>*)'
/usr/bin/ld: /tmp/ccvG1aV8.o: in function `arrow::ArrayBuilder::ArrayBuilder(arrow::MemoryPool*)':
test.cpp:(.text._ZN5arrow12ArrayBuilderC2EPNS_10MemoryPoolE[_ZN5arrow12ArrayBuilderC5EPNS_10MemoryPoolE]+0x17): undefined reference to `vtable for arrow::ArrayBuilder'
/usr/bin/ld: /tmp/ccvG1aV8.o: in function `arrow::ArrayBuilder::UnsafeAppendToBitmap(unsigned char const*, long)':
test.cpp:(.text._ZN5arrow12ArrayBuilder20UnsafeAppendToBitmapEPKhl[_ZN5arrow12ArrayBuilder20UnsafeAppendToBitmapEPKhl]+0x2e): undefined reference to `arrow::ArrayBuilder::UnsafeSetNotNull(long)'
/usr/bin/ld: /tmp/ccvG1aV8.o: in function `arrow::ArrayBuilder::UnsafeAppendToBitmap(long, bool)':
test.cpp:(.text._ZN5arrow12ArrayBuilder20UnsafeAppendToBitmapElb[_ZN5arrow12ArrayBuilder20UnsafeAppendToBitmapElb]+0x2e): undefined reference to `arrow::ArrayBuilder::UnsafeSetNotNull(long)'
/usr/bin/ld: test.cpp:(.text._ZN5arrow12ArrayBuilder20UnsafeAppendToBitmapElb[_ZN5arrow12ArrayBuilder20UnsafeAppendToBitmapElb]+0x43): undefined reference to `arrow::ArrayBuilder::UnsafeSetNull(long)'
/usr/bin/ld: /tmp/ccvG1aV8.o: in function `arrow::ArrayBuilder::~ArrayBuilder()':
test.cpp:(.text._ZN5arrow12ArrayBuilderD2Ev[_ZN5arrow12ArrayBuilderD5Ev]+0x13): undefined reference to `vtable for arrow::ArrayBuilder'
/usr/bin/ld: /tmp/ccvG1aV8.o: in function `arrow::NumericBuilder<arrow::Int64Type>::NumericBuilder<arrow::Int64Type>(std::enable_if<std::integral_constant<bool, arrow::TypeTraits<arrow::Int64Type>::is_parameter_free>::value, arrow::MemoryPool*>::type)':
test.cpp:(.text._ZN5arrow14NumericBuilderINS_9Int64TypeEEC2IS1_EENSt9enable_ifIXsrSt17integral_constantIbXsrNS_10TypeTraitsIT_EE17is_parameter_freeEE5valueEPNS_10MemoryPoolEE4typeE[_ZN5arrow14NumericBuilderINS_9Int64TypeEEC5IS1_EENSt9enable_ifIXsrSt17integral_constantIbXsrNS_10TypeTraitsIT_EE17is_parameter_freeEE5valueEPNS_10MemoryPoolEE4typeE]+0x61): undefined reference to `arrow::default_memory_pool()'
/usr/bin/ld: /tmp/ccvG1aV8.o: in function `arrow::NumericBuilder<arrow::DoubleType>::NumericBuilder<arrow::DoubleType>(std::enable_if<std::integral_constant<bool, arrow::TypeTraits<arrow::DoubleType>::is_parameter_free>::value, arrow::MemoryPool*>::type)':
test.cpp:(.text._ZN5arrow14NumericBuilderINS_10DoubleTypeEEC2IS1_EENSt9enable_ifIXsrSt17integral_constantIbXsrNS_10TypeTraitsIT_EE17is_parameter_freeEE5valueEPNS_10MemoryPoolEE4typeE[_ZN5arrow14NumericBuilderINS_10DoubleTypeEEC5IS1_EENSt9enable_ifIXsrSt17integral_constantIbXsrNS_10TypeTraitsIT_EE17is_parameter_freeEE5valueEPNS_10MemoryPoolEE4typeE]+0x61): undefined reference to `arrow::default_memory_pool()'
/usr/bin/ld: /tmp/ccvG1aV8.o: in function `arrow::BaseListBuilder<arrow::ListType>::BaseListBuilder(arrow::MemoryPool*, std::shared_ptr<arrow::ArrayBuilder> const&)':
test.cpp:(.text._ZN5arrow15BaseListBuilderINS_8ListTypeEEC2EPNS_10MemoryPoolERKSt10shared_ptrINS_12ArrayBuilderEE[_ZN5arrow15BaseListBuilderINS_8ListTypeEEC5EPNS_10MemoryPoolERKSt10shared_ptrINS_12ArrayBuilderEE]+0x59): undefined reference to `arrow::list(std::shared_ptr<arrow::DataType> const&)'
/usr/bin/ld: /tmp/ccvG1aV8.o: in function `arrow::Status arrow::Status::FromArgs<char const (&) [33]>(arrow::StatusCode, char const (&) [33])':
test.cpp:(.text._ZN5arrow6Status8FromArgsIJRA33_KcEEES0_NS_10StatusCodeEDpOT_[_ZN5arrow6Status8FromArgsIJRA33_KcEEES0_NS_10StatusCodeEDpOT_]+0x59): undefined reference to `arrow::Status::Status(arrow::StatusCode, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
/usr/bin/ld: /tmp/ccvG1aV8.o: in function `arrow::Status arrow::Status::FromArgs<char const (&) [23]>(arrow::StatusCode, char const (&) [23])':
test.cpp:(.text._ZN5arrow6Status8FromArgsIJRA23_KcEEES0_NS_10StatusCodeEDpOT_[_ZN5arrow6Status8FromArgsIJRA23_KcEEES0_NS_10StatusCodeEDpOT_]+0x59): undefined reference to `arrow::Status::Status(arrow::StatusCode, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
/usr/bin/ld: /tmp/ccvG1aV8.o: in function `arrow::BaseListBuilder<arrow::ListType>::BaseListBuilder(arrow::MemoryPool*, std::shared_ptr<arrow::ArrayBuilder> const&, std::shared_ptr<arrow::DataType> const&)':
test.cpp:(.text._ZN5arrow15BaseListBuilderINS_8ListTypeEEC2EPNS_10MemoryPoolERKSt10shared_ptrINS_12ArrayBuilderEERKS5_INS_8DataTypeEE[_ZN5arrow15BaseListBuilderINS_8ListTypeEEC5EPNS_10MemoryPoolERKSt10shared_ptrINS_12ArrayBuilderEERKS5_INS_8DataTypeEE]+0xdd): undefined reference to `arrow::Field::WithType(std::shared_ptr<arrow::DataType> const&) const'
/usr/bin/ld: /tmp/ccvG1aV8.o: in function `arrow::Status arrow::Status::FromArgs<char const (&) [26]>(arrow::StatusCode, char const (&) [26])':
test.cpp:(.text._ZN5arrow6Status8FromArgsIJRA26_KcEEES0_NS_10StatusCodeEDpOT_[_ZN5arrow6Status8FromArgsIJRA26_KcEEES0_NS_10StatusCodeEDpOT_]+0x59): undefined reference to `arrow::Status::Status(arrow::StatusCode, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
/usr/bin/ld: /tmp/ccvG1aV8.o: in function `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > arrow::util::StringBuilder<char const (&) [33]>(char const (&) [33])':
test.cpp:(.text._ZN5arrow4util13StringBuilderIJRA33_KcEEENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEDpOT_[_ZN5arrow4util13StringBuilderIJRA33_KcEEENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEDpOT_]+0x2c): undefined reference to `arrow::util::detail::StringStreamWrapper::StringStreamWrapper()'
/usr/bin/ld: test.cpp:(.text._ZN5arrow4util13StringBuilderIJRA33_KcEEENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEDpOT_[_ZN5arrow4util13StringBuilderIJRA33_KcEEENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEDpOT_]+0x65): undefined reference to `arrow::util::detail::StringStreamWrapper::str[abi:cxx11]()'
/usr/bin/ld: test.cpp:(.text._ZN5arrow4util13StringBuilderIJRA33_KcEEENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEDpOT_[_ZN5arrow4util13StringBuilderIJRA33_KcEEENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEDpOT_]+0x72): undefined reference to `arrow::util::detail::StringStreamWrapper::~StringStreamWrapper()'
/usr/bin/ld: test.cpp:(.text._ZN5arrow4util13StringBuilderIJRA33_KcEEENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEDpOT_[_ZN5arrow4util13StringBuilderIJRA33_KcEEENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEDpOT_]+0x97): undefined reference to `arrow::util::detail::StringStreamWrapper::~StringStreamWrapper()'
/usr/bin/ld: /tmp/ccvG1aV8.o: in function `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > arrow::util::StringBuilder<char const (&) [23]>(char const (&) [23])':
test.cpp:(.text._ZN5arrow4util13StringBuilderIJRA23_KcEEENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEDpOT_[_ZN5arrow4util13StringBuilderIJRA23_KcEEENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEDpOT_]+0x2c): undefined reference to `arrow::util::detail::StringStreamWrapper::StringStreamWrapper()'
/usr/bin/ld: test.cpp:(.text._ZN5arrow4util13StringBuilderIJRA23_KcEEENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEDpOT_[_ZN5arrow4util13StringBuilderIJRA23_KcEEENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEDpOT_]+0x65): undefined reference to `arrow::util::detail::StringStreamWrapper::str[abi:cxx11]()'
/usr/bin/ld: test.cpp:(.text._ZN5arrow4util13StringBuilderIJRA23_KcEEENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEDpOT_[_ZN5arrow4util13StringBuilderIJRA23_KcEEENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEDpOT_]+0x72): undefined reference to `arrow::util::detail::StringStreamWrapper::~StringStreamWrapper()'
/usr/bin/ld: test.cpp:(.text._ZN5arrow4util13StringBuilderIJRA23_KcEEENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEDpOT_[_ZN5arrow4util13StringBuilderIJRA23_KcEEENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEDpOT_]+0x97): undefined reference to `arrow::util::detail::StringStreamWrapper::~StringStreamWrapper()'
/usr/bin/ld: /tmp/ccvG1aV8.o: in function `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > arrow::util::StringBuilder<char const (&) [26]>(char const (&) [26])':
test.cpp:(.text._ZN5arrow4util13StringBuilderIJRA26_KcEEENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEDpOT_[_ZN5arrow4util13StringBuilderIJRA26_KcEEENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEDpOT_]+0x2c): undefined reference to `arrow::util::detail::StringStreamWrapper::StringStreamWrapper()'
/usr/bin/ld: test.cpp:(.text._ZN5arrow4util13StringBuilderIJRA26_KcEEENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEDpOT_[_ZN5arrow4util13StringBuilderIJRA26_KcEEENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEDpOT_]+0x65): undefined reference to `arrow::util::detail::StringStreamWrapper::str[abi:cxx11]()'
/usr/bin/ld: test.cpp:(.text._ZN5arrow4util13StringBuilderIJRA26_KcEEENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEDpOT_[_ZN5arrow4util13StringBuilderIJRA26_KcEEENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEDpOT_]+0x72): undefined reference to `arrow::util::detail::StringStreamWrapper::~StringStreamWrapper()'
/usr/bin/ld: test.cpp:(.text._ZN5arrow4util13StringBuilderIJRA26_KcEEENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEDpOT_[_ZN5arrow4util13StringBuilderIJRA26_KcEEENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEDpOT_]+0x97): undefined reference to `arrow::util::detail::StringStreamWrapper::~StringStreamWrapper()'
/usr/bin/ld: /tmp/ccvG1aV8.o: in function `arrow::Status arrow::Status::FromArgs<char const (&) [37], long, char const (&) [17], char const (&) [7], long const&>(arrow::StatusCode, char const (&) [37], long&&, char const (&) [17], char const (&) [7], long const&)':
test.cpp:(.text._ZN5arrow6Status8FromArgsIJRA37_KclRA17_S2_RA7_S2_RKlEEES0_NS_10StatusCodeEDpOT_[_ZN5arrow6Status8FromArgsIJRA37_KclRA17_S2_RA7_S2_RKlEEES0_NS_10StatusCodeEDpOT_]+0xbe): undefined reference to `arrow::Status::Status(arrow::StatusCode, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
/usr/bin/ld: /tmp/ccvG1aV8.o: in function `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > arrow::util::StringBuilder<char const (&) [37], long, char const (&) [17], char const (&) [7], long const&>(char const (&) [37], long&&, char const (&) [17], char const (&) [7], long const&)':
test.cpp:(.text._ZN5arrow4util13StringBuilderIJRA37_KclRA17_S2_RA7_S2_RKlEEENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEDpOT_[_ZN5arrow4util13StringBuilderIJRA37_KclRA17_S2_RA7_S2_RKlEEENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEDpOT_]+0x44): undefined reference to `arrow::util::detail::StringStreamWrapper::StringStreamWrapper()'
/usr/bin/ld: test.cpp:(.text._ZN5arrow4util13StringBuilderIJRA37_KclRA17_S2_RA7_S2_RKlEEENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEDpOT_[_ZN5arrow4util13StringBuilderIJRA37_KclRA17_S2_RA7_S2_RKlEEENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEDpOT_]+0xc5): undefined reference to `arrow::util::detail::StringStreamWrapper::str[abi:cxx11]()'
/usr/bin/ld: test.cpp:(.text._ZN5arrow4util13StringBuilderIJRA37_KclRA17_S2_RA7_S2_RKlEEENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEDpOT_[_ZN5arrow4util13StringBuilderIJRA37_KclRA17_S2_RA7_S2_RKlEEENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEDpOT_]+0xd2): undefined reference to `arrow::util::detail::StringStreamWrapper::~StringStreamWrapper()'
/usr/bin/ld: test.cpp:(.text._ZN5arrow4util13StringBuilderIJRA37_KclRA17_S2_RA7_S2_RKlEEENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEDpOT_[_ZN5arrow4util13StringBuilderIJRA37_KclRA17_S2_RA7_S2_RKlEEENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEDpOT_]+0xf7): undefined reference to `arrow::util::detail::StringStreamWrapper::~StringStreamWrapper()'
/usr/bin/ld: /tmp/ccvG1aV8.o: in function `void __gnu_cxx::new_allocator<arrow::Schema>::construct<arrow::Schema, std::vector<std::shared_ptr<arrow::Field>, std::allocator<std::shared_ptr<arrow::Field> > >&>(arrow::Schema*, std::vector<std::shared_ptr<arrow::Field>, std::allocator<std::shared_ptr<arrow::Field> > >&)':
test.cpp:(.text._ZN9__gnu_cxx13new_allocatorIN5arrow6SchemaEE9constructIS2_JRSt6vectorISt10shared_ptrINS1_5FieldEESaIS8_EEEEEvPT_DpOT0_[_ZN9__gnu_cxx13new_allocatorIN5arrow6SchemaEE9constructIS2_JRSt6vectorISt10shared_ptrINS1_5FieldEESaIS8_EEEEEvPT_DpOT0_]+0x70): undefined reference to `arrow::Schema::Schema(std::vector<std::shared_ptr<arrow::Field>, std::allocator<std::shared_ptr<arrow::Field> > > const&, std::shared_ptr<arrow::KeyValueMetadata const> const&)'
/usr/bin/ld: /tmp/ccvG1aV8.o:(.data.rel.ro._ZTVN5arrow12BaseListTypeE[_ZTVN5arrow12BaseListTypeE]+0x20): undefined reference to `arrow::DataType::ComputeFingerprint[abi:cxx11]() const'
/usr/bin/ld: /tmp/ccvG1aV8.o:(.data.rel.ro._ZTVN5arrow12BaseListTypeE[_ZTVN5arrow12BaseListTypeE]+0x28): undefined reference to `arrow::DataType::ComputeMetadataFingerprint[abi:cxx11]() const'
/usr/bin/ld: /tmp/ccvG1aV8.o:(.data.rel.ro._ZTVN5arrow10NestedTypeE[_ZTVN5arrow10NestedTypeE]+0x20): undefined reference to `arrow::DataType::ComputeFingerprint[abi:cxx11]() const'
/usr/bin/ld: /tmp/ccvG1aV8.o:(.data.rel.ro._ZTVN5arrow10NestedTypeE[_ZTVN5arrow10NestedTypeE]+0x28): undefined reference to `arrow::DataType::ComputeMetadataFingerprint[abi:cxx11]() const'
/usr/bin/ld: /tmp/ccvG1aV8.o:(.data.rel.ro._ZTIN5arrow14NumericBuilderINS_10DoubleTypeEEE[_ZTIN5arrow14NumericBuilderINS_10DoubleTypeEEE]+0x10): undefined reference to `typeinfo for arrow::ArrayBuilder'
/usr/bin/ld: /tmp/ccvG1aV8.o:(.data.rel.ro._ZTIN5arrow14NumericBuilderINS_9Int64TypeEEE[_ZTIN5arrow14NumericBuilderINS_9Int64TypeEEE]+0x10): undefined reference to `typeinfo for arrow::ArrayBuilder'
/usr/bin/ld: /tmp/ccvG1aV8.o:(.data.rel.ro._ZTIN5arrow15BaseListBuilderINS_8ListTypeEEE[_ZTIN5arrow15BaseListBuilderINS_8ListTypeEEE]+0x10): undefined reference to `typeinfo for arrow::ArrayBuilder'
/usr/bin/ld: /tmp/ccvG1aV8.o:(.data.rel.ro._ZTIN5arrow10NestedTypeE[_ZTIN5arrow10NestedTypeE]+0x18): undefined reference to `typeinfo for arrow::DataType'
/usr/bin/ld: /tmp/ccvG1aV8.o: in function `arrow::NumericBuilder<arrow::DoubleType>::Resize(long)':
test.cpp:(.text._ZN5arrow14NumericBuilderINS_10DoubleTypeEE6ResizeEl[_ZN5arrow14NumericBuilderINS_10DoubleTypeEE6ResizeEl]+0x16a): undefined reference to `arrow::ArrayBuilder::Resize(long)'
/usr/bin/ld: /tmp/ccvG1aV8.o: in function `arrow::NumericBuilder<arrow::DoubleType>::AppendNulls(long)':
test.cpp:(.text._ZN5arrow14NumericBuilderINS_10DoubleTypeEE11AppendNullsEl[_ZN5arrow14NumericBuilderINS_10DoubleTypeEE11AppendNullsEl]+0xd7): undefined reference to `arrow::ArrayBuilder::UnsafeSetNull(long)'
/usr/bin/ld: /tmp/ccvG1aV8.o: in function `arrow::NumericBuilder<arrow::DoubleType>::FinishInternal(std::shared_ptr<arrow::ArrayData>*)':
test.cpp:(.text._ZN5arrow14NumericBuilderINS_10DoubleTypeEE14FinishInternalEPSt10shared_ptrINS_9ArrayDataEE[_ZN5arrow14NumericBuilderINS_10DoubleTypeEE14FinishInternalEPSt10shared_ptrINS_9ArrayDataEE]+0x266): undefined reference to `arrow::ArrayData::Make(std::shared_ptr<arrow::DataType> const&, long, std::vector<std::shared_ptr<arrow::Buffer>, std::allocator<std::shared_ptr<arrow::Buffer> > >&&, long, long)'
/usr/bin/ld: /tmp/ccvG1aV8.o: in function `arrow::NumericBuilder<arrow::Int64Type>::Resize(long)':
test.cpp:(.text._ZN5arrow14NumericBuilderINS_9Int64TypeEE6ResizeEl[_ZN5arrow14NumericBuilderINS_9Int64TypeEE6ResizeEl]+0x16a): undefined reference to `arrow::ArrayBuilder::Resize(long)'
/usr/bin/ld: /tmp/ccvG1aV8.o: in function `arrow::NumericBuilder<arrow::Int64Type>::AppendNulls(long)':
test.cpp:(.text._ZN5arrow14NumericBuilderINS_9Int64TypeEE11AppendNullsEl[_ZN5arrow14NumericBuilderINS_9Int64TypeEE11AppendNullsEl]+0xd8): undefined reference to `arrow::ArrayBuilder::UnsafeSetNull(long)'
/usr/bin/ld: /tmp/ccvG1aV8.o: in function `arrow::NumericBuilder<arrow::Int64Type>::FinishInternal(std::shared_ptr<arrow::ArrayData>*)':
test.cpp:(.text._ZN5arrow14NumericBuilderINS_9Int64TypeEE14FinishInternalEPSt10shared_ptrINS_9ArrayDataEE[_ZN5arrow14NumericBuilderINS_9Int64TypeEE14FinishInternalEPSt10shared_ptrINS_9ArrayDataEE]+0x266): undefined reference to `arrow::ArrayData::Make(std::shared_ptr<arrow::DataType> const&, long, std::vector<std::shared_ptr<arrow::Buffer>, std::allocator<std::shared_ptr<arrow::Buffer> > >&&, long, long)'
/usr/bin/ld: /tmp/ccvG1aV8.o: in function `arrow::BaseListBuilder<arrow::ListType>::Resize(long)':
test.cpp:(.text._ZN5arrow15BaseListBuilderINS_8ListTypeEE6ResizeEl[_ZN5arrow15BaseListBuilderINS_8ListTypeEE6ResizeEl]+0x19a): undefined reference to `arrow::ArrayBuilder::Resize(long)'
/usr/bin/ld: /tmp/ccvG1aV8.o: in function `arrow::BaseListBuilder<arrow::ListType>::Reset()':
test.cpp:(.text._ZN5arrow15BaseListBuilderINS_8ListTypeEE5ResetEv[_ZN5arrow15BaseListBuilderINS_8ListTypeEE5ResetEv]+0x18): undefined reference to `arrow::ArrayBuilder::Reset()'
/usr/bin/ld: /tmp/ccvG1aV8.o: in function `arrow::BaseListBuilder<arrow::ListType>::FinishInternal(std::shared_ptr<arrow::ArrayData>*)':
test.cpp:(.text._ZN5arrow15BaseListBuilderINS_8ListTypeEE14FinishInternalEPSt10shared_ptrINS_9ArrayDataEE[_ZN5arrow15BaseListBuilderINS_8ListTypeEE14FinishInternalEPSt10shared_ptrINS_9ArrayDataEE]+0x568): undefined reference to `arrow::ArrayData::Make(std::shared_ptr<arrow::DataType> const&, long, std::vector<std::shared_ptr<arrow::Buffer>, std::allocator<std::shared_ptr<arrow::Buffer> > > const&, std::vector<std::shared_ptr<arrow::ArrayData>, std::allocator<std::shared_ptr<arrow::ArrayData> > > const&, long, long)'
/usr/bin/ld: /tmp/ccvG1aV8.o: in function `arrow::BaseListBuilder<arrow::ListType>::type() const':
test.cpp:(.text._ZNK5arrow15BaseListBuilderINS_8ListTypeEE4typeEv[_ZNK5arrow15BaseListBuilderINS_8ListTypeEE4typeEv]+0x70): undefined reference to `arrow::Field::WithType(std::shared_ptr<arrow::DataType> const&) const'
/usr/bin/ld: /tmp/ccvG1aV8.o: in function `arrow::Status arrow::Status::FromArgs<char const (&) [47], long, char const (&) [6], long&>(arrow::StatusCode, char const (&) [47], long&&, char const (&) [6], long&)':
test.cpp:(.text._ZN5arrow6Status8FromArgsIJRA47_KclRA6_S2_RlEEES0_NS_10StatusCodeEDpOT_[_ZN5arrow6Status8FromArgsIJRA47_KclRA6_S2_RlEEES0_NS_10StatusCodeEDpOT_]+0x9c): undefined reference to `arrow::Status::Status(arrow::StatusCode, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
/usr/bin/ld: /tmp/ccvG1aV8.o: in function `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > arrow::util::StringBuilder<char const (&) [47], long, char const (&) [6], long&>(char const (&) [47], long&&, char const (&) [6], long&)':
test.cpp:(.text._ZN5arrow4util13StringBuilderIJRA47_KclRA6_S2_RlEEENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEDpOT_[_ZN5arrow4util13StringBuilderIJRA47_KclRA6_S2_RlEEENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEDpOT_]+0x3e): undefined reference to `arrow::util::detail::StringStreamWrapper::StringStreamWrapper()'
/usr/bin/ld: test.cpp:(.text._ZN5arrow4util13StringBuilderIJRA47_KclRA6_S2_RlEEENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEDpOT_[_ZN5arrow4util13StringBuilderIJRA47_KclRA6_S2_RlEEENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEDpOT_]+0xad): undefined reference to `arrow::util::detail::StringStreamWrapper::str[abi:cxx11]()'
/usr/bin/ld: test.cpp:(.text._ZN5arrow4util13StringBuilderIJRA47_KclRA6_S2_RlEEENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEDpOT_[_ZN5arrow4util13StringBuilderIJRA47_KclRA6_S2_RlEEENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEDpOT_]+0xba): undefined reference to `arrow::util::detail::StringStreamWrapper::~StringStreamWrapper()'
/usr/bin/ld: test.cpp:(.text._ZN5arrow4util13StringBuilderIJRA47_KclRA6_S2_RlEEENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEDpOT_[_ZN5arrow4util13StringBuilderIJRA47_KclRA6_S2_RlEEENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEDpOT_]+0xdf): undefined reference to `arrow::util::detail::StringStreamWrapper::~StringStreamWrapper()'
collect2: error: ld returned 1 exit status
The code compiles correctly but fails to link. You need to supply the arrow library also to the g++ command:
g++ -L<directoy-of-libarrow.so> -larrow test.cpp
e.g.
g++ -L/usr/local/lib -larrow test.cpp
First step: make a file named
CMakeLists.txt
Second step: Paste the following text to the CMakeLists.txt file
cmake_minimum_required(VERSION 3.0)
project(test)
find_package(Arrow REQUIRED)
add_executable(test.o test.cpp)
target_link_libraries(test.o PRIVATE arrow_shared)
Third step:
cmake .
make
Fourth step (execute the test project):
./test.o
I'm following the tutorial here https://wiki.qt.io/RaspberryPi2EGLFS
I'm on Ubuntu 15.04. On the make step I am hit with a bunch of undefined reference errors, referring mostly to QT methods.
.obj/qaccessible.o:qaccessible.cpp:function QAccessibleEvent::accessibleInterface() const: error: undefined reference to 'QDebug::~QDebug()'
.obj/qaccessible.o:qaccessible.cpp:function QAccessibleEvent::accessibleInterface() const: error: undefined reference to 'QDebug::~QDebug()'
.obj/qaccessible.o:qaccessible.cpp:function QAccessibleEvent::accessibleInterface() const: error: undefined reference to 'QDebug::~QDebug()'
.obj/qaccessible.o:qaccessible.cpp:function QAccessibleEvent::accessibleInterface() const: error: undefined reference to 'QDebug::~QDebug()'
.obj/qaccessible.o:qaccessible.cpp:function operator<<(QDebug, QAccessibleInterface const*): error: undefined reference to 'QDebug::putString(QChar const*, unsigned int)'
.obj/qaccessible.o:qaccessible.cpp:function operator<<(QDebug, QAccessibleInterface const*): error: undefined reference to 'QDebug::putString(QChar const*, unsigned int)'
.obj/qgenericpluginfactory.o:qgenericpluginfactory.cpp:function QGenericPluginFactory::create(QString const&, QString const&): error: undefined reference to 'QString::toLower_helper(QString const&)'
.obj/qwindowsysteminterface.o:qwindowsysteminterface.cpp:function qt_handleShortcutEvent(QObject*, unsigned long, int, QFlags<Qt::KeyboardModifier>, QString const&, bool, unsigned short): error: undefined reference to 'QCoreApplication::notifyInternal2(QObject*, QEvent*)'
.obj/qplatforminputcontextfactory.o:qplatforminputcontextfactory.cpp:function QPlatformInputContextFactory::create(QString const&): error: undefined reference to 'QString::toLower_helper(QString&)'
.obj/qplatformtheme.o:qplatformtheme.cpp:function QPlatformTheme::defaultThemeHint(QPlatformTheme::ThemeHint): error: undefined reference to 'qEnvironmentVariableIntValue(char const*, bool*)'
.obj/qplatformtheme.o:qplatformtheme.cpp:function QPlatformTheme::defaultThemeHint(QPlatformTheme::ThemeHint): error: undefined reference to 'QMetaType::registerNormalizedType(QByteArray const&, void (*)(void*), void* (*)(void*, void const*), int, QFlags<QMetaType::TypeFlag>, QMetaObject const*)'
.obj/qplatformtheme.o:qplatformtheme.cpp:function QPlatformTheme::defaultThemeHint(QPlatformTheme::ThemeHint): error: undefined reference to 'QMetaType::registerNormalizedType(QByteArray const&, void (*)(void*), void* (*)(void*, void const*), int, QFlags<QMetaType::TypeFlag>, QMetaObject const*)'
.obj/qplatformtheme.o:qplatformtheme.cpp:function QMetaTypeId<QtMetaTypePrivate::QSequentialIterableImpl>::qt_metatype_id(): error: undefined reference to 'QMetaType::registerNormalizedType(QByteArray const&, void (*)(void*), void* (*)(void*, void const*), int, QFlags<QMetaType::TypeFlag>, QMetaObject const*)'
.obj/qplatformtheme.o:qplatformtheme.cpp:function QMetaTypeId<QList<int> >::qt_metatype_id(): error: undefined reference to 'QMetaType::registerNormalizedType(QByteArray const&, void (*)(void*), void* (*)(void*, void const*), int, QFlags<QMetaType::TypeFlag>, QMetaObject const*)'
.obj/qplatformthemefactory.o:qplatformthemefactory.cpp:function QPlatformThemeFactory::create(QString const&, QString const&): error: undefined reference to 'QString::toLower_helper(QString&)'
.obj/qplatformwindow.o:qplatformwindow.cpp:function QPlatformWindow::requestUpdate(): error: undefined reference to 'qEnvironmentVariableIntValue(char const*, bool*)'
.obj/qsurfaceformat.o:qsurfaceformat.cpp:function operator<<(QDebug, QSurfaceFormat const&): error: undefined reference to 'QDebug::resetFormat()'
.obj/qguiapplication.o:qguiapplication.cpp:function QGuiApplicationPrivate::processGestureEvent(QWindowSystemInterfacePrivate::GestureEvent*): error: undefined reference to 'QCoreApplication::notifyInternal2(QObject*, QEvent*)'
.obj/qguiapplication.o:qguiapplication.cpp:function QGuiApplicationPrivate::createPlatformIntegration(): error: undefined reference to 'QString::toLower_helper(QString&)'
.obj/qguiapplication.o:qguiapplication.cpp:function updateBlockedStatusRecursion(QWindow*, bool): error: undefined reference to 'QCoreApplication::notifyInternal2(QObject*, QEvent*)'
.obj/qguiapplication.o:qguiapplication.cpp:function QGuiApplicationPrivate::showModalWindow(QWindow*): error: undefined reference to 'QCoreApplication::notifyInternal2(QObject*, QEvent*)'
.obj/qguiapplication.o:qguiapplication.cpp:function QGuiApplicationPrivate::init(): error: undefined reference to 'QDebug::putByteArray(char const*, unsigned int, QDebug::Latin1Content)'
.obj/qguiapplication.o:qguiapplication.cpp:function QGuiApplicationPrivate::init(): error: undefined reference to 'qEnvironmentVariableIntValue(char const*, bool*)'
.obj/qguiapplication.o:qguiapplication.cpp:function QGuiApplicationPrivate::init(): error: undefined reference to 'QByteArray::toLower_helper(QByteArray&)'
.obj/qguiapplication.o:qguiapplication.cpp:function QGuiApplicationPrivate::init(): error: undefined reference to 'QDebug::putString(QChar const*, unsigned int)'
.obj/qguiapplication.o:qguiapplication.cpp:function QGuiApplicationPrivate::init(): error: undefined reference to 'QString::toLower_helper(QString&)'
.obj/qwindow.o:qwindow.cpp:function operator<<(QDebug, QWindow const*): error: undefined reference to 'qt_QMetaEnum_debugOperator(QDebug&, int, QMetaObject const*, char const*)'
.obj/qwindow.o:qwindow.cpp:function operator<<(QDebug, QWindow const*): error: undefined reference to 'qt_QMetaEnum_debugOperator(QDebug&, int, QMetaObject const*, char const*)'
.obj/qwindow.o:qwindow.cpp:function operator<<(QDebug, QWindow const*): error: undefined reference to 'qt_QMetaEnum_flagDebugOperator(QDebug&, unsigned long long, QMetaObject const*, char const*)'
.obj/qwindow.o:qwindow.cpp:function operator<<(QDebug, QWindow const*): error: undefined reference to 'QDebug::putString(QChar const*, unsigned int)'
.obj/qwindow.o:qwindow.cpp:function QWindowPrivate::create(bool): error: undefined reference to 'qt_QMetaEnum_flagDebugOperator(QDebug&, unsigned long long, QMetaObject const*, char const*)'
.obj/qclipboard.o:qclipboard.cpp:function QClipboard::text(QString&, QClipboard::Mode) const: error: undefined reference to 'QString::operator=(QLatin1String)'
.obj/qcursor.o:qcursor.cpp:function operator<<(QDebug, QCursor const&): error: undefined reference to 'qt_QMetaEnum_debugOperator(QDebug&, int, QMetaObject const*, char const*)'
.obj/qdnd.o:qdnd.cpp:function imageReadMimeFormats(): error: undefined reference to 'QByteArray::toLower_helper(QByteArray const&)'
.obj/qdnd.o:qdnd.cpp:function imageWriteMimeFormats(): error: undefined reference to 'QByteArray::toLower_helper(QByteArray const&)'
.obj/qdnd.o:qdnd.cpp:function QInternalMimeData::renderDataHelper(QString const&, QMimeData const*): error: undefined reference to 'QByteArray::toUpper_helper(QByteArray&)'
.obj/qevent.o:qevent.cpp:function operator<<(QDebug, QEvent const*): error: undefined reference to 'QDebug::putByteArray(char const*, unsigned int, QDebug::Latin1Content)'
.obj/qevent.o:qevent.cpp:function operator<<(QDebug, QEvent const*): error: undefined reference to 'QDebug::putByteArray(char const*, unsigned int, QDebug::Latin1Content)'
.obj/qevent.o:qevent.cpp:function operator<<(QDebug, QEvent const*): error: undefined reference to 'QDebug::putByteArray(char const*, unsigned int, QDebug::Latin1Content)'
.obj/qkeysequence.o:qkeysequence.cpp:function QKeySequencePrivate::decodeString(QString const&, QKeySequence::SequenceFormat): error: undefined reference to 'QString::toLower_helper(QString const&)'
.obj/qkeysequence.o:qkeysequence.cpp:function QKeySequencePrivate::decodeString(QString const&, QKeySequence::SequenceFormat): error: undefined reference to 'QString::toLower_helper(QString const&)'
.obj/qscreen.o:qscreen.cpp:function operator<<(QDebug, QScreen const*): error: undefined reference to 'qt_QMetaEnum_debugOperator(QDebug&, int, QMetaObject const*, char const*)'
.obj/qhighdpiscaling.o:qhighdpiscaling.cpp:function QHighDpiScaling::initHighDpiScaling(): error: undefined reference to 'qEnvironmentVariableIntValue(char const*, bool*)'
.obj/qhighdpiscaling.o:qhighdpiscaling.cpp:function QHighDpiScaling::initHighDpiScaling(): error: undefined reference to 'QByteArray::toLower_helper(QByteArray&)'
.obj/qimage.o:qimage.cpp:function operator<<(QDebug, QImage const&): error: undefined reference to 'QDebug::resetFormat()'
.obj/qimage.o:qimage.cpp:function QImage::text(QString const&) const: error: undefined reference to 'QString::simplified_helper(QString const&)'
.obj/qimagereader.o:qimagereader.cpp:function createReadHandlerHelper(QIODevice*, QByteArray const&, bool, bool): error: undefined reference to 'QByteArray::toLower_helper(QByteArray const&)'
.obj/qimagereader.o:qimagereader.cpp:function QImageReaderPrivate::getText() [clone .part.30]: error: undefined reference to 'QString::simplified_helper(QString const&)'
.obj/qimagereader.o:qimagereader.cpp:function QImageReaderPrivate::getText() [clone .part.30]: error: undefined reference to 'QString::simplified_helper(QString&)'
.obj/qimagereader.o:qimagereader.cpp:function QImageReaderPrivate::initHandler(): error: undefined reference to 'QByteArray::toLower_helper(QByteArray const&)'
.obj/qimagewriter.o:qimagewriter.cpp:function QImageWriter::setText(QString const&, QString const&): error: undefined reference to 'QString::simplified_helper(QString const&)'
.obj/qimagewriter.o:qimagewriter.cpp:function QImageWriter::setText(QString const&, QString const&): error: undefined reference to 'QString::simplified_helper(QString const&)'
.obj/qpixmap.o:qpixmap.cpp:function operator<<(QDebug, QPixmap const&): error: undefined reference to 'QDebug::resetFormat()'
.obj/qicon.o:qicon.cpp:function operator<<(QDebug, QIcon const&): error: undefined reference to 'QDebug::resetFormat()'
.obj/qiconloader.o:qiconloader.cpp:function QIconLoader::findIconHelper(QString const&, QString const&, QStringList&) const: error: undefined reference to 'QString::trimmed_helper(QString const&)'
.obj/qppmhandler.o:qppmhandler.cpp:function QPpmHandler::setOption(QImageIOHandler::ImageOption, QVariant const&): error: undefined reference to 'QByteArray::toLower_helper(QByteArray&)'
.obj/qxbmhandler.o:qxbmhandler.cpp:function read_xbm_header(QIODevice*, int&, int&): error: undefined reference to 'QByteArray::trimmed_helper(QByteArray&)'
.obj/qxbmhandler.o:qxbmhandler.cpp:function read_xbm_header(QIODevice*, int&, int&): error: undefined reference to 'QByteArray::trimmed_helper(QByteArray&)'
.obj/qxpmhandler.o:qxpmhandler.cpp:function read_xpm_body(QIODevice*, char const* const*, int&, QByteArray&, int, int, int, int, QImage&): error: undefined reference to 'QByteArray::simplified_helper(QByteArray&)'
.obj/qxpmhandler.o:qxpmhandler.cpp:function read_xpm_body(QIODevice*, char const* const*, int&, QByteArray&, int, int, int, int, QImage&): error: undefined reference to 'QByteArray::trimmed_helper(QByteArray&)'
.obj/qxpmhandler.o:qxpmhandler.cpp:function read_xpm_body(QIODevice*, char const* const*, int&, QByteArray&, int, int, int, int, QImage&): error: undefined reference to 'QByteArray::toLower_helper(QByteArray&)'
.obj/qxpmhandler.o:qxpmhandler.cpp:function QXpmHandler::write(QImage const&): error: undefined reference to 'QString::asprintf(char const*, ...)'
.obj/qxpmhandler.o:qxpmhandler.cpp:function QXpmHandler::write(QImage const&): error: undefined reference to 'QString::asprintf(char const*, ...)'
.obj/qpnghandler.o:qpnghandler.cpp:function QPNGImageWriter::writeImage(QImage const&, int, QString const&, int, int): error: undefined reference to 'QString::simplified_helper(QString&)'
.obj/qfont.o:qfont.cpp:function QFont::substitute(QString const&): error: undefined reference to 'QString::toLower_helper(QString const&)'
.obj/qfontsubset.o:qfontsubset.cpp:function QFontSubset::toTruetype() const: error: undefined reference to 'QString::operator=(QLatin1String)'
.obj/qfontsubset.o:qfontsubset.cpp:function QFontSubset::toTruetype() const: error: undefined reference to 'QString::operator=(QLatin1String)'
.obj/qfontsubset.o:qfontsubset.cpp:function QFontSubset::toTruetype() const: error: undefined reference to 'QString::operator=(QLatin1String)'
.obj/qfontdatabase.o:qfontdatabase.cpp:function QFontDatabase::load(QFontPrivate const*, int): error: undefined reference to 'QString::trimmed_helper(QString const&)'
.obj/qtextdocument.o:qtextdocument.cpp:function findInBlock(QTextBlock const&, QRegularExpression const&, int, QFlags<QTextDocument::FindFlag>, QTextCursor*): error: undefined reference to 'QString::lastIndexOf(QRegularExpression const&, int, QRegularExpressionMatch*) const'
.obj/qtextdocument.o:qtextdocument.cpp:function findInBlock(QTextBlock const&, QRegularExpression const&, int, QFlags<QTextDocument::FindFlag>, QTextCursor*): error: undefined reference to 'QString::indexOf(QRegularExpression const&, int, QRegularExpressionMatch*) const'
.obj/qtexthtmlparser.o:qtexthtmlparser.cpp:function setWidthAttribute(QTextLength*, QString): error: undefined reference to 'QString::trimmed_helper(QString const&)'
.obj/qtexthtmlparser.o:qtexthtmlparser.cpp:function QTextHtmlParser::parseCloseTag(): error: undefined reference to 'QString::trimmed_helper(QString&)'
.obj/qcssparser.o:qcssparser.cpp:function parseColorValue(QCss::Value): error: undefined reference to 'QString::trimmed_helper(QString const&)'
.obj/qtextodfwriter.o:qtextodfwriter.cpp:function QTextOdfWriter::writeBlockFormat(QXmlStreamWriter&, QTextBlockFormat, int) const: error: undefined reference to 'qt_QMetaEnum_flagDebugOperator(QDebug&, unsigned long long, QMetaObject const*, char const*)'
.obj/qcolor.o:qcolor.cpp:function QColor::name(QColor::NameFormat) const: error: undefined reference to 'QString::asprintf(char const*, ...)'
.obj/qcolor.o:qcolor.cpp:function QColor::name(QColor::NameFormat) const: error: undefined reference to 'QString::asprintf(char const*, ...)'
.obj/qvalidator.o:qvalidator.cpp:function QDoubleValidator::validate(QString&, int&) const: error: undefined reference to 'QLocaleData::validateChars(QString const&, QLocaleData::NumberMode, QByteArray*, int, bool) const'
.obj/qvalidator.o:qvalidator.cpp:function QIntValidator::validate(QString&, int&) const: error: undefined reference to 'QLocaleData::validateChars(QString const&, QLocaleData::NumberMode, QByteArray*, int, bool) const'
.obj/qvalidator.o:qvalidator.cpp:function QIntValidator::fixup(QString&) const: error: undefined reference to 'QLocaleData::validateChars(QString const&, QLocaleData::NumberMode, QByteArray*, int, bool) const'
.obj/qvalidator.o:qvalidator.cpp:function QDoubleValidatorPrivate::validateWithLocale(QString&, QLocaleData::NumberMode, QLocale const&) const: error: undefined reference to 'QLocaleData::validateChars(QString const&, QLocaleData::NumberMode, QByteArray*, int, bool) const'
.obj/qopengl.o:qopengl.cpp:function (anonymous namespace)::VersionTerm::matches(QVersionNumber const&) const: error: undefined reference to 'QVersionNumber::compare(QVersionNumber const&, QVersionNumber const&)'
.obj/qopengl.o:qopengl.cpp:function (anonymous namespace)::VersionTerm::matches(QVersionNumber const&) const: error: undefined reference to 'QVersionNumber::compare(QVersionNumber const&, QVersionNumber const&)'
.obj/qopengl.o:qopengl.cpp:function (anonymous namespace)::VersionTerm::matches(QVersionNumber const&) const: error: undefined reference to 'QVersionNumber::compare(QVersionNumber const&, QVersionNumber const&)'
.obj/qopengl.o:qopengl.cpp:function (anonymous namespace)::VersionTerm::matches(QVersionNumber const&) const: error: undefined reference to 'QVersionNumber::compare(QVersionNumber const&, QVersionNumber const&)'
.obj/qopengl.o:qopengl.cpp:function (anonymous namespace)::VersionTerm::fromJson(QJsonValue const&): error: undefined reference to 'QVersionNumber::fromString(QString const&, int*)'
.obj/qopengl.o:qopengl.cpp:function operator<<(QDebug, QOpenGLConfig::Gpu const&): error: undefined reference to 'operator<<(QDebug, QVersionNumber const&)'
.obj/qopengl.o:qopengl.cpp:function QOpenGLConfig::gpuFeatures(QOpenGLConfig::Gpu const&, QJsonDocument const&): error: undefined reference to 'QSysInfo::kernelVersion()'
.obj/qopengl.o:qopengl.cpp:function QOpenGLConfig::gpuFeatures(QOpenGLConfig::Gpu const&, QJsonDocument const&): error: undefined reference to 'QVersionNumber::fromString(QString const&, int*)'
.obj/qopengl.o:qopengl.cpp:function QOpenGLConfig::gpuFeatures(QOpenGLConfig::Gpu const&, QString const&): error: undefined reference to 'QSysInfo::kernelVersion()'
.obj/qopengl.o:qopengl.cpp:function QOpenGLConfig::gpuFeatures(QOpenGLConfig::Gpu const&, QString const&): error: undefined reference to 'QVersionNumber::fromString(QString const&, int*)'
collect2: error: ld returned 1 exit status
Makefile:1205: recipe for target '../../lib/libQt5Gui.so.5.6.0' failed
make[2]: *** [../../lib/libQt5Gui.so.5.6.0] Error 1
make[2]: Leaving directory '/home/james/raspi/qtbase/src/gui'
Makefile:497: recipe for target 'sub-gui-make_first' failed
make[1]: *** [sub-gui-make_first] Error 2
make[1]: Leaving directory '/home/james/raspi/qtbase/src'
Makefile:45: recipe for target 'sub-src-make_first' failed
make: *** [sub-src-make_first] Error 2
I've tried adding a -no-warnings-are-errors flag during ./configure, as well as cross compiling from the 5.5 (release) QT branch. The 5.5 branch breaks on the configure step.
Is there somewhere I can link/specify sources/add headers?
Seems like a qt5-default package on my raspbian image was causing the problem. Coming from a clean slate or doing sudo apt-get remove qt5-default solved the problem.
Seems like a qt5-default package on my raspbian image was causing the
problem.
Just in case it helps someone else, removing qt5-default on the PI and re-running the rsync commands isn't sufficient. I had to remove the sysroot directory and re-run the rsync commands to get Qt to compile.
I don't know if it was necessary but I also purged all of the qt5 packages from the Pi.
Just removing qt5-default was not enough.
I had to remove any references to pre-installed qt5 libraries to make the build succeed.
From a previous attempt to cross-compile, following someone else's recipe, I had a libqt5core5 installed which depended on a bunch of additional qt5 libs.
Once libqt5core5 was removed the linking process succeeded.
Of course, this also required to recreate the sysroot folder as the libraries on the Pi had changed.
I have some problem with compile correct application in fresh-installed Clion IDE. Earlier I used Code::Blocks and all compiling successfully. Project use pthread and Crypto++ library. I'm already have them installed on my Ubuntu 15.04. And compile Clion project with -pthread flag. But it can't find crypto++ library. How to fix this?
My CMake file:
cmake_minimum_required(VERSION 3.3)
project(Chat)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -pthread")
set(SOURCE_FILES
include/Chat.h
include/Checker.h
include/Client.h
include/DataTransferingInterface.h
include/EncryptorDES.h
include/EncryptorRSA.h
include/Logger.h
include/OwnerClientInterface.h
include/OwnerServerInterface.h
include/Parser.h
include/SecureChat.h
include/Server.h
src/Chat.cpp
src/Checker.cpp
src/Client.cpp
src/DataTransferingInterface.cpp
src/EncryptorDES.cpp
src/EncryptorRSA.cpp
src/Logger.cpp
src/OwnerClientInterface.cpp
src/OwnerServerInterface.cpp
src/Parser.cpp
src/SecureChat.cpp
src/Server.cpp
main.cpp)
add_executable(Chat ${SOURCE_FILES})
Compile errors:
/usr/include/cryptopp/integer.h:26: undefined reference to `vtable for CryptoPP::Integer'
CMakeFiles/Chat.dir/src/EncryptorRSA.cpp.o: In function `CryptoPP::AbstractRing<CryptoPP::Integer>::MultiplicativeGroupT::~MultiplicativeGroupT()':
/usr/include/cryptopp/algebra.h:70: undefined reference to `vtable for CryptoPP::AbstractRing<CryptoPP::Integer>::MultiplicativeGroupT'
/usr/include/cryptopp/algebra.h:70: undefined reference to `CryptoPP::AbstractGroup<CryptoPP::Integer>::~AbstractGroup()'
CMakeFiles/Chat.dir/src/EncryptorRSA.cpp.o: In function `CryptoPP::FileStore::~FileStore()':
/usr/include/cryptopp/files.h:14: undefined reference to `vtable for CryptoPP::FileStore'
/usr/include/cryptopp/files.h:14: undefined reference to `vtable for CryptoPP::FileStore'
CMakeFiles/Chat.dir/src/EncryptorRSA.cpp.o: In function `CryptoPP::FileSink::~FileSink()':
/usr/include/cryptopp/files.h:77: undefined reference to `vtable for CryptoPP::FileSink'
/usr/include/cryptopp/files.h:77: undefined reference to `vtable for CryptoPP::FileSink'
CMakeFiles/Chat.dir/src/EncryptorRSA.cpp.o: In function `CryptoPP::HMAC_Base::~HMAC_Base()':
/usr/include/cryptopp/hmac.h:12: undefined reference to `vtable for CryptoPP::HMAC_Base'
/usr/include/cryptopp/hmac.h:12: undefined reference to `vtable for CryptoPP::HMAC_Base'
CMakeFiles/Chat.dir/src/EncryptorRSA.cpp.o: In function `CryptoPP::AlgorithmParametersTemplate<char const*>::AssignValue(char const*, std::type_info const&, void*) const':
/usr/include/cryptopp/algparam.h:313: undefined reference to `CryptoPP::g_pAssignIntToInteger'
/usr/include/cryptopp/algparam.h:313: undefined reference to `CryptoPP::g_pAssignIntToInteger'
CMakeFiles/Chat.dir/src/EncryptorRSA.cpp.o: In function `CryptoPP::DL_EncryptorBase<CryptoPP::ECPPoint>::Encrypt(CryptoPP::RandomNumberGenerator&, unsigned char const*, unsigned long, unsigned char*, CryptoPP::NameValuePairs const&) const':
/usr/include/cryptopp/integer.h:118: undefined reference to `CryptoPP::Integer::One()'
/usr/include/cryptopp/integer.h:118: undefined reference to `CryptoPP::Integer::Zero()'
CMakeFiles/Chat.dir/src/EncryptorRSA.cpp.o: In function `CryptoPP::DL_EncryptorBase<CryptoPP::ECPPoint>::Encrypt(CryptoPP::RandomNumberGenerator&, unsigned char const*, unsigned long, unsigned char*, CryptoPP::NameValuePairs const&) const':
/usr/include/cryptopp/pubkey.h:1228: undefined reference to `CryptoPP::Integer::One()'
/usr/include/cryptopp/pubkey.h:1228: undefined reference to `CryptoPP::Integer::Integer(CryptoPP::RandomNumberGenerator&, CryptoPP::Integer const&, CryptoPP::Integer const&, CryptoPP::Integer::RandomNumberType, CryptoPP::Integer const&, CryptoPP::Integer const&)'
CMakeFiles/Chat.dir/src/EncryptorRSA.cpp.o: In function `CryptoPP::SourceTemplate<CryptoPP::FileStore>::Pump2(unsigned long long&, bool)':
/usr/include/cryptopp/filters.h:763: undefined reference to `CryptoPP::DEFAULT_CHANNEL'
/usr/include/cryptopp/filters.h:763: undefined reference to `CryptoPP::FileStore::TransferTo2(CryptoPP::BufferedTransformation&, unsigned long long&, std::string const&, bool)'
CMakeFiles/Chat.dir/src/EncryptorRSA.cpp.o: In function `CryptoPP::SourceTemplate<CryptoPP::FileStore>::PumpMessages2(unsigned int&, bool)':
/usr/include/cryptopp/filters.h:765: undefined reference to `CryptoPP::DEFAULT_CHANNEL'
/usr/include/cryptopp/filters.h:765: undefined reference to `CryptoPP::BufferedTransformation::TransferMessagesTo2(CryptoPP::BufferedTransformation&, unsigned int&, std::string const&, bool)'
CMakeFiles/Chat.dir/src/EncryptorRSA.cpp.o: In function `CryptoPP::SourceTemplate<CryptoPP::FileStore>::PumpAll2(bool)':
/usr/include/cryptopp/filters.h:767: undefined reference to `CryptoPP::DEFAULT_CHANNEL'
/usr/include/cryptopp/filters.h:767: undefined reference to `CryptoPP::BufferedTransformation::TransferAllTo2(CryptoPP::BufferedTransformation&, std::string const&, bool)'
CMakeFiles/Chat.dir/src/EncryptorRSA.cpp.o: In function `CryptoPP::SourceTemplate<CryptoPP::FileStore>::SourceExhausted() const':
/usr/include/cryptopp/filters.h:769: undefined reference to `CryptoPP::BufferedTransformation::AnyRetrievable() const'
/usr/include/cryptopp/filters.h:769: undefined reference to `CryptoPP::BufferedTransformation::AnyMessages() const'
CMakeFiles/Chat.dir/src/EncryptorRSA.cpp.o: In function `CryptoPP::DL_EncryptionAlgorithm_Xor<CryptoPP::HMAC<CryptoPP::SHA1>, false>::SymmetricEncrypt(CryptoPP::RandomNumberGenerator&, unsigned char const*, unsigned char const*, unsigned long, unsigned char*, CryptoPP::NameValuePairs const&) const':
/usr/include/cryptopp/gfpcrypt.h:439: undefined reference to `CryptoPP::xorbuf(unsigned char*, unsigned char const*, unsigned char const*, unsigned long)'
/usr/include/cryptopp/gfpcrypt.h:441: undefined reference to `CryptoPP::HMAC_Base::Update(unsigned char const*, unsigned long)'
/usr/include/cryptopp/gfpcrypt.h:442: undefined reference to `CryptoPP::HMAC_Base::Update(unsigned char const*, unsigned long)'
CMakeFiles/Chat.dir/src/EncryptorRSA.cpp.o: In function `CryptoPP::DL_EncryptionAlgorithm_Xor<CryptoPP::HMAC<CryptoPP::SHA1>, false>::SymmetricDecrypt(unsigned char const*, unsigned char const*, unsigned long, unsigned char*, CryptoPP::NameValuePairs const&) const':
/usr/include/cryptopp/gfpcrypt.h:470: undefined reference to `CryptoPP::HMAC_Base::Update(unsigned char const*, unsigned long)'
/usr/include/cryptopp/gfpcrypt.h:471: undefined reference to `CryptoPP::HMAC_Base::Update(unsigned char const*, unsigned long)'
/usr/include/cryptopp/gfpcrypt.h:481: undefined reference to `CryptoPP::xorbuf(unsigned char*, unsigned char const*, unsigned char const*, unsigned long)'
CMakeFiles/Chat.dir/src/EncryptorRSA.cpp.o: In function `CryptoPP::DL_KeyAgreementAlgorithm_DH<CryptoPP::ECPPoint, CryptoPP::EnumToType<CryptoPP::CofactorMultiplicationOption, 0> >::AgreeWithEphemeralPrivateKey(CryptoPP::DL_GroupParameters<CryptoPP::ECPPoint> const&, CryptoPP::DL_FixedBasePrecomputation<CryptoPP::ECPPoint> const&, CryptoPP::Integer const&) const':
/usr/include/cryptopp/pubkey.h:1445: undefined reference to `CryptoPP::Integer::Integer(CryptoPP::Integer const&)'
CMakeFiles/Chat.dir/src/EncryptorRSA.cpp.o: In function `CryptoPP::DL_KeyAgreementAlgorithm_DH<CryptoPP::ECPPoint, CryptoPP::EnumToType<CryptoPP::CofactorMultiplicationOption, 0> >::AgreeWithStaticPrivateKey(CryptoPP::DL_GroupParameters<CryptoPP::ECPPoint> const&, CryptoPP::ECPPoint const&, bool, CryptoPP::Integer const&) const':
/usr/include/cryptopp/pubkey.h:1473: undefined reference to `CryptoPP::Integer::Integer(CryptoPP::Integer const&)'
/usr/include/cryptopp/pubkey.h:1473: undefined reference to `CryptoPP::Integer::Integer(CryptoPP::Integer const&)'
CMakeFiles/Chat.dir/src/EncryptorRSA.cpp.o: In function `CryptoPP::HMAC<CryptoPP::SHA1>::HMAC(unsigned char const*, unsigned long)':
/usr/include/cryptopp/hmac.h:48: undefined reference to `CryptoPP::g_nullNameValuePairs'
/usr/include/cryptopp/hmac.h:48: undefined reference to `CryptoPP::SimpleKeyingInterface::SetKey(unsigned char const*, unsigned long, CryptoPP::NameValuePairs const&)'
CMakeFiles/Chat.dir/src/EncryptorRSA.cpp.o: In function `CryptoPP::P1363_KDF2<CryptoPP::SHA1>::DeriveKey(unsigned char*, unsigned long, unsigned char const*, unsigned long, unsigned char const*, unsigned long)':
/usr/include/cryptopp/pubkey.h:506: undefined reference to `CryptoPP::P1363_MGF1KDF2_Common(CryptoPP::HashTransformation&, unsigned char*, unsigned long, unsigned char const*, unsigned long, unsigned char const*, unsigned long, bool, unsigned int)'
CMakeFiles/Chat.dir/src/EncryptorRSA.cpp.o: In function `CryptoPP::IteratedHashWithStaticTransform<unsigned int, CryptoPP::EnumToType<CryptoPP::ByteOrder, 1>, 64u, 20u, CryptoPP::SHA1, 0u, false>::Init()':
/usr/include/cryptopp/iterhash.h:90: undefined reference to `CryptoPP::SHA1::InitState(unsigned int*)'
CMakeFiles/Chat.dir/src/EncryptorRSA.cpp.o:(.rodata._ZTIN8CryptoPP16IteratedHashBaseIjNS_18HashTransformationEEE[_ZTIN8CryptoPP16IteratedHashBaseIjNS_18HashTransformationEEE]+0x10): undefined reference to `typeinfo for CryptoPP::HashTransformation'
CMakeFiles/Chat.dir/src/EncryptorRSA.cpp.o:(.rodata._ZTIN8CryptoPP25SimpleKeyingInterfaceImplINS_9HMAC_BaseENS_4HMACINS_4SHA1EEEEE[_ZTIN8CryptoPP25SimpleKeyingInterfaceImplINS_9HMAC_BaseENS_4HMACINS_4SHA1EEEEE]+0x10): undefined reference to `typeinfo for CryptoPP::HMAC_Base'
CMakeFiles/Chat.dir/src/EncryptorRSA.cpp.o: In function `CryptoPP::HashTransformation::HashTransformation(CryptoPP::HashTransformation const&)':
/usr/include/cryptopp/cryptlib.h:531: undefined reference to `vtable for CryptoPP::HashTransformation'
CMakeFiles/Chat.dir/src/EncryptorRSA.cpp.o: In function `CryptoPP::IteratedHashWithStaticTransform<unsigned int, CryptoPP::EnumToType<CryptoPP::ByteOrder, 1>, 64u, 20u, CryptoPP::SHA1, 0u, false>::HashEndianCorrectedBlock(unsigned int const*)':
/usr/include/cryptopp/iterhash.h:89: undefined reference to `CryptoPP::SHA1::Transform(unsigned int*, unsigned int const*)'
collect2: error: ld returned 1 exit status
CMakeFiles/Chat.dir/build.make:406: recipe for target 'Chat' failed
make[2]: *** [Chat] Error 1
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/Chat.dir/all' failed
make[1]: *** [CMakeFiles/Chat.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2
I performed the following after add_executable in my CMakeLists.txt to resolve the issue:
target_link_libraries(Chat /usr/lib/libcrypto++.a)