karlotness/tree-sitter.el

Can't compile python's binding

Opened this issue · 0 comments

I'm trying to compile python's language binding on Mac 10.15.4 (19E287) but encountered this error. Seems some headers are missing but I'm not sure what are they.

python/ 吉 > make dist
cc -fPIC -c -std=c99 -Iexternals/tree-sitter-python/src/ -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 -O2 -I../../externals/tree-sitter/lib/include -I../../includes/ -o externals/tree-sitter-python/src/parser.o externals/tree-sitter-python/src/parser.c
cc -fPIC -c -std=c99 -Iexternals/tree-sitter-python/src/ -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 -O2 -I../../externals/tree-sitter/lib/include -I../../includes/ -o lang-module.o lang-module.c
cc -fPIC -c -Iexternals/tree-sitter-python/src/ -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 -O2 -I../../externals/tree-sitter/lib/include -I../../includes/ -o externals/tree-sitter-python/src/scanner.o externals/tree-sitter-python/src/scanner.cc
cc -shared -fPIC  -o tree-sitter-lang-python-module.so externals/tree-sitter-python/src/parser.o lang-module.o externals/tree-sitter-python/src/scanner.o
Undefined symbols for architecture x86_64:
  "std::__1::__vector_base_common<true>::__throw_length_error() const", referenced from:
      _tree_sitter_python_external_scanner_scan in scanner.o
      void std::__1::vector<unsigned short, std::__1::allocator<unsigned short> >::__push_back_slow_path<unsigned short const>(unsigned short const&) in scanner.o
  "std::logic_error::logic_error(char const*)", referenced from:
      std::length_error::length_error(char const*) in scanner.o
  "std::length_error::~length_error()", referenced from:
      std::__1::__throw_length_error(char const*) in scanner.o
  "typeinfo for std::length_error", referenced from:
      std::__1::__throw_length_error(char const*) in scanner.o
  "vtable for std::length_error", referenced from:
      std::length_error::length_error(char const*) in scanner.o
  NOTE: a missing vtable usually means the first non-inline virtual member function has no definition.
  "operator delete(void*)", referenced from:
      _tree_sitter_python_external_scanner_create in scanner.o
      _tree_sitter_python_external_scanner_scan in scanner.o
      _tree_sitter_python_external_scanner_deserialize in scanner.o
      _tree_sitter_python_external_scanner_destroy in scanner.o
      void std::__1::vector<unsigned short, std::__1::allocator<unsigned short> >::__push_back_slow_path<unsigned short const>(unsigned short const&) in scanner.o
  "operator new(unsigned long)", referenced from:
      _tree_sitter_python_external_scanner_create in scanner.o
      _tree_sitter_python_external_scanner_scan in scanner.o
      _tree_sitter_python_external_scanner_deserialize in scanner.o
      void std::__1::vector<unsigned short, std::__1::allocator<unsigned short> >::__push_back_slow_path<unsigned short const>(unsigned short const&) in scanner.o
  "___cxa_allocate_exception", referenced from:
      std::__1::__throw_length_error(char const*) in scanner.o
  "___cxa_free_exception", referenced from:
      std::__1::__throw_length_error(char const*) in scanner.o
  "___cxa_throw", referenced from:
      std::__1::__throw_length_error(char const*) in scanner.o
  "___gxx_personality_v0", referenced from:
      _tree_sitter_python_external_scanner_create in scanner.o
      std::__1::__throw_length_error(char const*) in scanner.o
      Dwarf Exception Unwind Info (__eh_frame) in scanner.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: *** [tree-sitter-lang-python-module.so] Error 1