Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Struggling to install on MacOS with pre installed llvm #307

Open
gioxc88 opened this issue Nov 7, 2024 · 2 comments
Open

Struggling to install on MacOS with pre installed llvm #307

gioxc88 opened this issue Nov 7, 2024 · 2 comments

Comments

@gioxc88
Copy link

gioxc88 commented Nov 7, 2024

hello I wanted to ask if someone could be so kind to list all the commands necessary to install on MacOS (Sonoma 14.3)
I tried to follow the instruction on the website

and did the following

python build-and-run-tests.py

but it gets stuck here

LLVM build detected, but config/binder version has changed, perfoming a clean rebuild...
Download LLVM source...
cd /Users/gioxc88/develop/projects/QuantLibPython/binder/build && mkdir llvm-13.0.0.src && curl -LJ https://github.com/llvm/llvm-project/releases/download/llvmorg-13.0.0/llvm-13.0.0.src.tar.xz | tar --strip-components=1 -Jxom -C llvm-13.0.0.src && mv llvm-13.0.0.src /Users/gioxc88/develop/projects/QuantLibPython/binder/build/llvm-13.0.0
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100 43.3M  100 43.3M    0     0  4672k      0  0:00:09  0:00:09 --:--:-- 4696k

Download Clang source...
cd /Users/gioxc88/develop/projects/QuantLibPython/binder/build && mkdir clang-13.0.0.src && curl -LJ https://github.com/llvm/llvm-project/releases/download/llvmorg-13.0.0/clang-13.0.0.src.tar.xz | tar --strip-components=1 -Jxom -C clang-13.0.0.src && mv clang-13.0.0.src /Users/gioxc88/develop/projects/QuantLibPython/binder/build/llvm-13.0.0/tools/clang
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100 17.0M  100 17.0M    0     0  3371k      0  0:00:05  0:00:05 --:--:-- 4178k

Building tool: binder...
cd /Users/gioxc88/develop/projects/QuantLibPython/binder/build/llvm-13.0.0/llvm-13.0.0.macOS-14.3-arm64-arm-64bit.release && cmake -G Ninja -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_EH=1 -DLLVM_ENABLE_RTTI=ON  .. && ninja binder tools/clang/lib/Headers/clang-resource-headers clang -j1


is it supposed to take a very long time at this point without printing anything?

I also tried

export PATH="/opt/homebrew/Cellar/llvm/19.1.3/bin:$PATH"
export LDFLAGS="-L/opt/homebrew/Cellar/llvm/19.1.3/lib"

git clone https://github.com/RosettaCommons/binder.git
cd binder
mkdir build
cd build
cmake -DLLVM_CONFIG=/opt/homebrew/Cellar/llvm/19.1.3/bin/llvm-config \
      -DCLANG_LIBRARIES=/opt/homebrew/Cellar/llvm/19.1.3/lib \
      -DCLANG_INCLUDE_DIRS=/opt/homebrew/Cellar/llvm/19.1.3/include ..
make

but it keeps failing here

[ 26%] Linking CXX executable binder
cd /Users/gioxc88/develop/projects/QuantLibPython/binder/build/source && /opt/homebrew/Cellar/cmake/3.31.0/bin/cmake -E cmake_link_script CMakeFiles/binder.dir/link.txt --verbose=1
/Library/Developer/CommandLineTools/usr/bin/c++  -fno-rtti -arch arm64 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX14.2.sdk -Wl,-search_paths_first -Wl,-headerpad_max_install_names -L/opt/homebrew/opt/llvm/lib CMakeFiles/binder.dir/main.cpp.o CMakeFiles/binder.dir/binder.cpp.o CMakeFiles/binder.dir/context.cpp.o CMakeFiles/binder.dir/class.cpp.o CMakeFiles/binder.dir/config.cpp.o CMakeFiles/binder.dir/enum.cpp.o CMakeFiles/binder.dir/function.cpp.o CMakeFiles/binder.dir/options.cpp.o CMakeFiles/binder.dir/type.cpp.o CMakeFiles/binder.dir/util.cpp.o CMakeFiles/binder.dir/fmt/format.cc.o CMakeFiles/binder.dir/fmt/os.cc.o -o binder  /opt/homebrew/opt/llvm/lib/libclang-cpp.dylib
ld: Undefined symbols:
  llvm::raw_ostream::flush_nonempty(), referenced from:
      llvm::raw_ostream::flush() in enum.cpp.o
  llvm::raw_ostream::SetBufferAndMode(char*, unsigned long, llvm::raw_ostream::BufferKind), referenced from:
      llvm::raw_ostream::SetUnbuffered() in enum.cpp.o
  llvm::raw_ostream::write(char const*, unsigned long), referenced from:
      llvm::raw_ostream::operator<<(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&) in main.cpp.o
      llvm::raw_ostream::operator<<(llvm::StringRef) in main.cpp.o
  llvm::raw_ostream::~raw_ostream(), referenced from:
      llvm::raw_string_ostream::raw_string_ostream(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>&) in enum.cpp.o
      llvm::raw_string_ostream::~raw_string_ostream() in enum.cpp.o
  llvm::raw_ostream::operator<<(long), referenced from:
      llvm::raw_ostream::operator<<(int) in main.cpp.o
  llvm::StringMapImpl::RehashTable(unsigned int), referenced from:
      std::__1::pair<llvm::StringMapIterator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>, bool> llvm::StringMap<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, llvm::MallocAllocator>::try_emplace_with_hash<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>&>(llvm::StringRef, unsigned int, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>&) in type.cpp.o
  llvm::StringMapImpl::LookupBucketFor(llvm::StringRef, unsigned int), referenced from:
      std::__1::pair<llvm::StringMapIterator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>, bool> llvm::StringMap<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, llvm::MallocAllocator>::try_emplace_with_hash<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>&>(llvm::StringRef, unsigned int, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>&) in type.cpp.o
  llvm::StringMapImpl::hash(llvm::StringRef), referenced from:
      llvm::StringMap<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, llvm::MallocAllocator>::find(llvm::StringRef) in type.cpp.o
      std::__1::pair<llvm::StringMapIterator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>, bool> llvm::StringMap<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, llvm::MallocAllocator>::try_emplace<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>&>(llvm::StringRef, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>&) in type.cpp.o
  llvm::SmallVectorBase<unsigned int>::grow_pod(void*, unsigned long, unsigned long), referenced from:
      llvm::SmallVectorTemplateCommon<llvm::PointerIntPair<clang::Stmt*, 1u, bool, llvm::PointerLikeTypeTraits<clang::Stmt*>, llvm::PointerIntPairInfo<clang::Stmt*, 1u, llvm::PointerLikeTypeTraits<clang::Stmt*>>>, void>::grow_pod(unsigned long, unsigned long) in main.cpp.o
      llvm::SmallVectorTemplateCommon<std::__1::pair<void*, unsigned long>, void>::grow_pod(unsigned long, unsigned long) in main.cpp.o
      llvm::SmallVectorTemplateCommon<void*, void>::grow_pod(unsigned long, unsigned long) in main.cpp.o
      llvm::SmallVectorTemplateCommon<clang::DeclContext const*, void>::grow_pod(unsigned long, unsigned long) in enum.cpp.o
      llvm::SmallVectorTemplateCommon<llvm::cl::OptionCategory*, void>::grow_pod(unsigned long, unsigned long) in options.cpp.o
  llvm::SmallVectorBase<unsigned int>::set_size(unsigned long), referenced from:
      llvm::SmallVectorTemplateBase<llvm::PointerIntPair<clang::Stmt*, 1u, bool, llvm::PointerLikeTypeTraits<clang::Stmt*>, llvm::PointerIntPairInfo<clang::Stmt*, 1u, llvm::PointerLikeTypeTraits<clang::Stmt*>>>, true>::push_back(llvm::PointerIntPair<clang::Stmt*, 1u, bool, llvm::PointerLikeTypeTraits<clang::Stmt*>, llvm::PointerIntPairInfo<clang::Stmt*, 1u, llvm::PointerLikeTypeTraits<clang::Stmt*>>>) in main.cpp.o
      llvm::SmallVectorTemplateBase<llvm::PointerIntPair<clang::Stmt*, 1u, bool, llvm::PointerLikeTypeTraits<clang::Stmt*>, llvm::PointerIntPairInfo<clang::Stmt*, 1u, llvm::PointerLikeTypeTraits<clang::Stmt*>>>, true>::pop_back() in main.cpp.o
      llvm::SmallVectorTemplateBase<std::__1::pair<void*, unsigned long>, true>::push_back(std::__1::pair<void*, unsigned long>) in main.cpp.o
      llvm::SmallVectorTemplateBase<void*, true>::push_back(void*) in main.cpp.o
      llvm::SmallVectorTemplateBase<clang::DeclContext const*, true>::push_back(clang::DeclContext const*) in enum.cpp.o
      llvm::SmallVectorTemplateBase<llvm::cl::OptionCategory*, true>::push_back(llvm::cl::OptionCategory*) in options.cpp.o
  llvm::SmallVectorBase<unsigned int>::SmallVectorBase(void*, unsigned long), referenced from:
      llvm::SmallVectorTemplateCommon<llvm::PointerIntPair<clang::Stmt*, 1u, bool, llvm::PointerLikeTypeTraits<clang::Stmt*>, llvm::PointerIntPairInfo<clang::Stmt*, 1u, llvm::PointerLikeTypeTraits<clang::Stmt*>>>, void>::SmallVectorTemplateCommon(unsigned long) in main.cpp.o
      llvm::SmallVectorTemplateCommon<clang::DeclContext const*, void>::SmallVectorTemplateCommon(unsigned long) in enum.cpp.o
      llvm::SmallVectorTemplateCommon<llvm::cl::OptionCategory*, void>::SmallVectorTemplateCommon(unsigned long) in options.cpp.o
  llvm::allocate_buffer(unsigned long, unsigned long), referenced from:
      llvm::MallocAllocator::Allocate(unsigned long, unsigned long) in main.cpp.o
      llvm::DenseMap<clang::NamedDecl const*, int, llvm::DenseMapInfo<clang::NamedDecl const*, void>, llvm::detail::DenseMapPair<clang::NamedDecl const*, int>>::allocateBuckets(unsigned int) in binder.cpp.o
      llvm::DenseMap<clang::CXXRecordDecl const*, bool, llvm::DenseMapInfo<clang::CXXRecordDecl const*, void>, llvm::detail::DenseMapPair<clang::CXXRecordDecl const*, bool>>::allocateBuckets(unsigned int) in class.cpp.o
      llvm::DenseMap<clang::FunctionDecl const*, bool, llvm::DenseMapInfo<clang::FunctionDecl const*, void>, llvm::detail::DenseMapPair<clang::FunctionDecl const*, bool>>::allocateBuckets(unsigned int) in function.cpp.o
  llvm::deallocate_buffer(void*, unsigned long, unsigned long), referenced from:
      llvm::MallocAllocator::Deallocate(void const*, unsigned long, unsigned long) in main.cpp.o
      llvm::DenseMap<clang::NamedDecl const*, int, llvm::DenseMapInfo<clang::NamedDecl const*, void>, llvm::detail::DenseMapPair<clang::NamedDecl const*, int>>::grow(unsigned int) in binder.cpp.o
      llvm::DenseMap<clang::NamedDecl const*, int, llvm::DenseMapInfo<clang::NamedDecl const*, void>, llvm::detail::DenseMapPair<clang::NamedDecl const*, int>>::shrink_and_clear() in binder.cpp.o
      llvm::DenseMap<clang::NamedDecl const*, int, llvm::DenseMapInfo<clang::NamedDecl const*, void>, llvm::detail::DenseMapPair<clang::NamedDecl const*, int>>::~DenseMap() in context.cpp.o
      llvm::DenseMap<clang::CXXRecordDecl const*, bool, llvm::DenseMapInfo<clang::CXXRecordDecl const*, void>, llvm::detail::DenseMapPair<clang::CXXRecordDecl const*, bool>>::~DenseMap() in class.cpp.o
      llvm::DenseMap<clang::CXXRecordDecl const*, bool, llvm::DenseMapInfo<clang::CXXRecordDecl const*, void>, llvm::detail::DenseMapPair<clang::CXXRecordDecl const*, bool>>::grow(unsigned int) in class.cpp.o
      llvm::DenseMap<clang::FunctionDecl const*, bool, llvm::DenseMapInfo<clang::FunctionDecl const*, void>, llvm::detail::DenseMapPair<clang::FunctionDecl const*, bool>>::~DenseMap() in function.cpp.o
      ...
  llvm::logAllUnhandledErrors(llvm::Error, llvm::raw_ostream&, llvm::Twine), referenced from:
      _main in main.cpp.o
  llvm::DisableABIBreakingChecks, referenced from:
      llvm::VerifyDisableABIBreakingChecks in main.cpp.o
  llvm::llvm_unreachable_internal(char const*, char const*, unsigned int), referenced from:
      clang::ConstructionContextItem::getKindAsString(clang::ConstructionContextItem::ItemKind) in main.cpp.o
      clang::FunctionProtoType::getExceptionSpecSize(clang::ExceptionSpecificationType, unsigned int) in main.cpp.o
      clang::RecursiveASTVisitor<ClassVisitor>::TraverseConceptRequirement(clang::concepts::Requirement*) in main.cpp.o
      clang::RecursiveASTVisitor<ClassVisitor>::TraverseAttr(clang::Attr*) in main.cpp.o
      clang::RecursiveASTVisitor<BinderVisitor>::TraverseConceptRequirement(clang::concepts::Requirement*) in main.cpp.o
      clang::RecursiveASTVisitor<BinderVisitor>::TraverseAttr(clang::Attr*) in main.cpp.o
  llvm::cl::basic_parser<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>::basic_parser(llvm::cl::Option&), referenced from:
      llvm::cl::parser<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>::parser(llvm::cl::Option&) in options.cpp.o
  llvm::cl::basic_parser<bool>::basic_parser(llvm::cl::Option&), referenced from:
      llvm::cl::parser<bool>::parser(llvm::cl::Option&) in options.cpp.o
  llvm::cl::basic_parser<int>::basic_parser(llvm::cl::Option&), referenced from:
      llvm::cl::parser<int>::parser(llvm::cl::Option&) in options.cpp.o
  llvm::cl::OptionCategory::registerCategory(), referenced from:
      llvm::cl::OptionCategory::OptionCategory(llvm::StringRef, llvm::StringRef) in options.cpp.o
  llvm::cl::SetVersionPrinter(std::__1::function<void (llvm::raw_ostream&)>), referenced from:
      _main in main.cpp.o
  llvm::cl::GenericOptionValue::anchor(), referenced from:
      vtable for llvm::cl::OptionValueCopy<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>> in options.cpp.o
      vtable for llvm::cl::OptionValue<bool> in options.cpp.o
      vtable for llvm::cl::OptionValueBase<bool, false> in options.cpp.o
      vtable for llvm::cl::OptionValueCopy<bool> in options.cpp.o
      vtable for llvm::cl::OptionValue<int> in options.cpp.o
      vtable for llvm::cl::OptionValueBase<int, false> in options.cpp.o
      vtable for llvm::cl::OptionValueCopy<int> in options.cpp.o
      ...
  llvm::cl::getGeneralCategory(), referenced from:
      llvm::cl::Option::Option(llvm::cl::NumOccurrencesFlag, llvm::cl::OptionHidden) in options.cpp.o
  llvm::cl::opt<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, false, llvm::cl::parser<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>>::setInitialValue(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&), referenced from:
      void llvm::cl::initializer<char [1]>::apply<llvm::cl::opt<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, false, llvm::cl::parser<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>>>(llvm::cl::opt<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, false, llvm::cl::parser<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>>&) const in options.cpp.o
  llvm::cl::opt<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, false, llvm::cl::parser<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>>::done(), referenced from:
      llvm::cl::opt<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, false, llvm::cl::parser<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>>::opt<char [12], llvm::cl::desc, llvm::cl::cat>(char const (&) [12], llvm::cl::desc const&, llvm::cl::cat const&) in options.cpp.o
      llvm::cl::opt<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, false, llvm::cl::parser<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>>::opt<char [7], llvm::cl::desc, llvm::cl::initializer<char [1]>, llvm::cl::cat>(char const (&) [7], llvm::cl::desc const&, llvm::cl::initializer<char [1]> const&, llvm::cl::cat const&) in options.cpp.o
  llvm::cl::opt<bool, false, llvm::cl::parser<bool>>::setInitialValue(bool const&), referenced from:
      void llvm::cl::initializer<bool>::apply<llvm::cl::opt<bool, false, llvm::cl::parser<bool>>>(llvm::cl::opt<bool, false, llvm::cl::parser<bool>>&) const in options.cpp.o
  llvm::cl::opt<bool, false, llvm::cl::parser<bool>>::done(), referenced from:
      llvm::cl::opt<bool, false, llvm::cl::parser<bool>>::opt<char [18], llvm::cl::desc, llvm::cl::initializer<bool>, llvm::cl::cat>(char const (&) [18], llvm::cl::desc const&, llvm::cl::initializer<bool> const&, llvm::cl::cat const&) in options.cpp.o
      llvm::cl::opt<bool, false, llvm::cl::parser<bool>>::opt<char [12], llvm::cl::desc, llvm::cl::initializer<bool>, llvm::cl::cat>(char const (&) [12], llvm::cl::desc const&, llvm::cl::initializer<bool> const&, llvm::cl::cat const&) in options.cpp.o
      llvm::cl::opt<bool, false, llvm::cl::parser<bool>>::opt<char [6], llvm::cl::desc, llvm::cl::initializer<bool>, llvm::cl::cat>(char const (&) [6], llvm::cl::desc const&, llvm::cl::initializer<bool> const&, llvm::cl::cat const&) in options.cpp.o
      llvm::cl::opt<bool, false, llvm::cl::parser<bool>>::opt<char [2], llvm::cl::desc, llvm::cl::initializer<bool>, llvm::cl::cat>(char const (&) [2], llvm::cl::desc const&, llvm::cl::initializer<bool> const&, llvm::cl::cat const&) in options.cpp.o
      llvm::cl::opt<bool, false, llvm::cl::parser<bool>>::opt<char [5], llvm::cl::desc, llvm::cl::initializer<bool>, llvm::cl::cat>(char const (&) [5], llvm::cl::desc const&, llvm::cl::initializer<bool> const&, llvm::cl::cat const&) in options.cpp.o
      llvm::cl::opt<bool, false, llvm::cl::parser<bool>>::opt<char [21], llvm::cl::desc, llvm::cl::initializer<bool>, llvm::cl::cat>(char const (&) [21], llvm::cl::desc const&, llvm::cl::initializer<bool> const&, llvm::cl::cat const&) in options.cpp.o
      llvm::cl::opt<bool, false, llvm::cl::parser<bool>>::opt<char [17], llvm::cl::desc, llvm::cl::initializer<bool>, llvm::cl::cat>(char const (&) [17], llvm::cl::desc const&, llvm::cl::initializer<bool> const&, llvm::cl::cat const&) in options.cpp.o
      ...
  llvm::cl::opt<int, false, llvm::cl::parser<int>>::setInitialValue(int const&), referenced from:
      void llvm::cl::initializer<int>::apply<llvm::cl::opt<int, false, llvm::cl::parser<int>>>(llvm::cl::opt<int, false, llvm::cl::parser<int>>&) const in options.cpp.o
  llvm::cl::opt<int, false, llvm::cl::parser<int>>::done(), referenced from:
      llvm::cl::opt<int, false, llvm::cl::parser<int>>::opt<char [14], llvm::cl::desc, llvm::cl::initializer<int>, llvm::cl::cat>(char const (&) [14], llvm::cl::desc const&, llvm::cl::initializer<int> const&, llvm::cl::cat const&) in options.cpp.o
  llvm::cl::Option::addArgument(), referenced from:
      llvm::cl::list<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, bool, llvm::cl::parser<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>>::done() in options.cpp.o
  llvm::cl::Option::addCategory(llvm::cl::OptionCategory&), referenced from:
      void llvm::cl::cat::apply<llvm::cl::opt<bool, false, llvm::cl::parser<bool>>>(llvm::cl::opt<bool, false, llvm::cl::parser<bool>>&) const in options.cpp.o
      void llvm::cl::cat::apply<llvm::cl::opt<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, false, llvm::cl::parser<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>>>(llvm::cl::opt<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, false, llvm::cl::parser<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>>&) const in options.cpp.o
      void llvm::cl::cat::apply<llvm::cl::opt<int, false, llvm::cl::parser<int>>>(llvm::cl::opt<int, false, llvm::cl::parser<int>>&) const in options.cpp.o
      void llvm::cl::cat::apply<llvm::cl::list<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, bool, llvm::cl::parser<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>>>(llvm::cl::list<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, bool, llvm::cl::parser<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>>&) const in options.cpp.o
  llvm::cl::Option::addOccurrence(unsigned int, llvm::StringRef, llvm::StringRef, bool), referenced from:
      vtable for llvm::cl::list<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, bool, llvm::cl::parser<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>> in options.cpp.o
  llvm::cl::Option::anchor(), referenced from:
      vtable for llvm::cl::list<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, bool, llvm::cl::parser<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>> in options.cpp.o
  llvm::cl::Option::setArgStr(llvm::StringRef), referenced from:
      void llvm::cl::applicator<char [18]>::opt<llvm::cl::opt<bool, false, llvm::cl::parser<bool>>>(llvm::StringRef, llvm::cl::opt<bool, false, llvm::cl::parser<bool>>&) in options.cpp.o
      void llvm::cl::applicator<char [12]>::opt<llvm::cl::opt<bool, false, llvm::cl::parser<bool>>>(llvm::StringRef, llvm::cl::opt<bool, false, llvm::cl::parser<bool>>&) in options.cpp.o
      void llvm::cl::applicator<char [6]>::opt<llvm::cl::opt<bool, false, llvm::cl::parser<bool>>>(llvm::StringRef, llvm::cl::opt<bool, false, llvm::cl::parser<bool>>&) in options.cpp.o
      void llvm::cl::applicator<char [2]>::opt<llvm::cl::opt<bool, false, llvm::cl::parser<bool>>>(llvm::StringRef, llvm::cl::opt<bool, false, llvm::cl::parser<bool>>&) in options.cpp.o
      void llvm::cl::applicator<char [5]>::opt<llvm::cl::opt<bool, false, llvm::cl::parser<bool>>>(llvm::StringRef, llvm::cl::opt<bool, false, llvm::cl::parser<bool>>&) in options.cpp.o
      void llvm::cl::applicator<char [21]>::opt<llvm::cl::opt<bool, false, llvm::cl::parser<bool>>>(llvm::StringRef, llvm::cl::opt<bool, false, llvm::cl::parser<bool>>&) in options.cpp.o
      void llvm::cl::applicator<char [12]>::opt<llvm::cl::opt<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, false, llvm::cl::parser<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>>>(llvm::StringRef, llvm::cl::opt<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, false, llvm::cl::parser<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>>&) in options.cpp.o
      ...
  llvm::cl::extrahelp::extrahelp(llvm::StringRef), referenced from:
      ___cxx_global_var_init in main.cpp.o
      ___cxx_global_var_init.12 in main.cpp.o
  llvm::vfs::getRealFileSystem(), referenced from:
      _main in main.cpp.o
  llvm::errs(), referenced from:
      ClassVisitor::VisitEnumDecl(clang::EnumDecl*) in main.cpp.o
      binder::Context::sort_binders() in context.cpp.o
  llvm::outs(), referenced from:
      _main in main.cpp.o
      BinderFrontendAction::CreateASTConsumer(clang::CompilerInstance&, llvm::StringRef) in main.cpp.o
      binder::Context::bind(binder::Config const&) in context.cpp.o
      binder::Context::bind(binder::Config const&) in context.cpp.o
      binder::Context::sort_binders() in context.cpp.o
      binder::Context::sort_binders() in context.cpp.o
      binder::Context::generate(binder::Config const&) in context.cpp.o
      binder::Context::generate(binder::Config const&) in context.cpp.o
      ...
  llvm::APInt::initSlowCase(unsigned long long, bool), referenced from:
      llvm::APInt::APInt(unsigned int, unsigned long long, bool) in main.cpp.o
  llvm::APInt::APInt(unsigned int, unsigned int, unsigned long long const*), referenced from:
      clang::APNumericStorage::getIntValue() const in main.cpp.o
  llvm::Regex::Regex(llvm::StringRef, llvm::Regex::RegexFlags), referenced from:
      binder::simplify_std_class_name_raw(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&) in type.cpp.o
  llvm::Regex::Regex(llvm::Regex&&), referenced from:
      std::__1::pair<llvm::Regex, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>::pair[abi:v160006]<llvm::Regex, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>&, (void*)0>(llvm::Regex&&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>&) in type.cpp.o
      std::__1::pair<llvm::Regex, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>::pair(std::__1::pair<llvm::Regex, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>&&) in type.cpp.o
  llvm::Regex::~Regex(), referenced from:
      binder::simplify_std_class_name_raw(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&) in type.cpp.o
      binder::simplify_std_class_name_raw(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&) in type.cpp.o
      std::__1::pair<llvm::Regex, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>::~pair() in type.cpp.o
      std::__1::pair<llvm::Regex, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>::pair[abi:v160006]<llvm::Regex, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>&, (void*)0>(llvm::Regex&&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>&) in type.cpp.o
  llvm::StringMapImpl::FindKey(llvm::StringRef, unsigned int) const, referenced from:
      llvm::StringMap<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, llvm::MallocAllocator>::find(llvm::StringRef, unsigned int) in type.cpp.o
  llvm::SmallVectorBase<unsigned int>::size() const, referenced from:
      clang::RecursiveASTVisitor<ClassVisitor>::TraverseStmt(clang::Stmt*, llvm::SmallVectorImpl<llvm::PointerIntPair<clang::Stmt*, 1u, bool, llvm::PointerLikeTypeTraits<clang::Stmt*>, llvm::PointerIntPairInfo<clang::Stmt*, 1u, llvm::PointerLikeTypeTraits<clang::Stmt*>>>>*) in main.cpp.o
      llvm::SmallVectorTemplateBase<llvm::PointerIntPair<clang::Stmt*, 1u, bool, llvm::PointerLikeTypeTraits<clang::Stmt*>, llvm::PointerIntPairInfo<clang::Stmt*, 1u, llvm::PointerLikeTypeTraits<clang::Stmt*>>>, true>::push_back(llvm::PointerIntPair<clang::Stmt*, 1u, bool, llvm::PointerLikeTypeTraits<clang::Stmt*>, llvm::PointerIntPairInfo<clang::Stmt*, 1u, llvm::PointerLikeTypeTraits<clang::Stmt*>>>) in main.cpp.o
      llvm::SmallVectorTemplateBase<llvm::PointerIntPair<clang::Stmt*, 1u, bool, llvm::PointerLikeTypeTraits<clang::Stmt*>, llvm::PointerIntPairInfo<clang::Stmt*, 1u, llvm::PointerLikeTypeTraits<clang::Stmt*>>>, true>::pop_back() in main.cpp.o
      llvm::SmallVectorTemplateCommon<llvm::PointerIntPair<clang::Stmt*, 1u, bool, llvm::PointerLikeTypeTraits<clang::Stmt*>, llvm::PointerIntPairInfo<clang::Stmt*, 1u, llvm::PointerLikeTypeTraits<clang::Stmt*>>>, void>::end() in main.cpp.o
      llvm::PointerIntPair<clang::Stmt*, 1u, bool, llvm::PointerLikeTypeTraits<clang::Stmt*>, llvm::PointerIntPairInfo<clang::Stmt*, 1u, llvm::PointerLikeTypeTraits<clang::Stmt*>>> const* llvm::SmallVectorTemplateCommon<llvm::PointerIntPair<clang::Stmt*, 1u, bool, llvm::PointerLikeTypeTraits<clang::Stmt*>, llvm::PointerIntPairInfo<clang::Stmt*, 1u, llvm::PointerLikeTypeTraits<clang::Stmt*>>>, void>::reserveForParamAndGetAddressImpl<llvm::SmallVectorTemplateBase<llvm::PointerIntPair<clang::Stmt*, 1u, bool, llvm::PointerLikeTypeTraits<clang::Stmt*>, llvm::PointerIntPairInfo<clang::Stmt*, 1u, llvm::PointerLikeTypeTraits<clang::Stmt*>>>, true>>(llvm::SmallVectorTemplateBase<llvm::PointerIntPair<clang::Stmt*, 1u, bool, llvm::PointerLikeTypeTraits<clang::Stmt*>, llvm::PointerIntPairInfo<clang::Stmt*, 1u, llvm::PointerLikeTypeTraits<clang::Stmt*>>>, true>*, llvm::PointerIntPair<clang::Stmt*, 1u, bool, llvm::PointerLikeTypeTraits<clang::Stmt*>, llvm::PointerIntPairInfo<clang::Stmt*, 1u, llvm::PointerLikeTypeTraits<clang::Stmt*>>> const&, unsigned long) in main.cpp.o
      llvm::SmallVectorTemplateCommon<clang::Attr*, void>::end() const in main.cpp.o
      llvm::SmallVectorTemplateBase<std::__1::pair<void*, unsigned long>, true>::push_back(std::__1::pair<void*, unsigned long>) in main.cpp.o
      ...
  llvm::SmallVectorBase<unsigned int>::empty() const, referenced from:
      clang::RecursiveASTVisitor<ClassVisitor>::TraverseStmt(clang::Stmt*, llvm::SmallVectorImpl<llvm::PointerIntPair<clang::Stmt*, 1u, bool, llvm::PointerLikeTypeTraits<clang::Stmt*>, llvm::PointerIntPairInfo<clang::Stmt*, 1u, llvm::PointerLikeTypeTraits<clang::Stmt*>>>>*) in main.cpp.o
      llvm::SmallVectorTemplateCommon<llvm::PointerIntPair<clang::Stmt*, 1u, bool, llvm::PointerLikeTypeTraits<clang::Stmt*>, llvm::PointerIntPairInfo<clang::Stmt*, 1u, llvm::PointerLikeTypeTraits<clang::Stmt*>>>, void>::back() in main.cpp.o
      clang::RecursiveASTVisitor<BinderVisitor>::TraverseStmt(clang::Stmt*, llvm::SmallVectorImpl<llvm::PointerIntPair<clang::Stmt*, 1u, bool, llvm::PointerLikeTypeTraits<clang::Stmt*>, llvm::PointerIntPairInfo<clang::Stmt*, 1u, llvm::PointerLikeTypeTraits<clang::Stmt*>>>>*) in main.cpp.o
  llvm::SmallVectorBase<unsigned int>::capacity() const, referenced from:
      llvm::PointerIntPair<clang::Stmt*, 1u, bool, llvm::PointerLikeTypeTraits<clang::Stmt*>, llvm::PointerIntPairInfo<clang::Stmt*, 1u, llvm::PointerLikeTypeTraits<clang::Stmt*>>> const* llvm::SmallVectorTemplateCommon<llvm::PointerIntPair<clang::Stmt*, 1u, bool, llvm::PointerLikeTypeTraits<clang::Stmt*>, llvm::PointerIntPairInfo<clang::Stmt*, 1u, llvm::PointerLikeTypeTraits<clang::Stmt*>>>, void>::reserveForParamAndGetAddressImpl<llvm::SmallVectorTemplateBase<llvm::PointerIntPair<clang::Stmt*, 1u, bool, llvm::PointerLikeTypeTraits<clang::Stmt*>, llvm::PointerIntPairInfo<clang::Stmt*, 1u, llvm::PointerLikeTypeTraits<clang::Stmt*>>>, true>>(llvm::SmallVectorTemplateBase<llvm::PointerIntPair<clang::Stmt*, 1u, bool, llvm::PointerLikeTypeTraits<clang::Stmt*>, llvm::PointerIntPairInfo<clang::Stmt*, 1u, llvm::PointerLikeTypeTraits<clang::Stmt*>>>, true>*, llvm::PointerIntPair<clang::Stmt*, 1u, bool, llvm::PointerLikeTypeTraits<clang::Stmt*>, llvm::PointerIntPairInfo<clang::Stmt*, 1u, llvm::PointerLikeTypeTraits<clang::Stmt*>>> const&, unsigned long) in main.cpp.o
      std::__1::pair<void*, unsigned long> const* llvm::SmallVectorTemplateCommon<std::__1::pair<void*, unsigned long>, void>::reserveForParamAndGetAddressImpl<llvm::SmallVectorTemplateBase<std::__1::pair<void*, unsigned long>, true>>(llvm::SmallVectorTemplateBase<std::__1::pair<void*, unsigned long>, true>*, std::__1::pair<void*, unsigned long> const&, unsigned long) in main.cpp.o
      void* const* llvm::SmallVectorTemplateCommon<void*, void>::reserveForParamAndGetAddressImpl<llvm::SmallVectorTemplateBase<void*, true>>(llvm::SmallVectorTemplateBase<void*, true>*, void* const&, unsigned long) in main.cpp.o
      clang::DeclContext const* const* llvm::SmallVectorTemplateCommon<clang::DeclContext const*, void>::reserveForParamAndGetAddressImpl<llvm::SmallVectorTemplateBase<clang::DeclContext const*, true>>(llvm::SmallVectorTemplateBase<clang::DeclContext const*, true>*, clang::DeclContext const* const&, unsigned long) in enum.cpp.o
      llvm::cl::OptionCategory* const* llvm::SmallVectorTemplateCommon<llvm::cl::OptionCategory*, void>::reserveForParamAndGetAddressImpl<llvm::SmallVectorTemplateBase<llvm::cl::OptionCategory*, true>>(llvm::SmallVectorTemplateBase<llvm::cl::OptionCategory*, true>*, llvm::cl::OptionCategory* const&, unsigned long) in options.cpp.o
  llvm::cl::basic_parser_impl::getOptionWidth(llvm::cl::Option const&) const, referenced from:
      llvm::cl::list<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, bool, llvm::cl::parser<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>>::getOptionWidth() const in options.cpp.o
  llvm::cl::basic_parser_impl::printOptionInfo(llvm::cl::Option const&, unsigned long) const, referenced from:
      llvm::cl::list<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, bool, llvm::cl::parser<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>>::printOptionInfo(unsigned long) const in options.cpp.o
  llvm::Regex::sub(llvm::StringRef, llvm::StringRef, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>*) const, referenced from:
      binder::simplify_std_class_name_raw(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&) in type.cpp.o
  vtable for llvm::raw_ostream, referenced from:
      llvm::raw_ostream::raw_ostream(bool, llvm::raw_ostream::OStreamKind) in enum.cpp.o
  vtable for llvm::raw_string_ostream, referenced from:
      llvm::raw_string_ostream::raw_string_ostream(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>&) in enum.cpp.o
  vtable for llvm::cl::OptionValue<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>, referenced from:
      llvm::cl::OptionValue<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>::OptionValue(llvm::cl::OptionValue<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>&&) in options.cpp.o
      llvm::cl::OptionValue<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>::OptionValue(llvm::cl::OptionValue<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>> const&) in options.cpp.o
      llvm::cl::OptionValue<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>::OptionValue(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&) in options.cpp.o
      llvm::cl::OptionValue<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>::OptionValue() in options.cpp.o
  vtable for llvm::cl::GenericOptionValue, referenced from:
      llvm::cl::GenericOptionValue::GenericOptionValue(llvm::cl::GenericOptionValue const&) in options.cpp.o
      llvm::cl::GenericOptionValue::GenericOptionValue() in options.cpp.o
  vtable for llvm::cl::opt<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, false, llvm::cl::parser<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>>, referenced from:
      llvm::cl::opt<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, false, llvm::cl::parser<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>>::~opt() in options.cpp.o
      llvm::cl::opt<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, false, llvm::cl::parser<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>>::opt<char [12], llvm::cl::desc, llvm::cl::cat>(char const (&) [12], llvm::cl::desc const&, llvm::cl::cat const&) in options.cpp.o
      llvm::cl::opt<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, false, llvm::cl::parser<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>>::opt<char [7], llvm::cl::desc, llvm::cl::initializer<char [1]>, llvm::cl::cat>(char const (&) [7], llvm::cl::desc const&, llvm::cl::initializer<char [1]> const&, llvm::cl::cat const&) in options.cpp.o
  vtable for llvm::cl::opt<bool, false, llvm::cl::parser<bool>>, referenced from:
      llvm::cl::opt<bool, false, llvm::cl::parser<bool>>::~opt() in options.cpp.o
      llvm::cl::opt<bool, false, llvm::cl::parser<bool>>::opt<char [18], llvm::cl::desc, llvm::cl::initializer<bool>, llvm::cl::cat>(char const (&) [18], llvm::cl::desc const&, llvm::cl::initializer<bool> const&, llvm::cl::cat const&) in options.cpp.o
      llvm::cl::opt<bool, false, llvm::cl::parser<bool>>::opt<char [12], llvm::cl::desc, llvm::cl::initializer<bool>, llvm::cl::cat>(char const (&) [12], llvm::cl::desc const&, llvm::cl::initializer<bool> const&, llvm::cl::cat const&) in options.cpp.o
      llvm::cl::opt<bool, false, llvm::cl::parser<bool>>::opt<char [6], llvm::cl::desc, llvm::cl::initializer<bool>, llvm::cl::cat>(char const (&) [6], llvm::cl::desc const&, llvm::cl::initializer<bool> const&, llvm::cl::cat const&) in options.cpp.o
      llvm::cl::opt<bool, false, llvm::cl::parser<bool>>::opt<char [2], llvm::cl::desc, llvm::cl::initializer<bool>, llvm::cl::cat>(char const (&) [2], llvm::cl::desc const&, llvm::cl::initializer<bool> const&, llvm::cl::cat const&) in options.cpp.o
      llvm::cl::opt<bool, false, llvm::cl::parser<bool>>::opt<char [5], llvm::cl::desc, llvm::cl::initializer<bool>, llvm::cl::cat>(char const (&) [5], llvm::cl::desc const&, llvm::cl::initializer<bool> const&, llvm::cl::cat const&) in options.cpp.o
      llvm::cl::opt<bool, false, llvm::cl::parser<bool>>::opt<char [21], llvm::cl::desc, llvm::cl::initializer<bool>, llvm::cl::cat>(char const (&) [21], llvm::cl::desc const&, llvm::cl::initializer<bool> const&, llvm::cl::cat const&) in options.cpp.o
      ...
  vtable for llvm::cl::opt<int, false, llvm::cl::parser<int>>, referenced from:
      llvm::cl::opt<int, false, llvm::cl::parser<int>>::~opt() in options.cpp.o
      llvm::cl::opt<int, false, llvm::cl::parser<int>>::opt<char [14], llvm::cl::desc, llvm::cl::initializer<int>, llvm::cl::cat>(char const (&) [14], llvm::cl::desc const&, llvm::cl::initializer<int> const&, llvm::cl::cat const&) in options.cpp.o
  vtable for llvm::cl::Option, referenced from:
      llvm::cl::Option::~Option() in options.cpp.o
      llvm::cl::Option::Option(llvm::cl::NumOccurrencesFlag, llvm::cl::OptionHidden) in options.cpp.o
  vtable for llvm::cl::parser<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>, referenced from:
      llvm::cl::parser<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>::parser(llvm::cl::Option&) in options.cpp.o
  vtable for llvm::cl::parser<bool>, referenced from:
      llvm::cl::parser<bool>::parser(llvm::cl::Option&) in options.cpp.o
  vtable for llvm::cl::parser<int>, referenced from:
      llvm::cl::parser<int>::parser(llvm::cl::Option&) in options.cpp.o
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [source/binder] Error 1
make[1]: *** [source/CMakeFiles/binder.dir/all] Error 2
make: *** [all] Error 2
@lyskov
Copy link
Member

lyskov commented Nov 7, 2024

Have you tried running python build-and-run-tests.py -j<number of cores to use> command line? By default it will only use a single core to build which will take quite a bit of time.

If you want to build Binder by-hands then it will be best to follow compilation instructions outlined at https://cppbinder.readthedocs.io/en/latest/install.html (note the extra LLVM configuration options that need to be passed during configuration phase).

@LiangliangNan
Copy link

I had the same issue on macOS, and both do not work :-(

Out of curiosity, why LLVM is a must? On macOS, it makes more sense to support the native compilers from Xcode, no?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants