hasu / notdeft

NotDeft note manager for Emacs
https://tero.hasu.is/notdeft/
170 stars 14 forks source link

Failing to compile notdeft-xapian on Ubuntu 18.04 #5

Closed anthrolisp closed 4 years ago

anthrolisp commented 5 years ago

Failing to compile notdeft-xapian on Ubuntu 18.04. TCLAP is installed. Error produced below. Many thanks in advance!

notdeft/xapian$ make g++ -o notdeft-xapian -std=c++11 -Wall pkg-config --cflags --libs tclap xapian-config --cxxflags --libs notdeft-xapian.cc /usr/bin/ld: /tmp/cckUXbuT.o: in function doIndex(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> > > >)::{lambda(std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, long> const&)#1}::operator()(std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, long> const&) const': notdeft-xapian.cc:(.text+0x18ab): undefined reference toXapian::Document::Document()' /usr/bin/ld: notdeft-xapian.cc:(.text+0x18c4): undefined reference to Xapian::Document::set_data(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)' /usr/bin/ld: notdeft-xapian.cc:(.text+0x18fc): undefined reference toXapian::Document::add_value(unsigned int, std::cxx11::basic_string<char, std::char_traits, std::allocator > const&)' /usr/bin/ld: notdeft-xapian.cc:(.text+0x193f): undefined reference to Xapian::Document::add_value(unsigned int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)' /usr/bin/ld: notdeft-xapian.cc:(.text+0x195b): undefined reference toXapian::TermGenerator::set_document(Xapian::Document const&)' /usr/bin/ld: notdeft-xapian.cc:(.text+0x1cbf): undefined reference to Xapian::TermGenerator::increase_termpos(unsigned int)' /usr/bin/ld: notdeft-xapian.cc:(.text+0x1f0f): undefined reference toXapian::TermGenerator::increase_termpos(unsigned int)' /usr/bin/ld: notdeft-xapian.cc:(.text+0x2151): undefined reference to Xapian::TermGenerator::increase_termpos(unsigned int)' /usr/bin/ld: notdeft-xapian.cc:(.text+0x2405): undefined reference toXapian::Document::~Document()' /usr/bin/ld: /tmp/cckUXbuT.o: in function doIndex(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> > > >)::{lambda(std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, long> const&)#2}::operator()(std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, long> const&) const': notdeft-xapian.cc:(.text+0x24d6): undefined reference toXapian::WritableDatabase::add_document(Xapian::Document const&)' /usr/bin/ld: notdeft-xapian.cc:(.text+0x24e2): undefined reference to Xapian::Document::~Document()' /usr/bin/ld: notdeft-xapian.cc:(.text+0x2503): undefined reference toXapian::Document::~Document()' /usr/bin/ld: /tmp/cckUXbuT.o: in function `doIndex(std::vector<std::cxx11::basic_string<char, std::char_traits, std::allocator >, std::allocator<std::cxx11::basic_string<char, std::char_traits, std::allocator > > >)::{lambda(std::pair<std::cxx11::basic_string<char, std::char_traits, std::allocator >, long> const&, unsigned int)#3}::operator()(std::pair<std::cxx11::basic_string<char, std::char_traits, std::allocator >, long> const&, unsigned int) const': notdeft-xapian.cc:(.text+0x25b9): undefined reference to Xapian::WritableDatabase::replace_document(unsigned int, Xapian::Document const&)' /usr/bin/ld: notdeft-xapian.cc:(.text+0x25c5): undefined reference toXapian::Document::~Document()' /usr/bin/ld: notdeft-xapian.cc:(.text+0x25e6): undefined reference to Xapian::Document::~Document()' /usr/bin/ld: /tmp/cckUXbuT.o: in functiondoIndex(std::vector<std::cxx11::basic_string<char, std::char_traits, std::allocator >, std::allocator<std::cxx11::basic_string<char, std::char_traits, std::allocator > > >)::{lambda(std::pair<std::cxx11::basic_string<char, std::char_traits, std::allocator >, long> const&)#4}::operator()(std::pair<std::cxx11::basic_string<char, std::char_traits, std::allocator >, long> const&) const': notdeft-xapian.cc:(.text+0x2687): undefined reference to Xapian::WritableDatabase::delete_document(unsigned int)' /usr/bin/ld: /tmp/cckUXbuT.o: in functiondoIndex(std::vector<std::cxx11::basic_string<char, std::char_traits, std::allocator >, std::allocator<std::cxx11::basic_string<char, std::char_traits, std::allocator > > >)': notdeft-xapian.cc:(.text+0x3844): undefined reference to Xapian::TermGenerator::TermGenerator()' /usr/bin/ld: notdeft-xapian.cc:(.text+0x3868): undefined reference toXapian::Stem::Stem(std::cxx11::basic_string<char, std::char_traits, std::allocator > const&)' /usr/bin/ld: notdeft-xapian.cc:(.text+0x3881): undefined reference to Xapian::TermGenerator::set_stemmer(Xapian::Stem const&)' /usr/bin/ld: notdeft-xapian.cc:(.text+0x3a78): undefined reference toXapian::WritableDatabase::WritableDatabase(std::cxx11::basic_string<char, std::char_traits, std::allocator > const&, int, int)' /usr/bin/ld: notdeft-xapian.cc:(.text+0x3c67): undefined reference to Xapian::WritableDatabase::begin_transaction(bool)' /usr/bin/ld: notdeft-xapian.cc:(.text+0x3cb3): undefined reference toXapian::Database::postlist_begin(std::cxx11::basic_string<char, std::char_traits, std::allocator > const&) const' /usr/bin/ld: notdeft-xapian.cc:(.text+0x3d7c): undefined reference to Xapian::PostingIterator::operator*() const' /usr/bin/ld: notdeft-xapian.cc:(.text+0x3da1): undefined reference toXapian::Database::get_document(unsigned int) const' /usr/bin/ld: notdeft-xapian.cc:(.text+0x3dba): undefined reference to Xapian::Document::get_data[abi:cxx11]() const' /usr/bin/ld: notdeft-xapian.cc:(.text+0x3dd8): undefined reference toXapian::Document::get_value[abi:cxx11](unsigned int) const' /usr/bin/ld: notdeft-xapian.cc:(.text+0x3e65): undefined reference to Xapian::Document::~Document()' /usr/bin/ld: notdeft-xapian.cc:(.text+0x3e74): undefined reference toXapian::PostingIterator::operator++()' /usr/bin/ld: notdeft-xapian.cc:(.text+0x43d5): undefined reference to Xapian::WritableDatabase::commit_transaction()' /usr/bin/ld: notdeft-xapian.cc:(.text+0x4420): undefined reference toXapian::WritableDatabase::~WritableDatabase()' /usr/bin/ld: notdeft-xapian.cc:(.text+0x4470): undefined reference to Xapian::Stem::~Stem()' /usr/bin/ld: notdeft-xapian.cc:(.text+0x447f): undefined reference toXapian::TermGenerator::~TermGenerator()' /usr/bin/ld: notdeft-xapian.cc:(.text+0x4ba1): undefined reference to Xapian::Document::~Document()' /usr/bin/ld: notdeft-xapian.cc:(.text+0x4cdb): undefined reference toXapian::WritableDatabase::~WritableDatabase()' /usr/bin/ld: notdeft-xapian.cc:(.text+0x4d4b): undefined reference to Xapian::Stem::~Stem()' /usr/bin/ld: notdeft-xapian.cc:(.text+0x4d62): undefined reference toXapian::TermGenerator::~TermGenerator()' /usr/bin/ld: notdeft-xapian.cc:(.text+0x4da0): undefined reference to Xapian::Error::get_description[abi:cxx11]() const' /usr/bin/ld: /tmp/cckUXbuT.o: in functiondoSearch(std::vector<std::cxx11::basic_string<char, std::char_traits, std::allocator >, std::allocator<std::cxx11::basic_string<char, std::char_traits, std::allocator > > >)': notdeft-xapian.cc:(.text+0x5c64): undefined reference to Xapian::Database::Database()' /usr/bin/ld: notdeft-xapian.cc:(.text+0x5dbf): undefined reference toXapian::Database::Database(std::cxx11::basic_string<char, std::char_traits, std::allocator > const&, int)' /usr/bin/ld: notdeft-xapian.cc:(.text+0x5dd8): undefined reference to Xapian::Database::add_database(Xapian::Database const&)' /usr/bin/ld: notdeft-xapian.cc:(.text+0x5dee): undefined reference toXapian::Database::~Database()' /usr/bin/ld: notdeft-xapian.cc:(.text+0x5e52): undefined reference to Xapian::Enquire::Enquire(Xapian::Database const&)' /usr/bin/ld: notdeft-xapian.cc:(.text+0x5e74): undefined reference toXapian::Enquire::set_sort_by_value(unsigned int, bool)' /usr/bin/ld: notdeft-xapian.cc:(.text+0x5e98): undefined reference to Xapian::Enquire::set_sort_by_value(unsigned int, bool)' /usr/bin/ld: notdeft-xapian.cc:(.text+0x5ea7): undefined reference toXapian::QueryParser::QueryParser()' /usr/bin/ld: notdeft-xapian.cc:(.text+0x5f1f): undefined reference to `Xapian::QueryParser::add_prefix(std::cxx11::basic_string<char, std::char_traits, std::allocator > const&, std::cxx11::basic_string<char, std::char_traits, std::allocator > const&)' /usr/bin/ld: notdeft-xapian.cc:(.text+0x5fd3): undefined reference to Xapian::QueryParser::add_prefix(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)' /usr/bin/ld: notdeft-xapian.cc:(.text+0x6087): undefined reference toXapian::QueryParser::add_prefix(std::cxx11::basic_string<char, std::char_traits, std::allocator > const&, std::cxx11::basic_string<char, std::char_traits, std::allocator > const&)' /usr/bin/ld: notdeft-xapian.cc:(.text+0x613b): undefined reference to Xapian::QueryParser::add_prefix(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)' /usr/bin/ld: notdeft-xapian.cc:(.text+0x619b): undefined reference toXapian::Stem::Stem(std::cxx11::basic_string<char, std::char_traits, std::allocator > const&)' /usr/bin/ld: notdeft-xapian.cc:(.text+0x61da): undefined reference to Xapian::Query::MatchAll' /usr/bin/ld: notdeft-xapian.cc:(.text+0x6200): undefined reference toXapian::QueryParser::set_stemmer(Xapian::Stem const&)' /usr/bin/ld: notdeft-xapian.cc:(.text+0x6219): undefined reference to Xapian::QueryParser::set_database(Xapian::Database const&)' /usr/bin/ld: notdeft-xapian.cc:(.text+0x622d): undefined reference toXapian::QueryParser::set_stemming_strategy(Xapian::QueryParser::stem_strategy)' /usr/bin/ld: notdeft-xapian.cc:(.text+0x62c2): undefined reference to `Xapian::QueryParser::parse_query(std::cxx11::basic_string<char, std::char_traits, std::allocator > const&, unsigned int, std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&)' /usr/bin/ld: notdeft-xapian.cc:(.text+0x6331): undefined reference to Xapian::Query::get_description[abi:cxx11]() const' /usr/bin/ld: notdeft-xapian.cc:(.text+0x6385): undefined reference toXapian::Enquire::set_query(Xapian::Query const&, unsigned int)' /usr/bin/ld: notdeft-xapian.cc:(.text+0x639d): undefined reference to Xapian::Database::get_doccount() const' /usr/bin/ld: notdeft-xapian.cc:(.text+0x63e0): undefined reference toXapian::Enquire::get_mset(unsigned int, unsigned int, unsigned int, Xapian::RSet const, Xapian::MatchDecider const) const' /usr/bin/ld: notdeft-xapian.cc:(.text+0x6463): undefined reference to Xapian::MSetIterator::get_document() const' /usr/bin/ld: notdeft-xapian.cc:(.text+0x647c): undefined reference toXapian::Document::get_data[abi:cxx11]() const' /usr/bin/ld: notdeft-xapian.cc:(.text+0x64c5): undefined reference to Xapian::Document::~Document()' /usr/bin/ld: notdeft-xapian.cc:(.text+0x64f7): undefined reference toXapian::MSet::~MSet()' /usr/bin/ld: notdeft-xapian.cc:(.text+0x6515): undefined reference to Xapian::Stem::~Stem()' /usr/bin/ld: notdeft-xapian.cc:(.text+0x6524): undefined reference toXapian::QueryParser::~QueryParser()' /usr/bin/ld: notdeft-xapian.cc:(.text+0x6533): undefined reference to Xapian::Enquire::~Enquire()' /usr/bin/ld: notdeft-xapian.cc:(.text+0x656b): undefined reference toXapian::Database::~Database()' /usr/bin/ld: notdeft-xapian.cc:(.text+0x6b65): undefined reference to Xapian::Database::~Database()' /usr/bin/ld: notdeft-xapian.cc:(.text+0x6d71): undefined reference toXapian::Document::~Document()' /usr/bin/ld: notdeft-xapian.cc:(.text+0x6d9f): undefined reference to Xapian::MSet::~MSet()' /usr/bin/ld: notdeft-xapian.cc:(.text+0x6dc5): undefined reference toXapian::Stem::~Stem()' /usr/bin/ld: notdeft-xapian.cc:(.text+0x6ddc): undefined reference to Xapian::QueryParser::~QueryParser()' /usr/bin/ld: notdeft-xapian.cc:(.text+0x6df3): undefined reference toXapian::Enquire::~Enquire()' /usr/bin/ld: notdeft-xapian.cc:(.text+0x6e21): undefined reference to Xapian::Database::~Database()' /usr/bin/ld: notdeft-xapian.cc:(.text+0x6e5f): undefined reference toXapian::Error::get_description[abi:cxx11]() const' /usr/bin/ld: /tmp/cckUXbuT.o: in function `doDump(std::vector<std::cxx11::basic_string<char, std::char_traits, std::allocator >, std::allocator<std::cxx11::basic_string<char, std::char_traits, std::allocator > > >)': notdeft-xapian.cc:(.text+0x7361): undefined reference to `Xapian::Database::Database(std::cxx11::basic_string<char, std::char_traits, std::allocator > const&, int)' /usr/bin/ld: notdeft-xapian.cc:(.text+0x7390): undefined reference to Xapian::Database::metadata_keys_begin(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const' /usr/bin/ld: notdeft-xapian.cc:(.text+0x7428): undefined reference toXapian::TermIterator::operator[abi:cxx11]() const' /usr/bin/ld: notdeft-xapian.cc:(.text+0x7448): undefined reference to Xapian::Database::get_metadata(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const' /usr/bin/ld: notdeft-xapian.cc:(.text+0x7537): undefined reference toXapian::Database::allterms_begin(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&) const' /usr/bin/ld: notdeft-xapian.cc:(.text+0x75e5): undefined reference to `Xapian::TermIterator::operator[abi:cxx11]() const' /usr/bin/ld: notdeft-xapian.cc:(.text+0x766b): undefined reference to Xapian::Database::~Database()' /usr/bin/ld: notdeft-xapian.cc:(.text+0x7890): undefined reference toXapian::Database::~Database()' /usr/bin/ld: notdeft-xapian.cc:(.text+0x7917): undefined reference to Xapian::Error::get_description[abi:cxx11]() const' /usr/bin/ld: /tmp/cckUXbuT.o: in functionXapian::PostingIterator::~PostingIterator()': notdeft-xapian.cc:(.text._ZN6Xapian15PostingIteratorD2Ev[_ZN6Xapian15PostingIteratorD5Ev]+0x20): undefined reference to Xapian::PostingIterator::decref()' /usr/bin/ld: /tmp/cckUXbuT.o: in functionXapian::TermIterator::~TermIterator()': notdeft-xapian.cc:(.text._ZN6Xapian12TermIteratorD2Ev[_ZN6Xapian12TermIteratorD5Ev]+0x20): undefined reference to Xapian::TermIterator::decref()' /usr/bin/ld: /tmp/cckUXbuT.o: in functionXapian::TermIterator::operator++abi:cxx11': notdeft-xapian.cc:(.text._ZN6Xapian12TermIteratorppB5cxx11Ei[_ZN6Xapian12TermIteratorppB5cxx11Ei]+0x32): undefined reference to Xapian::TermIterator::operator*[abi:cxx11]() const' /usr/bin/ld: notdeft-xapian.cc:(.text._ZN6Xapian12TermIteratorppB5cxx11Ei[_ZN6Xapian12TermIteratorppB5cxx11Ei]+0x46): undefined reference toXapian::TermIterator::operator++()' /usr/bin/ld: /tmp/cckUXbuT.o: in function Xapian::TermGenerator::index_text(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, unsigned int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)': notdeft-xapian.cc:(.text._ZN6Xapian13TermGenerator10index_textERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEjS8_[_ZN6Xapian13TermGenerator10index_textERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEjS8_]+0x4c): undefined reference toXapian::TermGenerator::index_text(Xapian::Utf8Iterator const&, unsigned int, std::cxx11::basic_string<char, std::char_traits, std::allocator > const&)' /usr/bin/ld: /tmp/cckUXbuT.o: in function `Xapian::TermGenerator::index_text_without_positions(std::cxx11::basic_string<char, std::char_traits, std::allocator > const&, unsigned int, std::cxx11::basic_string<char, std::char_traits, std::allocator > const&)': notdeft-xapian.cc:(.text._ZN6Xapian13TermGenerator28index_text_without_positionsERKNSt7__cxx1112basic_stringIcSt11chartraitsIcESaIcEEEjS8[_ZN6Xapian13TermGenerator28index_text_without_positionsERKNSt7cxx1112basic_stringIcSt11chartraitsIcESaIcEEEjS8]+0x4c): undefined reference to Xapian::TermGenerator::index_text_without_positions(Xapian::Utf8Iterator const&, unsigned int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)' /usr/bin/ld: /tmp/cckUXbuT.o: in functionXapian::MSetIterator::MSetIterator(Xapian::MSet const&, unsigned int)': notdeft-xapian.cc:(.text._ZN6Xapian12MSetIteratorC2ERKNS_4MSetEj[_ZN6Xapian12MSetIteratorC5ERKNS_4MSetEj]+0x22): undefined reference to Xapian::MSet::MSet(Xapian::MSet const&)' /usr/bin/ld: /tmp/cckUXbuT.o: in functionXapian::MSetIterator::~MSetIterator()': notdeft-xapian.cc:(.text._ZN6Xapian12MSetIteratorD2Ev[_ZN6Xapian12MSetIteratorD5Ev]+0x14): undefined reference to Xapian::MSet::~MSet()' /usr/bin/ld: /tmp/cckUXbuT.o: in functionXapian::MSet::begin() const': notdeft-xapian.cc:(.text._ZNK6Xapian4MSet5beginEv[_ZNK6Xapian4MSet5beginEv]+0x18): undefined reference to `Xapian::MSet::size() const' collect2: error: ld returned 1 exit status make: *** [Makefile:10: notdeft-xapian] Error 1

hasu commented 5 years ago

It still looks like notdeft-xapian.cc is compiling, and there is also no complaint about TCLAP, but for some reason linking against libxapian fails. You might be better off asking some Ubuntu chatroom for suggestions, as so far only Ubuntu users are reporting this problem.

But there are things to try to find out more.

Most importantly, check the output of xapian-config --cxxflags --libs and confirm that the .so file is actually present.

If so, try compiling with different options, and in smaller steps. For example: g++ -c -Wall pkg-config --cflags tclap xapian-config --cxxflags .cc g++ pkg-config --libs tclap xapian-config --libs .o

Or more verbosely g++ -v -Wl,-v pkg-config --libs tclap xapian-config --libs *.o

If you can't find a way to link against Ubuntu's Xapian binaries, the good news is that Xapian doesn't have many dependencies, so it's probably not too difficult to build it yourself, so that you then know what you have, and that it's ABI compatible. Just remember then to tell g++ to link notdeft-xapian.o against your build of the library.

anthrolisp commented 5 years ago

Thanks for getting back to me!

Here are the outputs.

Most importantly, check the output of xapian-config --cxxflags --libs and confirm that the .so file is actually present.

-L/usr/lib/x86_64-linux-gnu -lxapian

notdeft-xapian.o is present

g++ -c -Wall pkg-config --cflags tclap xapian-config --cxxflags *.cc

no output. looks like it compiles successfully

g++ pkg-config --libs tclap xapian-config --libs *.o

/usr/bin/ld: notdeft-xapian.o: in function doIndex(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> > > >)::{lambda(std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, long> const&)#1}::operator()(std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, long> const&) const': notdeft-xapian.cc:(.text+0x18ab): undefined reference toXapian::Document::Document()' /usr/bin/ld: notdeft-xapian.cc:(.text+0x18c4): undefined reference to Xapian::Document::set_data(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)' /usr/bin/ld: notdeft-xapian.cc:(.text+0x18fc): undefined reference toXapian::Document::add_value(unsigned int, std::cxx11::basic_string<char, std::char_traits, std::allocator > const&)' /usr/bin/ld: notdeft-xapian.cc:(.text+0x193f): undefined reference to Xapian::Document::add_value(unsigned int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)' /usr/bin/ld: notdeft-xapian.cc:(.text+0x195b): undefined reference toXapian::TermGenerator::set_document(Xapian::Document const&)' /usr/bin/ld: notdeft-xapian.cc:(.text+0x1cbf): undefined reference to Xapian::TermGenerator::increase_termpos(unsigned int)' /usr/bin/ld: notdeft-xapian.cc:(.text+0x1f0f): undefined reference toXapian::TermGenerator::increase_termpos(unsigned int)' /usr/bin/ld: notdeft-xapian.cc:(.text+0x2151): undefined reference to Xapian::TermGenerator::increase_termpos(unsigned int)' /usr/bin/ld: notdeft-xapian.cc:(.text+0x2405): undefined reference toXapian::Document::~Document()' /usr/bin/ld: notdeft-xapian.o: in function doIndex(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> > > >)::{lambda(std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, long> const&)#2}::operator()(std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, long> const&) const': notdeft-xapian.cc:(.text+0x24d6): undefined reference toXapian::WritableDatabase::add_document(Xapian::Document const&)' /usr/bin/ld: notdeft-xapian.cc:(.text+0x24e2): undefined reference to Xapian::Document::~Document()' /usr/bin/ld: notdeft-xapian.cc:(.text+0x2503): undefined reference toXapian::Document::~Document()' /usr/bin/ld: notdeft-xapian.o: in function `doIndex(std::vector<std::cxx11::basic_string<char, std::char_traits, std::allocator >, std::allocator<std::cxx11::basic_string<char, std::char_traits, std::allocator > > >)::{lambda(std::pair<std::cxx11::basic_string<char, std::char_traits, std::allocator >, long> const&, unsigned int)#3}::operator()(std::pair<std::cxx11::basic_string<char, std::char_traits, std::allocator >, long> const&, unsigned int) const': notdeft-xapian.cc:(.text+0x25b9): undefined reference to Xapian::WritableDatabase::replace_document(unsigned int, Xapian::Document const&)' /usr/bin/ld: notdeft-xapian.cc:(.text+0x25c5): undefined reference toXapian::Document::~Document()' /usr/bin/ld: notdeft-xapian.cc:(.text+0x25e6): undefined reference to Xapian::Document::~Document()' /usr/bin/ld: notdeft-xapian.o: in functiondoIndex(std::vector<std::cxx11::basic_string<char, std::char_traits, std::allocator >, std::allocator<std::cxx11::basic_string<char, std::char_traits, std::allocator > > >)::{lambda(std::pair<std::cxx11::basic_string<char, std::char_traits, std::allocator >, long> const&)#4}::operator()(std::pair<std::cxx11::basic_string<char, std::char_traits, std::allocator >, long> const&) const': notdeft-xapian.cc:(.text+0x2687): undefined reference to Xapian::WritableDatabase::delete_document(unsigned int)' /usr/bin/ld: notdeft-xapian.o: in functiondoIndex(std::vector<std::cxx11::basic_string<char, std::char_traits, std::allocator >, std::allocator<std::cxx11::basic_string<char, std::char_traits, std::allocator > > >)': notdeft-xapian.cc:(.text+0x3844): undefined reference to Xapian::TermGenerator::TermGenerator()' /usr/bin/ld: notdeft-xapian.cc:(.text+0x3868): undefined reference toXapian::Stem::Stem(std::cxx11::basic_string<char, std::char_traits, std::allocator > const&)' /usr/bin/ld: notdeft-xapian.cc:(.text+0x3881): undefined reference to Xapian::TermGenerator::set_stemmer(Xapian::Stem const&)' /usr/bin/ld: notdeft-xapian.cc:(.text+0x3a78): undefined reference toXapian::WritableDatabase::WritableDatabase(std::cxx11::basic_string<char, std::char_traits, std::allocator > const&, int, int)' /usr/bin/ld: notdeft-xapian.cc:(.text+0x3c67): undefined reference to Xapian::WritableDatabase::begin_transaction(bool)' /usr/bin/ld: notdeft-xapian.cc:(.text+0x3cb3): undefined reference toXapian::Database::postlist_begin(std::cxx11::basic_string<char, std::char_traits, std::allocator > const&) const' /usr/bin/ld: notdeft-xapian.cc:(.text+0x3d7c): undefined reference to Xapian::PostingIterator::operator*() const' /usr/bin/ld: notdeft-xapian.cc:(.text+0x3da1): undefined reference toXapian::Database::get_document(unsigned int) const' /usr/bin/ld: notdeft-xapian.cc:(.text+0x3dba): undefined reference to Xapian::Document::get_data[abi:cxx11]() const' /usr/bin/ld: notdeft-xapian.cc:(.text+0x3dd8): undefined reference toXapian::Document::get_value[abi:cxx11](unsigned int) const' /usr/bin/ld: notdeft-xapian.cc:(.text+0x3e65): undefined reference to Xapian::Document::~Document()' /usr/bin/ld: notdeft-xapian.cc:(.text+0x3e74): undefined reference toXapian::PostingIterator::operator++()' /usr/bin/ld: notdeft-xapian.cc:(.text+0x43d5): undefined reference to Xapian::WritableDatabase::commit_transaction()' /usr/bin/ld: notdeft-xapian.cc:(.text+0x4420): undefined reference toXapian::WritableDatabase::~WritableDatabase()' /usr/bin/ld: notdeft-xapian.cc:(.text+0x4470): undefined reference to Xapian::Stem::~Stem()' /usr/bin/ld: notdeft-xapian.cc:(.text+0x447f): undefined reference toXapian::TermGenerator::~TermGenerator()' /usr/bin/ld: notdeft-xapian.cc:(.text+0x4ba1): undefined reference to Xapian::Document::~Document()' /usr/bin/ld: notdeft-xapian.cc:(.text+0x4cdb): undefined reference toXapian::WritableDatabase::~WritableDatabase()' /usr/bin/ld: notdeft-xapian.cc:(.text+0x4d4b): undefined reference to Xapian::Stem::~Stem()' /usr/bin/ld: notdeft-xapian.cc:(.text+0x4d62): undefined reference toXapian::TermGenerator::~TermGenerator()' /usr/bin/ld: notdeft-xapian.cc:(.text+0x4da0): undefined reference to Xapian::Error::get_description[abi:cxx11]() const' /usr/bin/ld: notdeft-xapian.o: in functiondoSearch(std::vector<std::cxx11::basic_string<char, std::char_traits, std::allocator >, std::allocator<std::cxx11::basic_string<char, std::char_traits, std::allocator > > >)': notdeft-xapian.cc:(.text+0x5c64): undefined reference to Xapian::Database::Database()' /usr/bin/ld: notdeft-xapian.cc:(.text+0x5dbf): undefined reference toXapian::Database::Database(std::cxx11::basic_string<char, std::char_traits, std::allocator > const&, int)' /usr/bin/ld: notdeft-xapian.cc:(.text+0x5dd8): undefined reference to Xapian::Database::add_database(Xapian::Database const&)' /usr/bin/ld: notdeft-xapian.cc:(.text+0x5dee): undefined reference toXapian::Database::~Database()' /usr/bin/ld: notdeft-xapian.cc:(.text+0x5e52): undefined reference to Xapian::Enquire::Enquire(Xapian::Database const&)' /usr/bin/ld: notdeft-xapian.cc:(.text+0x5e74): undefined reference toXapian::Enquire::set_sort_by_value(unsigned int, bool)' /usr/bin/ld: notdeft-xapian.cc:(.text+0x5e98): undefined reference to Xapian::Enquire::set_sort_by_value(unsigned int, bool)' /usr/bin/ld: notdeft-xapian.cc:(.text+0x5ea7): undefined reference toXapian::QueryParser::QueryParser()' /usr/bin/ld: notdeft-xapian.cc:(.text+0x5f1f): undefined reference to `Xapian::QueryParser::add_prefix(std::cxx11::basic_string<char, std::char_traits, std::allocator > const&, std::cxx11::basic_string<char, std::char_traits, std::allocator > const&)' /usr/bin/ld: notdeft-xapian.cc:(.text+0x5fd3): undefined reference to Xapian::QueryParser::add_prefix(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)' /usr/bin/ld: notdeft-xapian.cc:(.text+0x6087): undefined reference toXapian::QueryParser::add_prefix(std::cxx11::basic_string<char, std::char_traits, std::allocator > const&, std::cxx11::basic_string<char, std::char_traits, std::allocator > const&)' /usr/bin/ld: notdeft-xapian.cc:(.text+0x613b): undefined reference to Xapian::QueryParser::add_prefix(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)' /usr/bin/ld: notdeft-xapian.cc:(.text+0x619b): undefined reference toXapian::Stem::Stem(std::cxx11::basic_string<char, std::char_traits, std::allocator > const&)' /usr/bin/ld: notdeft-xapian.cc:(.text+0x61da): undefined reference to Xapian::Query::MatchAll' /usr/bin/ld: notdeft-xapian.cc:(.text+0x6200): undefined reference toXapian::QueryParser::set_stemmer(Xapian::Stem const&)' /usr/bin/ld: notdeft-xapian.cc:(.text+0x6219): undefined reference to Xapian::QueryParser::set_database(Xapian::Database const&)' /usr/bin/ld: notdeft-xapian.cc:(.text+0x622d): undefined reference toXapian::QueryParser::set_stemming_strategy(Xapian::QueryParser::stem_strategy)' /usr/bin/ld: notdeft-xapian.cc:(.text+0x62c2): undefined reference to `Xapian::QueryParser::parse_query(std::cxx11::basic_string<char, std::char_traits, std::allocator > const&, unsigned int, std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&)' /usr/bin/ld: notdeft-xapian.cc:(.text+0x6331): undefined reference to Xapian::Query::get_description[abi:cxx11]() const' /usr/bin/ld: notdeft-xapian.cc:(.text+0x6385): undefined reference toXapian::Enquire::set_query(Xapian::Query const&, unsigned int)' /usr/bin/ld: notdeft-xapian.cc:(.text+0x639d): undefined reference to Xapian::Database::get_doccount() const' /usr/bin/ld: notdeft-xapian.cc:(.text+0x63e0): undefined reference toXapian::Enquire::get_mset(unsigned int, unsigned int, unsigned int, Xapian::RSet const, Xapian::MatchDecider const) const' /usr/bin/ld: notdeft-xapian.cc:(.text+0x6463): undefined reference to Xapian::MSetIterator::get_document() const' /usr/bin/ld: notdeft-xapian.cc:(.text+0x647c): undefined reference toXapian::Document::get_data[abi:cxx11]() const' /usr/bin/ld: notdeft-xapian.cc:(.text+0x64c5): undefined reference to Xapian::Document::~Document()' /usr/bin/ld: notdeft-xapian.cc:(.text+0x64f7): undefined reference toXapian::MSet::~MSet()' /usr/bin/ld: notdeft-xapian.cc:(.text+0x6515): undefined reference to Xapian::Stem::~Stem()' /usr/bin/ld: notdeft-xapian.cc:(.text+0x6524): undefined reference toXapian::QueryParser::~QueryParser()' /usr/bin/ld: notdeft-xapian.cc:(.text+0x6533): undefined reference to Xapian::Enquire::~Enquire()' /usr/bin/ld: notdeft-xapian.cc:(.text+0x656b): undefined reference toXapian::Database::~Database()' /usr/bin/ld: notdeft-xapian.cc:(.text+0x6b65): undefined reference to Xapian::Database::~Database()' /usr/bin/ld: notdeft-xapian.cc:(.text+0x6d71): undefined reference toXapian::Document::~Document()' /usr/bin/ld: notdeft-xapian.cc:(.text+0x6d9f): undefined reference to Xapian::MSet::~MSet()' /usr/bin/ld: notdeft-xapian.cc:(.text+0x6dc5): undefined reference toXapian::Stem::~Stem()' /usr/bin/ld: notdeft-xapian.cc:(.text+0x6ddc): undefined reference to Xapian::QueryParser::~QueryParser()' /usr/bin/ld: notdeft-xapian.cc:(.text+0x6df3): undefined reference toXapian::Enquire::~Enquire()' /usr/bin/ld: notdeft-xapian.cc:(.text+0x6e21): undefined reference to Xapian::Database::~Database()' /usr/bin/ld: notdeft-xapian.cc:(.text+0x6e5f): undefined reference toXapian::Error::get_description[abi:cxx11]() const' /usr/bin/ld: notdeft-xapian.o: in function `doDump(std::vector<std::cxx11::basic_string<char, std::char_traits, std::allocator >, std::allocator<std::cxx11::basic_string<char, std::char_traits, std::allocator > > >)': notdeft-xapian.cc:(.text+0x7361): undefined reference to `Xapian::Database::Database(std::cxx11::basic_string<char, std::char_traits, std::allocator > const&, int)' /usr/bin/ld: notdeft-xapian.cc:(.text+0x7390): undefined reference to Xapian::Database::metadata_keys_begin(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const' /usr/bin/ld: notdeft-xapian.cc:(.text+0x7428): undefined reference toXapian::TermIterator::operator[abi:cxx11]() const' /usr/bin/ld: notdeft-xapian.cc:(.text+0x7448): undefined reference to Xapian::Database::get_metadata(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const' /usr/bin/ld: notdeft-xapian.cc:(.text+0x7537): undefined reference toXapian::Database::allterms_begin(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&) const' /usr/bin/ld: notdeft-xapian.cc:(.text+0x75e5): undefined reference to `Xapian::TermIterator::operator[abi:cxx11]() const' /usr/bin/ld: notdeft-xapian.cc:(.text+0x766b): undefined reference to Xapian::Database::~Database()' /usr/bin/ld: notdeft-xapian.cc:(.text+0x7890): undefined reference toXapian::Database::~Database()' /usr/bin/ld: notdeft-xapian.cc:(.text+0x7917): undefined reference to Xapian::Error::get_description[abi:cxx11]() const' /usr/bin/ld: notdeft-xapian.o: in functionXapian::PostingIterator::~PostingIterator()': notdeft-xapian.cc:(.text._ZN6Xapian15PostingIteratorD2Ev[_ZN6Xapian15PostingIteratorD5Ev]+0x20): undefined reference to Xapian::PostingIterator::decref()' /usr/bin/ld: notdeft-xapian.o: in functionXapian::TermIterator::~TermIterator()': notdeft-xapian.cc:(.text._ZN6Xapian12TermIteratorD2Ev[_ZN6Xapian12TermIteratorD5Ev]+0x20): undefined reference to Xapian::TermIterator::decref()' /usr/bin/ld: notdeft-xapian.o: in functionXapian::TermIterator::operator++abi:cxx11': notdeft-xapian.cc:(.text._ZN6Xapian12TermIteratorppB5cxx11Ei[_ZN6Xapian12TermIteratorppB5cxx11Ei]+0x32): undefined reference to Xapian::TermIterator::operator*[abi:cxx11]() const' /usr/bin/ld: notdeft-xapian.cc:(.text._ZN6Xapian12TermIteratorppB5cxx11Ei[_ZN6Xapian12TermIteratorppB5cxx11Ei]+0x46): undefined reference toXapian::TermIterator::operator++()' /usr/bin/ld: notdeft-xapian.o: in function Xapian::TermGenerator::index_text(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, unsigned int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)': notdeft-xapian.cc:(.text._ZN6Xapian13TermGenerator10index_textERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEjS8_[_ZN6Xapian13TermGenerator10index_textERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEjS8_]+0x4c): undefined reference toXapian::TermGenerator::index_text(Xapian::Utf8Iterator const&, unsigned int, std::cxx11::basic_string<char, std::char_traits, std::allocator > const&)' /usr/bin/ld: notdeft-xapian.o: in function `Xapian::TermGenerator::index_text_without_positions(std::cxx11::basic_string<char, std::char_traits, std::allocator > const&, unsigned int, std::cxx11::basic_string<char, std::char_traits, std::allocator > const&)': notdeft-xapian.cc:(.text._ZN6Xapian13TermGenerator28index_text_without_positionsERKNSt7__cxx1112basic_stringIcSt11chartraitsIcESaIcEEEjS8[_ZN6Xapian13TermGenerator28index_text_without_positionsERKNSt7cxx1112basic_stringIcSt11chartraitsIcESaIcEEEjS8]+0x4c): undefined reference to Xapian::TermGenerator::index_text_without_positions(Xapian::Utf8Iterator const&, unsigned int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)' /usr/bin/ld: notdeft-xapian.o: in functionXapian::MSetIterator::MSetIterator(Xapian::MSet const&, unsigned int)': notdeft-xapian.cc:(.text._ZN6Xapian12MSetIteratorC2ERKNS_4MSetEj[_ZN6Xapian12MSetIteratorC5ERKNS_4MSetEj]+0x22): undefined reference to Xapian::MSet::MSet(Xapian::MSet const&)' /usr/bin/ld: notdeft-xapian.o: in functionXapian::MSetIterator::~MSetIterator()': notdeft-xapian.cc:(.text._ZN6Xapian12MSetIteratorD2Ev[_ZN6Xapian12MSetIteratorD5Ev]+0x14): undefined reference to Xapian::MSet::~MSet()' /usr/bin/ld: notdeft-xapian.o: in functionXapian::MSet::begin() const': notdeft-xapian.cc:(.text._ZNK6Xapian4MSet5beginEv[_ZNK6Xapian4MSet5beginEv]+0x18): undefined reference to `Xapian::MSet::size() const' collect2: error: ld returned 1 exit status

g++ -v -Wl,-v pkg-config --libs tclap xapian-config --libs *.o

Using built-in specs. COLLECT_GCC=g++ COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/8/lto-wrapper OFFLOAD_TARGET_NAMES=nvptx-none OFFLOAD_TARGET_DEFAULT=1 Target: x86_64-linux-gnu Configured with: ../src/configure -v --with-pkgversion='Ubuntu 8.2.0-7ubuntu1' --with-bugurl=file:///usr/share/doc/gcc-8/README.Bugs --enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-c++ --prefix=/usr --with-gcc-major-version-only --program-suffix=-8 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-libmpx --enable-plugin --enable-default-pie --with-system-zlib --with-target-system-zlib --enable-objc-gc=auto --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu Thread model: posix gcc version 8.2.0 (Ubuntu 8.2.0-7ubuntu1) COMPILER_PATH=/usr/lib/gcc/x86_64-linux-gnu/8/:/usr/lib/gcc/x86_64-linux-gnu/8/:/usr/lib/gcc/x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/8/:/usr/lib/gcc/x86_64-linux-gnu/ LIBRARY_PATH=/usr/lib/gcc/x86_64-linux-gnu/8/:/usr/lib/gcc/x86_64-linux-gnu/8/../../../x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/8/../../../../lib/:/lib/x86_64-linux-gnu/:/lib/../lib/:/usr/lib/x86_64-linux-gnu/:/usr/lib/../lib/:/usr/lib/gcc/x86_64-linux-gnu/8/../../../:/lib/:/usr/lib/ COLLECT_GCC_OPTIONS='-v' '-L/usr/lib/x86_64-linux-gnu' '-shared-libgcc' '-mtune=generic' '-march=x86-64' /usr/lib/gcc/x86_64-linux-gnu/8/collect2 -plugin /usr/lib/gcc/x86_64-linux-gnu/8/liblto_plugin.so -plugin-opt=/usr/lib/gcc/x86_64-linux-gnu/8/lto-wrapper -plugin-opt=-fresolution=/tmp/ccxatAwN.res -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lc -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lgcc --sysroot=/ --build-id --eh-frame-hdr -m elf_x86_64 --hash-style=gnu --as-needed -dynamic-linker /lib64/ld-linux-x86-64.so.2 -pie -z now -z relro /usr/lib/gcc/x86_64-linux-gnu/8/../../../x86_64-linux-gnu/Scrt1.o /usr/lib/gcc/x86_64-linux-gnu/8/../../../x86_64-linux-gnu/crti.o /usr/lib/gcc/x86_64-linux-gnu/8/crtbeginS.o -L/usr/lib/x86_64-linux-gnu -L/usr/lib/gcc/x86_64-linux-gnu/8 -L/usr/lib/gcc/x86_64-linux-gnu/8/../../../x86_64-linux-gnu -L/usr/lib/gcc/x86_64-linux-gnu/8/../../../../lib -L/lib/x86_64-linux-gnu -L/lib/../lib -L/usr/lib/x86_64-linux-gnu -L/usr/lib/../lib -L/usr/lib/gcc/x86_64-linux-gnu/8/../../.. -v -lxapian notdeft-xapian.o -lstdc++ -lm -lgcc_s -lgcc -lc -lgcc_s -lgcc /usr/lib/gcc/x86_64-linux-gnu/8/crtendS.o /usr/lib/gcc/x86_64-linux-gnu/8/../../../x86_64-linux-gnu/crtn.o collect2 version 8.2.0 /usr/bin/ld -plugin /usr/lib/gcc/x86_64-linux-gnu/8/liblto_plugin.so -plugin-opt=/usr/lib/gcc/x86_64-linux-gnu/8/lto-wrapper -plugin-opt=-fresolution=/tmp/ccxatAwN.res -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lc -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lgcc --sysroot=/ --build-id --eh-frame-hdr -m elf_x86_64 --hash-style=gnu --as-needed -dynamic-linker /lib64/ld-linux-x86-64.so.2 -pie -z now -z relro /usr/lib/gcc/x86_64-linux-gnu/8/../../../x86_64-linux-gnu/Scrt1.o /usr/lib/gcc/x86_64-linux-gnu/8/../../../x86_64-linux-gnu/crti.o /usr/lib/gcc/x86_64-linux-gnu/8/crtbeginS.o -L/usr/lib/x86_64-linux-gnu -L/usr/lib/gcc/x86_64-linux-gnu/8 -L/usr/lib/gcc/x86_64-linux-gnu/8/../../../x86_64-linux-gnu -L/usr/lib/gcc/x86_64-linux-gnu/8/../../../../lib -L/lib/x86_64-linux-gnu -L/lib/../lib -L/usr/lib/x86_64-linux-gnu -L/usr/lib/../lib -L/usr/lib/gcc/x86_64-linux-gnu/8/../../.. -v -lxapian notdeft-xapian.o -lstdc++ -lm -lgcc_s -lgcc -lc -lgcc_s -lgcc /usr/lib/gcc/x86_64-linux-gnu/8/crtendS.o /usr/lib/gcc/x86_64-linux-gnu/8/../../../x86_64-linux-gnu/crtn.o GNU ld (GNU Binutils for Ubuntu) 2.31.1 /usr/bin/ld: notdeft-xapian.o: in function doIndex(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> > > >)::{lambda(std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, long> const&)#1}::operator()(std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, long> const&) const': notdeft-xapian.cc:(.text+0x18ab): undefined reference toXapian::Document::Document()' /usr/bin/ld: notdeft-xapian.cc:(.text+0x18c4): undefined reference to Xapian::Document::set_data(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)' /usr/bin/ld: notdeft-xapian.cc:(.text+0x18fc): undefined reference toXapian::Document::add_value(unsigned int, std::cxx11::basic_string<char, std::char_traits, std::allocator > const&)' /usr/bin/ld: notdeft-xapian.cc:(.text+0x193f): undefined reference to Xapian::Document::add_value(unsigned int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)' /usr/bin/ld: notdeft-xapian.cc:(.text+0x195b): undefined reference toXapian::TermGenerator::set_document(Xapian::Document const&)' /usr/bin/ld: notdeft-xapian.cc:(.text+0x1cbf): undefined reference to Xapian::TermGenerator::increase_termpos(unsigned int)' /usr/bin/ld: notdeft-xapian.cc:(.text+0x1f0f): undefined reference toXapian::TermGenerator::increase_termpos(unsigned int)' /usr/bin/ld: notdeft-xapian.cc:(.text+0x2151): undefined reference to Xapian::TermGenerator::increase_termpos(unsigned int)' /usr/bin/ld: notdeft-xapian.cc:(.text+0x2405): undefined reference toXapian::Document::~Document()' /usr/bin/ld: notdeft-xapian.o: in function doIndex(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> > > >)::{lambda(std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, long> const&)#2}::operator()(std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, long> const&) const': notdeft-xapian.cc:(.text+0x24d6): undefined reference toXapian::WritableDatabase::add_document(Xapian::Document const&)' /usr/bin/ld: notdeft-xapian.cc:(.text+0x24e2): undefined reference to Xapian::Document::~Document()' /usr/bin/ld: notdeft-xapian.cc:(.text+0x2503): undefined reference toXapian::Document::~Document()' /usr/bin/ld: notdeft-xapian.o: in function `doIndex(std::vector<std::cxx11::basic_string<char, std::char_traits, std::allocator >, std::allocator<std::cxx11::basic_string<char, std::char_traits, std::allocator > > >)::{lambda(std::pair<std::cxx11::basic_string<char, std::char_traits, std::allocator >, long> const&, unsigned int)#3}::operator()(std::pair<std::cxx11::basic_string<char, std::char_traits, std::allocator >, long> const&, unsigned int) const': notdeft-xapian.cc:(.text+0x25b9): undefined reference to Xapian::WritableDatabase::replace_document(unsigned int, Xapian::Document const&)' /usr/bin/ld: notdeft-xapian.cc:(.text+0x25c5): undefined reference toXapian::Document::~Document()' /usr/bin/ld: notdeft-xapian.cc:(.text+0x25e6): undefined reference to Xapian::Document::~Document()' /usr/bin/ld: notdeft-xapian.o: in functiondoIndex(std::vector<std::cxx11::basic_string<char, std::char_traits, std::allocator >, std::allocator<std::cxx11::basic_string<char, std::char_traits, std::allocator > > >)::{lambda(std::pair<std::cxx11::basic_string<char, std::char_traits, std::allocator >, long> const&)#4}::operator()(std::pair<std::cxx11::basic_string<char, std::char_traits, std::allocator >, long> const&) const': notdeft-xapian.cc:(.text+0x2687): undefined reference to Xapian::WritableDatabase::delete_document(unsigned int)' /usr/bin/ld: notdeft-xapian.o: in functiondoIndex(std::vector<std::cxx11::basic_string<char, std::char_traits, std::allocator >, std::allocator<std::cxx11::basic_string<char, std::char_traits, std::allocator > > >)': notdeft-xapian.cc:(.text+0x3844): undefined reference to Xapian::TermGenerator::TermGenerator()' /usr/bin/ld: notdeft-xapian.cc:(.text+0x3868): undefined reference toXapian::Stem::Stem(std::cxx11::basic_string<char, std::char_traits, std::allocator > const&)' /usr/bin/ld: notdeft-xapian.cc:(.text+0x3881): undefined reference to Xapian::TermGenerator::set_stemmer(Xapian::Stem const&)' /usr/bin/ld: notdeft-xapian.cc:(.text+0x3a78): undefined reference toXapian::WritableDatabase::WritableDatabase(std::cxx11::basic_string<char, std::char_traits, std::allocator > const&, int, int)' /usr/bin/ld: notdeft-xapian.cc:(.text+0x3c67): undefined reference to Xapian::WritableDatabase::begin_transaction(bool)' /usr/bin/ld: notdeft-xapian.cc:(.text+0x3cb3): undefined reference toXapian::Database::postlist_begin(std::cxx11::basic_string<char, std::char_traits, std::allocator > const&) const' /usr/bin/ld: notdeft-xapian.cc:(.text+0x3d7c): undefined reference to Xapian::PostingIterator::operator*() const' /usr/bin/ld: notdeft-xapian.cc:(.text+0x3da1): undefined reference toXapian::Database::get_document(unsigned int) const' /usr/bin/ld: notdeft-xapian.cc:(.text+0x3dba): undefined reference to Xapian::Document::get_data[abi:cxx11]() const' /usr/bin/ld: notdeft-xapian.cc:(.text+0x3dd8): undefined reference toXapian::Document::get_value[abi:cxx11](unsigned int) const' /usr/bin/ld: notdeft-xapian.cc:(.text+0x3e65): undefined reference to Xapian::Document::~Document()' /usr/bin/ld: notdeft-xapian.cc:(.text+0x3e74): undefined reference toXapian::PostingIterator::operator++()' /usr/bin/ld: notdeft-xapian.cc:(.text+0x43d5): undefined reference to Xapian::WritableDatabase::commit_transaction()' /usr/bin/ld: notdeft-xapian.cc:(.text+0x4420): undefined reference toXapian::WritableDatabase::~WritableDatabase()' /usr/bin/ld: notdeft-xapian.cc:(.text+0x4470): undefined reference to Xapian::Stem::~Stem()' /usr/bin/ld: notdeft-xapian.cc:(.text+0x447f): undefined reference toXapian::TermGenerator::~TermGenerator()' /usr/bin/ld: notdeft-xapian.cc:(.text+0x4ba1): undefined reference to Xapian::Document::~Document()' /usr/bin/ld: notdeft-xapian.cc:(.text+0x4cdb): undefined reference toXapian::WritableDatabase::~WritableDatabase()' /usr/bin/ld: notdeft-xapian.cc:(.text+0x4d4b): undefined reference to Xapian::Stem::~Stem()' /usr/bin/ld: notdeft-xapian.cc:(.text+0x4d62): undefined reference toXapian::TermGenerator::~TermGenerator()' /usr/bin/ld: notdeft-xapian.cc:(.text+0x4da0): undefined reference to Xapian::Error::get_description[abi:cxx11]() const' /usr/bin/ld: notdeft-xapian.o: in functiondoSearch(std::vector<std::cxx11::basic_string<char, std::char_traits, std::allocator >, std::allocator<std::cxx11::basic_string<char, std::char_traits, std::allocator > > >)': notdeft-xapian.cc:(.text+0x5c64): undefined reference to Xapian::Database::Database()' /usr/bin/ld: notdeft-xapian.cc:(.text+0x5dbf): undefined reference toXapian::Database::Database(std::cxx11::basic_string<char, std::char_traits, std::allocator > const&, int)' /usr/bin/ld: notdeft-xapian.cc:(.text+0x5dd8): undefined reference to Xapian::Database::add_database(Xapian::Database const&)' /usr/bin/ld: notdeft-xapian.cc:(.text+0x5dee): undefined reference toXapian::Database::~Database()' /usr/bin/ld: notdeft-xapian.cc:(.text+0x5e52): undefined reference to Xapian::Enquire::Enquire(Xapian::Database const&)' /usr/bin/ld: notdeft-xapian.cc:(.text+0x5e74): undefined reference toXapian::Enquire::set_sort_by_value(unsigned int, bool)' /usr/bin/ld: notdeft-xapian.cc:(.text+0x5e98): undefined reference to Xapian::Enquire::set_sort_by_value(unsigned int, bool)' /usr/bin/ld: notdeft-xapian.cc:(.text+0x5ea7): undefined reference toXapian::QueryParser::QueryParser()' /usr/bin/ld: notdeft-xapian.cc:(.text+0x5f1f): undefined reference to `Xapian::QueryParser::add_prefix(std::cxx11::basic_string<char, std::char_traits, std::allocator > const&, std::cxx11::basic_string<char, std::char_traits, std::allocator > const&)' /usr/bin/ld: notdeft-xapian.cc:(.text+0x5fd3): undefined reference to Xapian::QueryParser::add_prefix(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)' /usr/bin/ld: notdeft-xapian.cc:(.text+0x6087): undefined reference toXapian::QueryParser::add_prefix(std::cxx11::basic_string<char, std::char_traits, std::allocator > const&, std::cxx11::basic_string<char, std::char_traits, std::allocator > const&)' /usr/bin/ld: notdeft-xapian.cc:(.text+0x613b): undefined reference to Xapian::QueryParser::add_prefix(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)' /usr/bin/ld: notdeft-xapian.cc:(.text+0x619b): undefined reference toXapian::Stem::Stem(std::cxx11::basic_string<char, std::char_traits, std::allocator > const&)' /usr/bin/ld: notdeft-xapian.cc:(.text+0x61da): undefined reference to Xapian::Query::MatchAll' /usr/bin/ld: notdeft-xapian.cc:(.text+0x6200): undefined reference toXapian::QueryParser::set_stemmer(Xapian::Stem const&)' /usr/bin/ld: notdeft-xapian.cc:(.text+0x6219): undefined reference to Xapian::QueryParser::set_database(Xapian::Database const&)' /usr/bin/ld: notdeft-xapian.cc:(.text+0x622d): undefined reference toXapian::QueryParser::set_stemming_strategy(Xapian::QueryParser::stem_strategy)' /usr/bin/ld: notdeft-xapian.cc:(.text+0x62c2): undefined reference to `Xapian::QueryParser::parse_query(std::cxx11::basic_string<char, std::char_traits, std::allocator > const&, unsigned int, std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&)' /usr/bin/ld: notdeft-xapian.cc:(.text+0x6331): undefined reference to Xapian::Query::get_description[abi:cxx11]() const' /usr/bin/ld: notdeft-xapian.cc:(.text+0x6385): undefined reference toXapian::Enquire::set_query(Xapian::Query const&, unsigned int)' /usr/bin/ld: notdeft-xapian.cc:(.text+0x639d): undefined reference to Xapian::Database::get_doccount() const' /usr/bin/ld: notdeft-xapian.cc:(.text+0x63e0): undefined reference toXapian::Enquire::get_mset(unsigned int, unsigned int, unsigned int, Xapian::RSet const, Xapian::MatchDecider const) const' /usr/bin/ld: notdeft-xapian.cc:(.text+0x6463): undefined reference to Xapian::MSetIterator::get_document() const' /usr/bin/ld: notdeft-xapian.cc:(.text+0x647c): undefined reference toXapian::Document::get_data[abi:cxx11]() const' /usr/bin/ld: notdeft-xapian.cc:(.text+0x64c5): undefined reference to Xapian::Document::~Document()' /usr/bin/ld: notdeft-xapian.cc:(.text+0x64f7): undefined reference toXapian::MSet::~MSet()' /usr/bin/ld: notdeft-xapian.cc:(.text+0x6515): undefined reference to Xapian::Stem::~Stem()' /usr/bin/ld: notdeft-xapian.cc:(.text+0x6524): undefined reference toXapian::QueryParser::~QueryParser()' /usr/bin/ld: notdeft-xapian.cc:(.text+0x6533): undefined reference to Xapian::Enquire::~Enquire()' /usr/bin/ld: notdeft-xapian.cc:(.text+0x656b): undefined reference toXapian::Database::~Database()' /usr/bin/ld: notdeft-xapian.cc:(.text+0x6b65): undefined reference to Xapian::Database::~Database()' /usr/bin/ld: notdeft-xapian.cc:(.text+0x6d71): undefined reference toXapian::Document::~Document()' /usr/bin/ld: notdeft-xapian.cc:(.text+0x6d9f): undefined reference to Xapian::MSet::~MSet()' /usr/bin/ld: notdeft-xapian.cc:(.text+0x6dc5): undefined reference toXapian::Stem::~Stem()' /usr/bin/ld: notdeft-xapian.cc:(.text+0x6ddc): undefined reference to Xapian::QueryParser::~QueryParser()' /usr/bin/ld: notdeft-xapian.cc:(.text+0x6df3): undefined reference toXapian::Enquire::~Enquire()' /usr/bin/ld: notdeft-xapian.cc:(.text+0x6e21): undefined reference to Xapian::Database::~Database()' /usr/bin/ld: notdeft-xapian.cc:(.text+0x6e5f): undefined reference toXapian::Error::get_description[abi:cxx11]() const' /usr/bin/ld: notdeft-xapian.o: in function `doDump(std::vector<std::cxx11::basic_string<char, std::char_traits, std::allocator >, std::allocator<std::cxx11::basic_string<char, std::char_traits, std::allocator > > >)': notdeft-xapian.cc:(.text+0x7361): undefined reference to `Xapian::Database::Database(std::cxx11::basic_string<char, std::char_traits, std::allocator > const&, int)' /usr/bin/ld: notdeft-xapian.cc:(.text+0x7390): undefined reference to Xapian::Database::metadata_keys_begin(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const' /usr/bin/ld: notdeft-xapian.cc:(.text+0x7428): undefined reference toXapian::TermIterator::operator[abi:cxx11]() const' /usr/bin/ld: notdeft-xapian.cc:(.text+0x7448): undefined reference to Xapian::Database::get_metadata(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const' /usr/bin/ld: notdeft-xapian.cc:(.text+0x7537): undefined reference toXapian::Database::allterms_begin(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&) const' /usr/bin/ld: notdeft-xapian.cc:(.text+0x75e5): undefined reference to `Xapian::TermIterator::operator[abi:cxx11]() const' /usr/bin/ld: notdeft-xapian.cc:(.text+0x766b): undefined reference to Xapian::Database::~Database()' /usr/bin/ld: notdeft-xapian.cc:(.text+0x7890): undefined reference toXapian::Database::~Database()' /usr/bin/ld: notdeft-xapian.cc:(.text+0x7917): undefined reference to Xapian::Error::get_description[abi:cxx11]() const' /usr/bin/ld: notdeft-xapian.o: in functionXapian::PostingIterator::~PostingIterator()': notdeft-xapian.cc:(.text._ZN6Xapian15PostingIteratorD2Ev[_ZN6Xapian15PostingIteratorD5Ev]+0x20): undefined reference to Xapian::PostingIterator::decref()' /usr/bin/ld: notdeft-xapian.o: in functionXapian::TermIterator::~TermIterator()': notdeft-xapian.cc:(.text._ZN6Xapian12TermIteratorD2Ev[_ZN6Xapian12TermIteratorD5Ev]+0x20): undefined reference to Xapian::TermIterator::decref()' /usr/bin/ld: notdeft-xapian.o: in functionXapian::TermIterator::operator++abi:cxx11': notdeft-xapian.cc:(.text._ZN6Xapian12TermIteratorppB5cxx11Ei[_ZN6Xapian12TermIteratorppB5cxx11Ei]+0x32): undefined reference to Xapian::TermIterator::operator*[abi:cxx11]() const' /usr/bin/ld: notdeft-xapian.cc:(.text._ZN6Xapian12TermIteratorppB5cxx11Ei[_ZN6Xapian12TermIteratorppB5cxx11Ei]+0x46): undefined reference toXapian::TermIterator::operator++()' /usr/bin/ld: notdeft-xapian.o: in function Xapian::TermGenerator::index_text(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, unsigned int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)': notdeft-xapian.cc:(.text._ZN6Xapian13TermGenerator10index_textERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEjS8_[_ZN6Xapian13TermGenerator10index_textERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEjS8_]+0x4c): undefined reference toXapian::TermGenerator::index_text(Xapian::Utf8Iterator const&, unsigned int, std::cxx11::basic_string<char, std::char_traits, std::allocator > const&)' /usr/bin/ld: notdeft-xapian.o: in function `Xapian::TermGenerator::index_text_without_positions(std::cxx11::basic_string<char, std::char_traits, std::allocator > const&, unsigned int, std::cxx11::basic_string<char, std::char_traits, std::allocator > const&)': notdeft-xapian.cc:(.text._ZN6Xapian13TermGenerator28index_text_without_positionsERKNSt7__cxx1112basic_stringIcSt11chartraitsIcESaIcEEEjS8[_ZN6Xapian13TermGenerator28index_text_without_positionsERKNSt7cxx1112basic_stringIcSt11chartraitsIcESaIcEEEjS8]+0x4c): undefined reference to Xapian::TermGenerator::index_text_without_positions(Xapian::Utf8Iterator const&, unsigned int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)' /usr/bin/ld: notdeft-xapian.o: in functionXapian::MSetIterator::MSetIterator(Xapian::MSet const&, unsigned int)': notdeft-xapian.cc:(.text._ZN6Xapian12MSetIteratorC2ERKNS_4MSetEj[_ZN6Xapian12MSetIteratorC5ERKNS_4MSetEj]+0x22): undefined reference to Xapian::MSet::MSet(Xapian::MSet const&)' /usr/bin/ld: notdeft-xapian.o: in functionXapian::MSetIterator::~MSetIterator()': notdeft-xapian.cc:(.text._ZN6Xapian12MSetIteratorD2Ev[_ZN6Xapian12MSetIteratorD5Ev]+0x14): undefined reference to Xapian::MSet::~MSet()' /usr/bin/ld: notdeft-xapian.o: in functionXapian::MSet::begin() const': notdeft-xapian.cc:(.text._ZNK6Xapian4MSet5beginEv[_ZNK6Xapian4MSet5beginEv]+0x18): undefined reference to `Xapian::MSet::size() const' collect2: error: ld returned 1 exit status

anthrolisp commented 5 years ago

It SEEMS to be working now, even with the error, using notdeft-example.el . Could notdeft not be using xapian and deft's search engine instead?

hasu commented 5 years ago

Those linker errors look pretty severe. However, NotDeft mode supports basic filtering even without the notdeft-xapian program.

It appears that the following command records more information about the libraries that are successfully loaded by the linker, and the Xapian symbols that are found g++ -Wl,-Map=output.map -Wall pkg-config --cflags --libs tclap xapian-config --cxxflags --libs *.cc && grep -i xapian output.map

anthrolisp commented 5 years ago

g++ -Wl,-Map=output.map -Wall pkg-config --cflags --libs tclap xapian-config --cxxflags --libs *.cc && grep -i xapian output.map

/usr/bin/ld: /tmp/cc6J1852.o: in function doIndex(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> > > >)::{lambda(std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, long> const&)#1}::operator()(std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, long> const&) const': notdeft-xapian.cc:(.text+0x18ab): undefined reference toXapian::Document::Document()' /usr/bin/ld: notdeft-xapian.cc:(.text+0x18c4): undefined reference to Xapian::Document::set_data(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)' /usr/bin/ld: notdeft-xapian.cc:(.text+0x18fc): undefined reference toXapian::Document::add_value(unsigned int, std::cxx11::basic_string<char, std::char_traits, std::allocator > const&)' /usr/bin/ld: notdeft-xapian.cc:(.text+0x193f): undefined reference to Xapian::Document::add_value(unsigned int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)' /usr/bin/ld: notdeft-xapian.cc:(.text+0x195b): undefined reference toXapian::TermGenerator::set_document(Xapian::Document const&)' /usr/bin/ld: notdeft-xapian.cc:(.text+0x1cbf): undefined reference to Xapian::TermGenerator::increase_termpos(unsigned int)' /usr/bin/ld: notdeft-xapian.cc:(.text+0x1f0f): undefined reference toXapian::TermGenerator::increase_termpos(unsigned int)' /usr/bin/ld: notdeft-xapian.cc:(.text+0x2151): undefined reference to Xapian::TermGenerator::increase_termpos(unsigned int)' /usr/bin/ld: notdeft-xapian.cc:(.text+0x2405): undefined reference toXapian::Document::~Document()' /usr/bin/ld: /tmp/cc6J1852.o: in function doIndex(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> > > >)::{lambda(std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, long> const&)#2}::operator()(std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, long> const&) const': notdeft-xapian.cc:(.text+0x24d6): undefined reference toXapian::WritableDatabase::add_document(Xapian::Document const&)' /usr/bin/ld: notdeft-xapian.cc:(.text+0x24e2): undefined reference to Xapian::Document::~Document()' /usr/bin/ld: notdeft-xapian.cc:(.text+0x2503): undefined reference toXapian::Document::~Document()' /usr/bin/ld: /tmp/cc6J1852.o: in function `doIndex(std::vector<std::cxx11::basic_string<char, std::char_traits, std::allocator >, std::allocator<std::cxx11::basic_string<char, std::char_traits, std::allocator > > >)::{lambda(std::pair<std::cxx11::basic_string<char, std::char_traits, std::allocator >, long> const&, unsigned int)#3}::operator()(std::pair<std::cxx11::basic_string<char, std::char_traits, std::allocator >, long> const&, unsigned int) const': notdeft-xapian.cc:(.text+0x25b9): undefined reference to Xapian::WritableDatabase::replace_document(unsigned int, Xapian::Document const&)' /usr/bin/ld: notdeft-xapian.cc:(.text+0x25c5): undefined reference toXapian::Document::~Document()' /usr/bin/ld: notdeft-xapian.cc:(.text+0x25e6): undefined reference to Xapian::Document::~Document()' /usr/bin/ld: /tmp/cc6J1852.o: in functiondoIndex(std::vector<std::cxx11::basic_string<char, std::char_traits, std::allocator >, std::allocator<std::cxx11::basic_string<char, std::char_traits, std::allocator > > >)::{lambda(std::pair<std::cxx11::basic_string<char, std::char_traits, std::allocator >, long> const&)#4}::operator()(std::pair<std::cxx11::basic_string<char, std::char_traits, std::allocator >, long> const&) const': notdeft-xapian.cc:(.text+0x2687): undefined reference to Xapian::WritableDatabase::delete_document(unsigned int)' /usr/bin/ld: /tmp/cc6J1852.o: in functiondoIndex(std::vector<std::cxx11::basic_string<char, std::char_traits, std::allocator >, std::allocator<std::cxx11::basic_string<char, std::char_traits, std::allocator > > >)': notdeft-xapian.cc:(.text+0x3844): undefined reference to Xapian::TermGenerator::TermGenerator()' /usr/bin/ld: notdeft-xapian.cc:(.text+0x3868): undefined reference toXapian::Stem::Stem(std::cxx11::basic_string<char, std::char_traits, std::allocator > const&)' /usr/bin/ld: notdeft-xapian.cc:(.text+0x3881): undefined reference to Xapian::TermGenerator::set_stemmer(Xapian::Stem const&)' /usr/bin/ld: notdeft-xapian.cc:(.text+0x3a78): undefined reference toXapian::WritableDatabase::WritableDatabase(std::cxx11::basic_string<char, std::char_traits, std::allocator > const&, int, int)' /usr/bin/ld: notdeft-xapian.cc:(.text+0x3c67): undefined reference to Xapian::WritableDatabase::begin_transaction(bool)' /usr/bin/ld: notdeft-xapian.cc:(.text+0x3cb3): undefined reference toXapian::Database::postlist_begin(std::cxx11::basic_string<char, std::char_traits, std::allocator > const&) const' /usr/bin/ld: notdeft-xapian.cc:(.text+0x3d7c): undefined reference to Xapian::PostingIterator::operator*() const' /usr/bin/ld: notdeft-xapian.cc:(.text+0x3da1): undefined reference toXapian::Database::get_document(unsigned int) const' /usr/bin/ld: notdeft-xapian.cc:(.text+0x3dba): undefined reference to Xapian::Document::get_data[abi:cxx11]() const' /usr/bin/ld: notdeft-xapian.cc:(.text+0x3dd8): undefined reference toXapian::Document::get_value[abi:cxx11](unsigned int) const' /usr/bin/ld: notdeft-xapian.cc:(.text+0x3e65): undefined reference to Xapian::Document::~Document()' /usr/bin/ld: notdeft-xapian.cc:(.text+0x3e74): undefined reference toXapian::PostingIterator::operator++()' /usr/bin/ld: notdeft-xapian.cc:(.text+0x43d5): undefined reference to Xapian::WritableDatabase::commit_transaction()' /usr/bin/ld: notdeft-xapian.cc:(.text+0x4420): undefined reference toXapian::WritableDatabase::~WritableDatabase()' /usr/bin/ld: notdeft-xapian.cc:(.text+0x4470): undefined reference to Xapian::Stem::~Stem()' /usr/bin/ld: notdeft-xapian.cc:(.text+0x447f): undefined reference toXapian::TermGenerator::~TermGenerator()' /usr/bin/ld: notdeft-xapian.cc:(.text+0x4ba1): undefined reference to Xapian::Document::~Document()' /usr/bin/ld: notdeft-xapian.cc:(.text+0x4cdb): undefined reference toXapian::WritableDatabase::~WritableDatabase()' /usr/bin/ld: notdeft-xapian.cc:(.text+0x4d4b): undefined reference to Xapian::Stem::~Stem()' /usr/bin/ld: notdeft-xapian.cc:(.text+0x4d62): undefined reference toXapian::TermGenerator::~TermGenerator()' /usr/bin/ld: notdeft-xapian.cc:(.text+0x4da0): undefined reference to Xapian::Error::get_description[abi:cxx11]() const' /usr/bin/ld: /tmp/cc6J1852.o: in functiondoSearch(std::vector<std::cxx11::basic_string<char, std::char_traits, std::allocator >, std::allocator<std::cxx11::basic_string<char, std::char_traits, std::allocator > > >)': notdeft-xapian.cc:(.text+0x5c64): undefined reference to Xapian::Database::Database()' /usr/bin/ld: notdeft-xapian.cc:(.text+0x5dbf): undefined reference toXapian::Database::Database(std::cxx11::basic_string<char, std::char_traits, std::allocator > const&, int)' /usr/bin/ld: notdeft-xapian.cc:(.text+0x5dd8): undefined reference to Xapian::Database::add_database(Xapian::Database const&)' /usr/bin/ld: notdeft-xapian.cc:(.text+0x5dee): undefined reference toXapian::Database::~Database()' /usr/bin/ld: notdeft-xapian.cc:(.text+0x5e52): undefined reference to Xapian::Enquire::Enquire(Xapian::Database const&)' /usr/bin/ld: notdeft-xapian.cc:(.text+0x5e74): undefined reference toXapian::Enquire::set_sort_by_value(unsigned int, bool)' /usr/bin/ld: notdeft-xapian.cc:(.text+0x5e98): undefined reference to Xapian::Enquire::set_sort_by_value(unsigned int, bool)' /usr/bin/ld: notdeft-xapian.cc:(.text+0x5ea7): undefined reference toXapian::QueryParser::QueryParser()' /usr/bin/ld: notdeft-xapian.cc:(.text+0x5f1f): undefined reference to `Xapian::QueryParser::add_prefix(std::cxx11::basic_string<char, std::char_traits, std::allocator > const&, std::cxx11::basic_string<char, std::char_traits, std::allocator > const&)' /usr/bin/ld: notdeft-xapian.cc:(.text+0x5fd3): undefined reference to Xapian::QueryParser::add_prefix(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)' /usr/bin/ld: notdeft-xapian.cc:(.text+0x6087): undefined reference toXapian::QueryParser::add_prefix(std::cxx11::basic_string<char, std::char_traits, std::allocator > const&, std::cxx11::basic_string<char, std::char_traits, std::allocator > const&)' /usr/bin/ld: notdeft-xapian.cc:(.text+0x613b): undefined reference to Xapian::QueryParser::add_prefix(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)' /usr/bin/ld: notdeft-xapian.cc:(.text+0x619b): undefined reference toXapian::Stem::Stem(std::cxx11::basic_string<char, std::char_traits, std::allocator > const&)' /usr/bin/ld: notdeft-xapian.cc:(.text+0x61da): undefined reference to Xapian::Query::MatchAll' /usr/bin/ld: notdeft-xapian.cc:(.text+0x6200): undefined reference toXapian::QueryParser::set_stemmer(Xapian::Stem const&)' /usr/bin/ld: notdeft-xapian.cc:(.text+0x6219): undefined reference to Xapian::QueryParser::set_database(Xapian::Database const&)' /usr/bin/ld: notdeft-xapian.cc:(.text+0x622d): undefined reference toXapian::QueryParser::set_stemming_strategy(Xapian::QueryParser::stem_strategy)' /usr/bin/ld: notdeft-xapian.cc:(.text+0x62c2): undefined reference to `Xapian::QueryParser::parse_query(std::cxx11::basic_string<char, std::char_traits, std::allocator > const&, unsigned int, std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&)' /usr/bin/ld: notdeft-xapian.cc:(.text+0x6331): undefined reference to Xapian::Query::get_description[abi:cxx11]() const' /usr/bin/ld: notdeft-xapian.cc:(.text+0x6385): undefined reference toXapian::Enquire::set_query(Xapian::Query const&, unsigned int)' /usr/bin/ld: notdeft-xapian.cc:(.text+0x639d): undefined reference to Xapian::Database::get_doccount() const' /usr/bin/ld: notdeft-xapian.cc:(.text+0x63e0): undefined reference toXapian::Enquire::get_mset(unsigned int, unsigned int, unsigned int, Xapian::RSet const, Xapian::MatchDecider const) const' /usr/bin/ld: notdeft-xapian.cc:(.text+0x6463): undefined reference to Xapian::MSetIterator::get_document() const' /usr/bin/ld: notdeft-xapian.cc:(.text+0x647c): undefined reference toXapian::Document::get_data[abi:cxx11]() const' /usr/bin/ld: notdeft-xapian.cc:(.text+0x64c5): undefined reference to Xapian::Document::~Document()' /usr/bin/ld: notdeft-xapian.cc:(.text+0x64f7): undefined reference toXapian::MSet::~MSet()' /usr/bin/ld: notdeft-xapian.cc:(.text+0x6515): undefined reference to Xapian::Stem::~Stem()' /usr/bin/ld: notdeft-xapian.cc:(.text+0x6524): undefined reference toXapian::QueryParser::~QueryParser()' /usr/bin/ld: notdeft-xapian.cc:(.text+0x6533): undefined reference to Xapian::Enquire::~Enquire()' /usr/bin/ld: notdeft-xapian.cc:(.text+0x656b): undefined reference toXapian::Database::~Database()' /usr/bin/ld: notdeft-xapian.cc:(.text+0x6b65): undefined reference to Xapian::Database::~Database()' /usr/bin/ld: notdeft-xapian.cc:(.text+0x6d71): undefined reference toXapian::Document::~Document()' /usr/bin/ld: notdeft-xapian.cc:(.text+0x6d9f): undefined reference to Xapian::MSet::~MSet()' /usr/bin/ld: notdeft-xapian.cc:(.text+0x6dc5): undefined reference toXapian::Stem::~Stem()' /usr/bin/ld: notdeft-xapian.cc:(.text+0x6ddc): undefined reference to Xapian::QueryParser::~QueryParser()' /usr/bin/ld: notdeft-xapian.cc:(.text+0x6df3): undefined reference toXapian::Enquire::~Enquire()' /usr/bin/ld: notdeft-xapian.cc:(.text+0x6e21): undefined reference to Xapian::Database::~Database()' /usr/bin/ld: notdeft-xapian.cc:(.text+0x6e5f): undefined reference toXapian::Error::get_description[abi:cxx11]() const' /usr/bin/ld: /tmp/cc6J1852.o: in function `doDump(std::vector<std::cxx11::basic_string<char, std::char_traits, std::allocator >, std::allocator<std::cxx11::basic_string<char, std::char_traits, std::allocator > > >)': notdeft-xapian.cc:(.text+0x7361): undefined reference to `Xapian::Database::Database(std::cxx11::basic_string<char, std::char_traits, std::allocator > const&, int)' /usr/bin/ld: notdeft-xapian.cc:(.text+0x7390): undefined reference to Xapian::Database::metadata_keys_begin(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const' /usr/bin/ld: notdeft-xapian.cc:(.text+0x7428): undefined reference toXapian::TermIterator::operator[abi:cxx11]() const' /usr/bin/ld: notdeft-xapian.cc:(.text+0x7448): undefined reference to Xapian::Database::get_metadata(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const' /usr/bin/ld: notdeft-xapian.cc:(.text+0x7537): undefined reference toXapian::Database::allterms_begin(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&) const' /usr/bin/ld: notdeft-xapian.cc:(.text+0x75e5): undefined reference to `Xapian::TermIterator::operator[abi:cxx11]() const' /usr/bin/ld: notdeft-xapian.cc:(.text+0x766b): undefined reference to Xapian::Database::~Database()' /usr/bin/ld: notdeft-xapian.cc:(.text+0x7890): undefined reference toXapian::Database::~Database()' /usr/bin/ld: notdeft-xapian.cc:(.text+0x7917): undefined reference to Xapian::Error::get_description[abi:cxx11]() const' /usr/bin/ld: /tmp/cc6J1852.o: in functionXapian::PostingIterator::~PostingIterator()': notdeft-xapian.cc:(.text._ZN6Xapian15PostingIteratorD2Ev[_ZN6Xapian15PostingIteratorD5Ev]+0x20): undefined reference to Xapian::PostingIterator::decref()' /usr/bin/ld: /tmp/cc6J1852.o: in functionXapian::TermIterator::~TermIterator()': notdeft-xapian.cc:(.text._ZN6Xapian12TermIteratorD2Ev[_ZN6Xapian12TermIteratorD5Ev]+0x20): undefined reference to Xapian::TermIterator::decref()' /usr/bin/ld: /tmp/cc6J1852.o: in functionXapian::TermIterator::operator++abi:cxx11': notdeft-xapian.cc:(.text._ZN6Xapian12TermIteratorppB5cxx11Ei[_ZN6Xapian12TermIteratorppB5cxx11Ei]+0x32): undefined reference to Xapian::TermIterator::operator*[abi:cxx11]() const' /usr/bin/ld: notdeft-xapian.cc:(.text._ZN6Xapian12TermIteratorppB5cxx11Ei[_ZN6Xapian12TermIteratorppB5cxx11Ei]+0x46): undefined reference toXapian::TermIterator::operator++()' /usr/bin/ld: /tmp/cc6J1852.o: in function Xapian::TermGenerator::index_text(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, unsigned int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)': notdeft-xapian.cc:(.text._ZN6Xapian13TermGenerator10index_textERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEjS8_[_ZN6Xapian13TermGenerator10index_textERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEjS8_]+0x4c): undefined reference toXapian::TermGenerator::index_text(Xapian::Utf8Iterator const&, unsigned int, std::cxx11::basic_string<char, std::char_traits, std::allocator > const&)' /usr/bin/ld: /tmp/cc6J1852.o: in function `Xapian::TermGenerator::index_text_without_positions(std::cxx11::basic_string<char, std::char_traits, std::allocator > const&, unsigned int, std::cxx11::basic_string<char, std::char_traits, std::allocator > const&)': notdeft-xapian.cc:(.text._ZN6Xapian13TermGenerator28index_text_without_positionsERKNSt7__cxx1112basic_stringIcSt11chartraitsIcESaIcEEEjS8[_ZN6Xapian13TermGenerator28index_text_without_positionsERKNSt7cxx1112basic_stringIcSt11chartraitsIcESaIcEEEjS8]+0x4c): undefined reference to Xapian::TermGenerator::index_text_without_positions(Xapian::Utf8Iterator const&, unsigned int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)' /usr/bin/ld: /tmp/cc6J1852.o: in functionXapian::MSetIterator::MSetIterator(Xapian::MSet const&, unsigned int)': notdeft-xapian.cc:(.text._ZN6Xapian12MSetIteratorC2ERKNS_4MSetEj[_ZN6Xapian12MSetIteratorC5ERKNS_4MSetEj]+0x22): undefined reference to Xapian::MSet::MSet(Xapian::MSet const&)' /usr/bin/ld: /tmp/cc6J1852.o: in functionXapian::MSetIterator::~MSetIterator()': notdeft-xapian.cc:(.text._ZN6Xapian12MSetIteratorD2Ev[_ZN6Xapian12MSetIteratorD5Ev]+0x14): undefined reference to Xapian::MSet::~MSet()' /usr/bin/ld: /tmp/cc6J1852.o: in functionXapian::MSet::begin() const': notdeft-xapian.cc:(.text._ZNK6Xapian4MSet5beginEv[_ZNK6Xapian4MSet5beginEv]+0x18): undefined reference to `Xapian::MSet::size() const' collect2: error: ld returned 1 exit status

hasu commented 5 years ago

In your case it doesn't get that far. How about cat output.map

Do you even have the Xapian library binary? ls -l /usr/lib/x86_64-linux-gnu/libxapian.so

anthrolisp commented 5 years ago

I appreciate your help with this. I wish I knew more!

cat output.map

The output is too many characters to post here or Pastebin! What should I be looking for?

ls -l /usr/lib/x86_64-linux-gnu/libxapian.so

lrwxrwxrwx 1 root root 19 Jul 26 2018 /usr/lib/x86_64-linux-gnu/libxapian.so -> libxapian.so.30.5.1 lrwxrwxrwx 1 root root 19 Jul 26 2018 /usr/lib/x86_64-linux-gnu/libxapian.so.30 -> libxapian.so.30.5.1 -rw-r--r-- 1 root root 2223696 Jul 26 2018 /usr/lib/x86_64-linux-gnu/libxapian.so.30.5.1

anthrolisp commented 5 years ago

cat output.map attached. catoutput.txt

anthrolisp commented 5 years ago

I uninstalled through the official package manager. Installed xapian by source, without error. Then, retried making notdeft-xapian, same errors.

I might just switch to a non Ubuntu based distro.

hasu commented 5 years ago

Looking at the ld output it seems that the linker does load libxapian.so, and finds many Xapian symbols from there, but not nearly all, hence the numerous errors. That suggests that it could indeed be an ABI mismatch, as suspected.

You're using GCC 8.2 as your C++ compiler, which is quite new, bleeding edge, even. Is that the default on Ubuntu 18.04? I would try with GCC 6 or 7, if those are available for installation on Ubuntu 18.04. Perhaps they are a better match for Ubuntu's libxapian.so.

anthrolisp commented 5 years ago

Before receiving your latest message, I uninstalled GCC 8.2 through the package manager, and tried installing it from source. Unfortunately, I was successful because now I cannot uninstall it. There's no make uninstall. I did install GCC 6, and tried to setting it as as the default through update-alternatives. When I compile now, it starts with a different set of errors, then follows with what appears to be the same. It seems to be reverting back to GCC 8. I'll come back to this on 3/11, and fix it one way or another! I'm determined to install notdeft! :-)

g++ -o notdeft-xapian -std=c++11 -Wall pkg-config --cflags --libs tclap xapian-config --cxxflags --libs notdeft-xapian.cc In file included from /usr/include/xapian.h:44:0, from notdeft-xapian.cc:10: /usr/include/xapian/version.h:29:2: warning: #warning The C++ ABI version of compiler you are using does not exactly match [-Wcpp]

warning The C++ ABI version of compiler you are using does not exactly match

^~~ /usr/include/xapian/version.h:30:2: warning: #warning that of the compiler used to build the library. If linking fails [-Wcpp]

warning that of the compiler used to build the library. If linking fails

^~~ /usr/include/xapian/version.h:31:2: warning: #warning due to missing symbols, this is probably the reason why. [-Wcpp]

warning due to missing symbols, this is probably the reason why.

^~~ /usr/include/xapian/version.h:32:2: warning: #warning The Xapian library was built with g++ 8.2.0 [-Wcpp]

warning The Xapian library was built with g++ 8.2.0

^~~ /usr/bin/x86_64-linux-gnu-ld: /tmp/ccWFIQKh.o: in function doIndex(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> > > >)::{lambda(std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, long> const&)#1}::operator()(std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, long> const&) const': notdeft-xapian.cc:(.text+0x18b7): undefined reference toXapian::Document::Document()' /usr/bin/x86_64-linux-gnu-ld: notdeft-xapian.cc:(.text+0x18d0): undefined reference to Xapian::Document::set_data(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)' /usr/bin/x86_64-linux-gnu-ld: notdeft-xapian.cc:(.text+0x1908): undefined reference toXapian::Document::add_value(unsigned int, std::cxx11::basic_string<char, std::char_traits, std::allocator > const&)' /usr/bin/x86_64-linux-gnu-ld: notdeft-xapian.cc:(.text+0x194b): undefined reference to `Xapian::Document::add_value(unsigned int, std::cxx11::basic_string<char, std::char_traits, std::allocator > const&)' /usr/bin/x86_64-linux-gnu-ld: notdeft-xapian.cc:(.text+0x1967): undefined reference to Xapian::TermGenerator::set_document(Xapian::Document const&)' /usr/bin/x86_64-linux-gnu-ld: notdeft-xapian.cc:(.text+0x1cbf): undefined reference toXapian::TermGenerator::increase_termpos(unsigned int)' /usr/bin/x86_64-linux-gnu-ld: notdeft-xapian.cc:(.text+0x1f00): undefined reference to Xapian::TermGenerator::increase_termpos(unsigned int)' /usr/bin/x86_64-linux-gnu-ld: notdeft-xapian.cc:(.text+0x213c): undefined reference toXapian::TermGenerator::increase_termpos(unsigned int)' /usr/bin/x86_64-linux-gnu-ld: notdeft-xapian.cc:(.text+0x23f0): undefined reference to Xapian::Document::~Document()' /usr/bin/x86_64-linux-gnu-ld: /tmp/ccWFIQKh.o: in functiondoIndex(std::vector<std::cxx11::basic_string<char, std::char_traits, std::allocator >, std::allocator<std::cxx11::basic_string<char, std::char_traits, std::allocator > > >)::{lambda(std::pair<std::cxx11::basic_string<char, std::char_traits, std::allocator >, long> const&)#2}::operator()(std::pair<std::cxx11::basic_string<char, std::char_traits, std::allocator >, long> const&) const': notdeft-xapian.cc:(.text+0x24bd): undefined reference to Xapian::WritableDatabase::add_document(Xapian::Document const&)' /usr/bin/x86_64-linux-gnu-ld: notdeft-xapian.cc:(.text+0x24c9): undefined reference toXapian::Document::~Document()' /usr/bin/x86_64-linux-gnu-ld: notdeft-xapian.cc:(.text+0x24ea): undefined reference to Xapian::Document::~Document()' /usr/bin/x86_64-linux-gnu-ld: /tmp/ccWFIQKh.o: in functiondoIndex(std::vector<std::cxx11::basic_string<char, std::char_traits, std::allocator >, std::allocator<std::cxx11::basic_string<char, std::char_traits, std::allocator > > >)::{lambda(std::pair<std::cxx11::basic_string<char, std::char_traits, std::allocator >, long> const&, unsigned int)#3}::operator()(std::pair<std::cxx11::basic_string<char, std::char_traits, std::allocator >, long> const&, unsigned int) const': notdeft-xapian.cc:(.text+0x259e): undefined reference to Xapian::WritableDatabase::replace_document(unsigned int, Xapian::Document const&)' /usr/bin/x86_64-linux-gnu-ld: notdeft-xapian.cc:(.text+0x25aa): undefined reference toXapian::Document::~Document()' /usr/bin/x86_64-linux-gnu-ld: notdeft-xapian.cc:(.text+0x25cb): undefined reference to Xapian::Document::~Document()' /usr/bin/x86_64-linux-gnu-ld: /tmp/ccWFIQKh.o: in functiondoIndex(std::vector<std::cxx11::basic_string<char, std::char_traits, std::allocator >, std::allocator<std::cxx11::basic_string<char, std::char_traits, std::allocator > > >)::{lambda(std::pair<std::cxx11::basic_string<char, std::char_traits, std::allocator >, long> const&)#4}::operator()(std::pair<std::cxx11::basic_string<char, std::char_traits, std::allocator >, long> const&) const': notdeft-xapian.cc:(.text+0x2669): undefined reference to Xapian::WritableDatabase::delete_document(unsigned int)' /usr/bin/x86_64-linux-gnu-ld: /tmp/ccWFIQKh.o: in functiondoIndex(std::vector<std::cxx11::basic_string<char, std::char_traits, std::allocator >, std::allocator<std::cxx11::basic_string<char, std::char_traits, std::allocator > > >)': notdeft-xapian.cc:(.text+0x382b): undefined reference to Xapian::TermGenerator::TermGenerator()' /usr/bin/x86_64-linux-gnu-ld: notdeft-xapian.cc:(.text+0x384f): undefined reference toXapian::Stem::Stem(std::cxx11::basic_string<char, std::char_traits, std::allocator > const&)' /usr/bin/x86_64-linux-gnu-ld: notdeft-xapian.cc:(.text+0x3868): undefined reference to Xapian::TermGenerator::set_stemmer(Xapian::Stem const&)' /usr/bin/x86_64-linux-gnu-ld: notdeft-xapian.cc:(.text+0x3a5f): undefined reference toXapian::WritableDatabase::WritableDatabase(std::cxx11::basic_string<char, std::char_traits, std::allocator > const&, int, int)' /usr/bin/x86_64-linux-gnu-ld: notdeft-xapian.cc:(.text+0x3c4e): undefined reference to Xapian::WritableDatabase::begin_transaction(bool)' /usr/bin/x86_64-linux-gnu-ld: notdeft-xapian.cc:(.text+0x3c9a): undefined reference toXapian::Database::postlist_begin(std::cxx11::basic_string<char, std::char_traits, std::allocator > const&) const' /usr/bin/x86_64-linux-gnu-ld: notdeft-xapian.cc:(.text+0x3d63): undefined reference to Xapian::PostingIterator::operator*() const' /usr/bin/x86_64-linux-gnu-ld: notdeft-xapian.cc:(.text+0x3d88): undefined reference toXapian::Database::get_document(unsigned int) const' /usr/bin/x86_64-linux-gnu-ld: notdeft-xapian.cc:(.text+0x3da1): undefined reference to Xapian::Document::get_data[abi:cxx11]() const' /usr/bin/x86_64-linux-gnu-ld: notdeft-xapian.cc:(.text+0x3dbf): undefined reference toXapian::Document::get_value[abi:cxx11](unsigned int) const' /usr/bin/x86_64-linux-gnu-ld: notdeft-xapian.cc:(.text+0x3e4c): undefined reference to Xapian::Document::~Document()' /usr/bin/x86_64-linux-gnu-ld: notdeft-xapian.cc:(.text+0x3e5b): undefined reference toXapian::PostingIterator::operator++()' /usr/bin/x86_64-linux-gnu-ld: notdeft-xapian.cc:(.text+0x43bc): undefined reference to Xapian::WritableDatabase::commit_transaction()' /usr/bin/x86_64-linux-gnu-ld: notdeft-xapian.cc:(.text+0x4407): undefined reference toXapian::WritableDatabase::~WritableDatabase()' /usr/bin/x86_64-linux-gnu-ld: notdeft-xapian.cc:(.text+0x4457): undefined reference to Xapian::Stem::~Stem()' /usr/bin/x86_64-linux-gnu-ld: notdeft-xapian.cc:(.text+0x4466): undefined reference toXapian::TermGenerator::~TermGenerator()' /usr/bin/x86_64-linux-gnu-ld: notdeft-xapian.cc:(.text+0x4b88): undefined reference to Xapian::Document::~Document()' /usr/bin/x86_64-linux-gnu-ld: notdeft-xapian.cc:(.text+0x4cc2): undefined reference toXapian::WritableDatabase::~WritableDatabase()' /usr/bin/x86_64-linux-gnu-ld: notdeft-xapian.cc:(.text+0x4d32): undefined reference to Xapian::Stem::~Stem()' /usr/bin/x86_64-linux-gnu-ld: notdeft-xapian.cc:(.text+0x4d49): undefined reference toXapian::TermGenerator::~TermGenerator()' /usr/bin/x86_64-linux-gnu-ld: notdeft-xapian.cc:(.text+0x4d87): undefined reference to Xapian::Error::get_description[abi:cxx11]() const' /usr/bin/x86_64-linux-gnu-ld: /tmp/ccWFIQKh.o: in functiondoSearch(std::vector<std::cxx11::basic_string<char, std::char_traits, std::allocator >, std::allocator<std::cxx11::basic_string<char, std::char_traits, std::allocator > > >)': notdeft-xapian.cc:(.text+0x5c4b): undefined reference to Xapian::Database::Database()' /usr/bin/x86_64-linux-gnu-ld: notdeft-xapian.cc:(.text+0x5da6): undefined reference toXapian::Database::Database(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, int)' /usr/bin/x86_64-linux-gnu-ld: notdeft-xapian.cc:(.text+0x5dbf): undefined reference to Xapian::Database::add_database(Xapian::Database const&)' /usr/bin/x86_64-linux-gnu-ld: notdeft-xapian.cc:(.text+0x5dd5): undefined reference toXapian::Database::~Database()' /usr/bin/x86_64-linux-gnu-ld: notdeft-xapian.cc:(.text+0x5e39): undefined reference to Xapian::Enquire::Enquire(Xapian::Database const&)' /usr/bin/x86_64-linux-gnu-ld: notdeft-xapian.cc:(.text+0x5e5b): undefined reference toXapian::Enquire::set_sort_by_value(unsigned int, bool)' /usr/bin/x86_64-linux-gnu-ld: notdeft-xapian.cc:(.text+0x5e7f): undefined reference to Xapian::Enquire::set_sort_by_value(unsigned int, bool)' /usr/bin/x86_64-linux-gnu-ld: notdeft-xapian.cc:(.text+0x5e8e): undefined reference toXapian::QueryParser::QueryParser()' /usr/bin/x86_64-linux-gnu-ld: notdeft-xapian.cc:(.text+0x5f06): undefined reference to `Xapian::QueryParser::add_prefix(std::cxx11::basic_string<char, std::char_traits, std::allocator > const&, std::cxx11::basic_string<char, std::char_traits, std::allocator > const&)' /usr/bin/x86_64-linux-gnu-ld: notdeft-xapian.cc:(.text+0x5fba): undefined reference to `Xapian::QueryParser::add_prefix(std::cxx11::basic_string<char, std::char_traits, std::allocator > const&, std::cxx11::basic_string<char, std::char_traits, std::allocator > const&)' /usr/bin/x86_64-linux-gnu-ld: notdeft-xapian.cc:(.text+0x606e): undefined reference to `Xapian::QueryParser::add_prefix(std::cxx11::basic_string<char, std::char_traits, std::allocator > const&, std::cxx11::basic_string<char, std::char_traits, std::allocator > const&)' /usr/bin/x86_64-linux-gnu-ld: notdeft-xapian.cc:(.text+0x6122): undefined reference to `Xapian::QueryParser::add_prefix(std::cxx11::basic_string<char, std::char_traits, std::allocator > const&, std::cxx11::basic_string<char, std::char_traits, std::allocator > const&)' /usr/bin/x86_64-linux-gnu-ld: notdeft-xapian.cc:(.text+0x6182): undefined reference to Xapian::Stem::Stem(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)' /usr/bin/x86_64-linux-gnu-ld: notdeft-xapian.cc:(.text+0x61c1): undefined reference toXapian::Query::MatchAll' /usr/bin/x86_64-linux-gnu-ld: notdeft-xapian.cc:(.text+0x61e7): undefined reference to Xapian::QueryParser::set_stemmer(Xapian::Stem const&)' /usr/bin/x86_64-linux-gnu-ld: notdeft-xapian.cc:(.text+0x6200): undefined reference toXapian::QueryParser::set_database(Xapian::Database const&)' /usr/bin/x86_64-linux-gnu-ld: notdeft-xapian.cc:(.text+0x6214): undefined reference to Xapian::QueryParser::set_stemming_strategy(Xapian::QueryParser::stem_strategy)' /usr/bin/x86_64-linux-gnu-ld: notdeft-xapian.cc:(.text+0x62a9): undefined reference toXapian::QueryParser::parse_query(std::cxx11::basic_string<char, std::char_traits, std::allocator > const&, unsigned int, std::cxx11::basic_string<char, std::char_traits, std::allocator > const&)' /usr/bin/x86_64-linux-gnu-ld: notdeft-xapian.cc:(.text+0x6302): undefined reference to Xapian::Query::get_description[abi:cxx11]() const' /usr/bin/x86_64-linux-gnu-ld: notdeft-xapian.cc:(.text+0x636c): undefined reference toXapian::Enquire::set_query(Xapian::Query const&, unsigned int)' /usr/bin/x86_64-linux-gnu-ld: notdeft-xapian.cc:(.text+0x6384): undefined reference to Xapian::Database::get_doccount() const' /usr/bin/x86_64-linux-gnu-ld: notdeft-xapian.cc:(.text+0x63c7): undefined reference toXapian::Enquire::get_mset(unsigned int, unsigned int, unsigned int, Xapian::RSet const, Xapian::MatchDecider const) const' /usr/bin/x86_64-linux-gnu-ld: notdeft-xapian.cc:(.text+0x644a): undefined reference to Xapian::MSetIterator::get_document() const' /usr/bin/x86_64-linux-gnu-ld: notdeft-xapian.cc:(.text+0x6463): undefined reference toXapian::Document::get_data[abi:cxx11]() const' /usr/bin/x86_64-linux-gnu-ld: notdeft-xapian.cc:(.text+0x64ac): undefined reference to Xapian::Document::~Document()' /usr/bin/x86_64-linux-gnu-ld: notdeft-xapian.cc:(.text+0x64de): undefined reference toXapian::MSet::~MSet()' /usr/bin/x86_64-linux-gnu-ld: notdeft-xapian.cc:(.text+0x64fc): undefined reference to Xapian::Stem::~Stem()' /usr/bin/x86_64-linux-gnu-ld: notdeft-xapian.cc:(.text+0x650b): undefined reference toXapian::QueryParser::~QueryParser()' /usr/bin/x86_64-linux-gnu-ld: notdeft-xapian.cc:(.text+0x651a): undefined reference to Xapian::Enquire::~Enquire()' /usr/bin/x86_64-linux-gnu-ld: notdeft-xapian.cc:(.text+0x6553): undefined reference toXapian::Database::~Database()' /usr/bin/x86_64-linux-gnu-ld: notdeft-xapian.cc:(.text+0x6b4e): undefined reference to Xapian::Database::~Database()' /usr/bin/x86_64-linux-gnu-ld: notdeft-xapian.cc:(.text+0x6d5a): undefined reference toXapian::Document::~Document()' /usr/bin/x86_64-linux-gnu-ld: notdeft-xapian.cc:(.text+0x6d88): undefined reference to Xapian::MSet::~MSet()' /usr/bin/x86_64-linux-gnu-ld: notdeft-xapian.cc:(.text+0x6dae): undefined reference toXapian::Stem::~Stem()' /usr/bin/x86_64-linux-gnu-ld: notdeft-xapian.cc:(.text+0x6dc5): undefined reference to Xapian::QueryParser::~QueryParser()' /usr/bin/x86_64-linux-gnu-ld: notdeft-xapian.cc:(.text+0x6ddc): undefined reference toXapian::Enquire::~Enquire()' /usr/bin/x86_64-linux-gnu-ld: notdeft-xapian.cc:(.text+0x6e0a): undefined reference to Xapian::Database::~Database()' /usr/bin/x86_64-linux-gnu-ld: notdeft-xapian.cc:(.text+0x6e48): undefined reference toXapian::Error::get_description[abi:cxx11]() const' /usr/bin/x86_64-linux-gnu-ld: /tmp/ccWFIQKh.o: in function `doDump(std::vector<std::cxx11::basic_string<char, std::char_traits, std::allocator >, std::allocator<std::cxx11::basic_string<char, std::char_traits, std::allocator > > >)': notdeft-xapian.cc:(.text+0x734a): undefined reference to `Xapian::Database::Database(std::cxx11::basic_string<char, std::char_traits, std::allocator > const&, int)' /usr/bin/x86_64-linux-gnu-ld: notdeft-xapian.cc:(.text+0x7379): undefined reference to Xapian::Database::metadata_keys_begin(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const' /usr/bin/x86_64-linux-gnu-ld: notdeft-xapian.cc:(.text+0x7411): undefined reference toXapian::TermIterator::operator[abi:cxx11]() const' /usr/bin/x86_64-linux-gnu-ld: notdeft-xapian.cc:(.text+0x7431): undefined reference to Xapian::Database::get_metadata(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const' /usr/bin/x86_64-linux-gnu-ld: notdeft-xapian.cc:(.text+0x7520): undefined reference toXapian::Database::allterms_begin(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&) const' /usr/bin/x86_64-linux-gnu-ld: notdeft-xapian.cc:(.text+0x75b8): undefined reference to `Xapian::TermIterator::operator[abi:cxx11]() const' /usr/bin/x86_64-linux-gnu-ld: notdeft-xapian.cc:(.text+0x7654): undefined reference to Xapian::Database::~Database()' /usr/bin/x86_64-linux-gnu-ld: notdeft-xapian.cc:(.text+0x7879): undefined reference toXapian::Database::~Database()' /usr/bin/x86_64-linux-gnu-ld: notdeft-xapian.cc:(.text+0x7900): undefined reference to Xapian::Error::get_description[abi:cxx11]() const' /usr/bin/x86_64-linux-gnu-ld: /tmp/ccWFIQKh.o: in functionXapian::PostingIterator::~PostingIterator()': notdeft-xapian.cc:(.text._ZN6Xapian15PostingIteratorD2Ev[_ZN6Xapian15PostingIteratorD5Ev]+0x20): undefined reference to Xapian::PostingIterator::decref()' /usr/bin/x86_64-linux-gnu-ld: /tmp/ccWFIQKh.o: in functionXapian::TermIterator::~TermIterator()': notdeft-xapian.cc:(.text._ZN6Xapian12TermIteratorD2Ev[_ZN6Xapian12TermIteratorD5Ev]+0x20): undefined reference to Xapian::TermIterator::decref()' /usr/bin/x86_64-linux-gnu-ld: /tmp/ccWFIQKh.o: in functionXapian::TermIterator::operator++abi:cxx11': notdeft-xapian.cc:(.text._ZN6Xapian12TermIteratorppB5cxx11Ei[_ZN6Xapian12TermIteratorppB5cxx11Ei]+0x32): undefined reference to Xapian::TermIterator::operator*[abi:cxx11]() const' /usr/bin/x86_64-linux-gnu-ld: notdeft-xapian.cc:(.text._ZN6Xapian12TermIteratorppB5cxx11Ei[_ZN6Xapian12TermIteratorppB5cxx11Ei]+0x46): undefined reference toXapian::TermIterator::operator++()' /usr/bin/x86_64-linux-gnu-ld: /tmp/ccWFIQKh.o: in function Xapian::TermGenerator::index_text(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, unsigned int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)': notdeft-xapian.cc:(.text._ZN6Xapian13TermGenerator10index_textERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEjS8_[_ZN6Xapian13TermGenerator10index_textERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEjS8_]+0x4c): undefined reference toXapian::TermGenerator::index_text(Xapian::Utf8Iterator const&, unsigned int, std::cxx11::basic_string<char, std::char_traits, std::allocator > const&)' /usr/bin/x86_64-linux-gnu-ld: /tmp/ccWFIQKh.o: in function `Xapian::TermGenerator::index_text_without_positions(std::cxx11::basic_string<char, std::char_traits, std::allocator > const&, unsigned int, std::cxx11::basic_string<char, std::char_traits, std::allocator > const&)': notdeft-xapian.cc:(.text._ZN6Xapian13TermGenerator28index_text_without_positionsERKNSt7cxx1112basic_stringIcSt11chartraitsIcESaIcEEEjS8[_ZN6Xapian13TermGenerator28index_text_without_positionsERKNSt7cxx1112basic_stringIcSt11chartraitsIcESaIcEEEjS8]+0x4c): undefined reference to `Xapian::TermGenerator::index_text_without_positions(Xapian::Utf8Iterator const&, unsigned int, std::cxx11::basic_string<char, std::char_traits, std::allocator > const&)' /usr/bin/x86_64-linux-gnu-ld: /tmp/ccWFIQKh.o: in function Xapian::MSetIterator::MSetIterator(Xapian::MSet const&, unsigned int)': notdeft-xapian.cc:(.text._ZN6Xapian12MSetIteratorC2ERKNS_4MSetEj[_ZN6Xapian12MSetIteratorC5ERKNS_4MSetEj]+0x22): undefined reference toXapian::MSet::MSet(Xapian::MSet const&)' /usr/bin/x86_64-linux-gnu-ld: /tmp/ccWFIQKh.o: in function Xapian::MSetIterator::~MSetIterator()': notdeft-xapian.cc:(.text._ZN6Xapian12MSetIteratorD2Ev[_ZN6Xapian12MSetIteratorD5Ev]+0x14): undefined reference toXapian::MSet::~MSet()' /usr/bin/x86_64-linux-gnu-ld: /tmp/ccWFIQKh.o: in function Xapian::MSet::begin() const': notdeft-xapian.cc:(.text._ZNK6Xapian4MSet5beginEv[_ZNK6Xapian4MSet5beginEv]+0x18): undefined reference toXapian::MSet::size() const' collect2: error: ld returned 1 exit status make: *** [Makefile:10: notdeft-xapian] Error 1

anthrolisp commented 5 years ago

What OS do you use?

anthrolisp commented 5 years ago

Some progress: Currently testing on Manjaro.

anthrolisp commented 5 years ago

I changed the xapian backend directory from "~/xapian/notdeft-xapian" to the full path "/home/NAME/xapian/notdeft-xapian" and it seems to be working!! Will try it on a full install now.

anthrolisp commented 5 years ago

Working! Thank you for all of your help!

hasu commented 5 years ago

You're right, the notdeft-xapian-program path cannot use the "~/" shorthand, since that path is not subjected to expansion by the shell. I'll amend the docs to say that more clearly. Thank you for pointing that out.

A resolution to the build problems on Ubuntu 18.04 shall continue to be unknown.

anthrolisp commented 4 years ago

Is this issue solved here now?

hasu commented 4 years ago

Let's assume so.