kpu / kenlm

KenLM: Faster and Smaller Language Model Queries
http://kheafield.com/code/kenlm/
Other
2.51k stars 511 forks source link

can't install the kenlm on mac #278

Open hhy12138 opened 4 years ago

hhy12138 commented 4 years ago

After i type in the 'make -j 4'. It gives the error in the picture. Who can help me? image

kpu commented 4 years ago

Include the full output as a file not a screenshot.
In any case it looks like your boost install is broken, probably different libraries than headers.

jxyecn commented 4 years ago

Hi, I met the same problem.

enviroment information:

OS: MacOS 10.15
boost: 1.72
gcc: 9.3

The command I ran is make -j 4.

[ 17%] Linking CXX shared library ../../lib/libkenlm_filter.dylib
Undefined symbols for architecture x86_64:
  "util::SeekOrThrow(int, unsigned long long)", referenced from:
      lm::ARPAOutput::Finish() in arpa_io.cc.o
  "util::WriteOrThrow(int, void const*, unsigned long)", referenced from:
      lm::ARPAOutput::ReserveForCounts(std::__1::fpos<__mbstate_t>) in arpa_io.cc.o
      lm::ARPAOutput::BeginLength(unsigned int) in arpa_io.cc.o
      lm::ARPAOutput::EndLength(unsigned int) in arpa_io.cc.o
      lm::ARPAOutput::Finish() in arpa_io.cc.o
      void lm::WriteCounts<util::FileStream>(util::FileStream&, std::__1::vector<unsigned long long, std::__1::allocator<unsigned long long> > const&) in arpa_io.cc.o
      lm::CountOutput::AddNGram(StringPiece const&) in phrase.cc.o
      lm::ARPAOutput::AddNGram(StringPiece const&) in phrase.cc.o
      ...
  "util::CreateOrThrow(char const*)", referenced from:
      lm::ARPAOutput::ARPAOutput(char const*, unsigned long) in arpa_io.cc.o
      lm::ARPAOutput::ARPAOutput(char const*, unsigned long) in arpa_io.cc.o
  "util::MallocOrThrow(unsigned long)", referenced from:
      lm::ARPAOutput::ARPAOutput(char const*, unsigned long) in arpa_io.cc.o
      lm::ARPAOutput::ARPAOutput(char const*, unsigned long) in arpa_io.cc.o
  "util::MurmurHashNative(void const*, unsigned long, unsigned long long)", referenced from:
      lm::phrase::detail::ConditionCommon::MakeGraph() in phrase.cc.o
      lm::phrase::ReadMultiple(std::__1::basic_istream<char, std::__1::char_traits<char> >&, lm::phrase::Substrings&) in phrase.cc.o
      void lm::phrase::Substrings::AddPhrase<std::__1::__wrap_iter<unsigned long long*> >(unsigned int, std::__1::__wrap_iter<unsigned long long*> const&, std::__1::__wrap_iter<unsigned long long*> const&) in phrase.cc.o
  "util::ToString(unsigned int, char*)", referenced from:
      void lm::WriteCounts<util::StringStream>(util::StringStream&, std::__1::vector<unsigned long long, std::__1::allocator<unsigned long long> > const&) in arpa_io.cc.o
      lm::ARPAOutput::BeginLength(unsigned int) in arpa_io.cc.o
      void lm::WriteCounts<util::FileStream>(util::FileStream&, std::__1::vector<unsigned long long, std::__1::allocator<unsigned long long> > const&) in arpa_io.cc.o
  "util::ToString(unsigned long long, char*)", referenced from:
      void lm::WriteCounts<util::StringStream>(util::StringStream&, std::__1::vector<unsigned long long, std::__1::allocator<unsigned long long> > const&) in arpa_io.cc.o
      void lm::WriteCounts<util::FileStream>(util::FileStream&, std::__1::vector<unsigned long long, std::__1::allocator<unsigned long long> > const&) in arpa_io.cc.o
  "util::Exception::Exception()", referenced from:
      lm::ARPAInputException::ARPAInputException(StringPiece const&) in arpa_io.cc.o
      lm::ARPAInputException::ARPAInputException(StringPiece const&) in arpa_io.cc.o
      lm::ARPAInputException::ARPAInputException(StringPiece const&, StringPiece const&) in arpa_io.cc.o
      lm::ARPAInputException::ARPAInputException(StringPiece const&, StringPiece const&) in arpa_io.cc.o
  "util::Exception::~Exception()", referenced from:
      lm::ARPAInputException::ARPAInputException(StringPiece const&) in arpa_io.cc.o
      lm::ARPAInputException::ARPAInputException(StringPiece const&) in arpa_io.cc.o
      lm::ARPAInputException::ARPAInputException(StringPiece const&, StringPiece const&) in arpa_io.cc.o
      lm::ARPAInputException::ARPAInputException(StringPiece const&, StringPiece const&) in arpa_io.cc.o
      lm::ARPAInputException::~ARPAInputException() in arpa_io.cc.o
      lm::ARPAInputException::~ARPAInputException() in arpa_io.cc.o
      lm::ARPAInputException::~ARPAInputException() in arpa_io.cc.o
      ...
  "util::scoped_fd::~scoped_fd()", referenced from:
      lm::ARPAOutput::ARPAOutput(char const*, unsigned long) in arpa_io.cc.o
      lm::ARPAOutput::ARPAOutput(char const*, unsigned long) in arpa_io.cc.o
  "typeinfo for util::Exception", referenced from:
      typeinfo for lm::ARPAInputException in arpa_io.cc.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [lib/libkenlm_filter.dylib] Error 1
make[1]: *** [lm/filter/CMakeFiles/kenlm_filter.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....