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

llvmlite does not install on macosx 11.0.1 (BigSur) #660

Closed
solas opened this issue Dec 1, 2020 · 14 comments
Closed

llvmlite does not install on macosx 11.0.1 (BigSur) #660

solas opened this issue Dec 1, 2020 · 14 comments
Labels
doc Issues/PRs related to documentation improvments duplicate question

Comments

@solas
Copy link

solas commented Dec 1, 2020

llvmlite does not install on macosx 11.0.1 (BigSur).
First problem: sites like PyPi have no precompiled llvmlite wheels for bigsur: direct install fails
Second problem: the package itself cannot recompile -- see error below (2)
Third problem: the manual build instructions provided @ https://llvmlite.readthedocs.io/en/latest/admin-guide/install.html do not work, or are incomplete. Following the steps exactly as written also fails. see error below. (3)

(2):
RuntimeError: llvm-config failed executing, please point LLVM_CONFIG to the path for llvm-config
error: command '/Users/Shared/py3.8/bin/python3' failed with exit status 1
----------------------------------------
ERROR: Command errored out with exit status 1: /Users/Shared/py3.8/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/9v/mrg4nkms0j17xyrb0x0jd5v00000gn/T/pip-install-_fqwjy2a/llvmlite/setup.py'"'"'; file='"'"'/private/var/folders/9v/mrg4nkms0j17xyrb0x0jd5v00000gn/T/pip-install-_fqwjy2a/llvmlite/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record /private/var/folders/9v/mrg4nkms0j17xyrb0x0jd5v00000gn/T/pip-record-elhuu7o2/install-record.txt --single-version-externally-managed --compile --install-headers /Users/Shared/py3.8/include/site/python3.8/llvmlite Check the logs for full command output.

(3):
../llvmlite/conda-recipes/llvmdev/build.sh:

Undefined symbols for architecture x86_64:
"std::__1::chrono::system_clock::from_time_t(long)", referenced from:
llvm::sys::toTimePoint(long, unsigned int) in libLLVMSupport.a(Path.cpp.o)
"std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator >::resize(unsigned long, char)", referenced from:
std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator >::resize(unsigned long) in libLLVMSupport.a(Regex.cpp.o)
buildFixItLine(std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator >&, std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator >&, llvm::ArrayRefllvm::SMFixIt, llvm::ArrayRef) in libLLVMSupport.a(SourceMgr.cpp.o)
std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator >::resize(unsigned long) in libLLVMSupport.a(ConvertUTFWrapper.cpp.o)
std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator >::resize(unsigned long) in libLLVMSupport.a(Host.cpp.o)
"std::__1::mutex::~mutex()", referenced from:
___cxx_global_var_init in libLLVMSupport.a(ErrorHandling.cpp.o)
___cxx_global_var_init.1 in libLLVMSupport.a(ErrorHandling.cpp.o)
"std::__1::mutex::lock()", referenced from:
std::__1::lock_guardstd::__1::mutex::lock_guard(std::__1::mutex&) in libLLVMSupport.a(ErrorHandling.cpp.o)
"std::__1::recursive_mutex::~recursive_mutex()", referenced from:
llvm::sys::SmartMutex::~SmartMutex() in libLLVMSupport.a(CodeGenCoverage.cpp.o)
"std::__1::recursive_mutex::unlock()", referenced from:
std::__1::lock_guardstd::__1::recursive_mutex::~lock_guard() in libLLVMSupport.a(ManagedStatic.cpp.o)
llvm::sys::SmartMutex::unlock() in libLLVMSupport.a(CodeGenCoverage.cpp.o)
"std::__1::recursive_mutex::lock()", referenced from:
std::__1::lock_guardstd::__1::recursive_mutex::lock_guard(std::__1::recursive_mutex&) in libLLVMSupport.a(ManagedStatic.cpp.o)
llvm::sys::SmartMutex::lock() in libLLVMSupport.a(CodeGenCoverage.cpp.o)
"std::__1::recursive_mutex::recursive_mutex()", referenced from:
initializeMutex() in libLLVMSupport.a(ManagedStatic.cpp.o)
llvm::sys::SmartMutex::SmartMutex() in libLLVMSupport.a(CodeGenCoverage.cpp.o)
"std::__1::generic_category()", referenced from:
llvm::raw_fd_ostream::write_impl(char const*, unsigned long) in libLLVMSupport.a(raw_ostream.cpp.o)
llvm::raw_fd_ostream::seek(unsigned long long) in libLLVMSupport.a(raw_ostream.cpp.o)
llvm::make_error_code(llvm::errc) in libLLVMSupport.a(MemoryBuffer.cpp.o)
std::__1::make_error_code(std::__1::errc) in libLLVMSupport.a(CommandLine.cpp.o)
llvm::sys::fs::current_path(llvm::SmallVectorImpl&) in libLLVMSupport.a(Path.cpp.o)
llvm::sys::fs::create_directory(llvm::Twine const&, bool, llvm::sys::fs::perms) in libLLVMSupport.a(Path.cpp.o)
llvm::sys::fs::set_current_path(llvm::Twine const&) in libLLVMSupport.a(Path.cpp.o)
...
"std::__1::error_category::default_error_condition(int) const", referenced from:
vtable for (anonymous namespace)::ErrorErrorCategory in libLLVMSupport.a(Error.cpp.o)
"std::__1::error_category::equivalent(int, std::__1::error_condition const&) const", referenced from:
vtable for (anonymous namespace)::ErrorErrorCategory in libLLVMSupport.a(Error.cpp.o)
"___cxa_guard_acquire", referenced from:
llvm::BitsRecTy::get(unsigned int) in libLLVMTableGen.a(Record.cpp.o)
llvm::RecordRecTy::get(llvm::ArrayRefllvm::Record*) in libLLVMTableGen.a(Record.cpp.o)
llvm::UnsetInit::get() in libLLVMTableGen.a(Record.cpp.o)
llvm::BitInit::get(bool) in libLLVMTableGen.a(Record.cpp.o)
llvm::IntInit::get(long long) in libLLVMTableGen.a(Record.cpp.o)
llvm::BitsInit::get(llvm::ArrayRefllvm::Init*) in libLLVMTableGen.a(Record.cpp.o)
llvm::CodeInit::get(llvm::StringRef, llvm::SMLoc const&) in libLLVMTableGen.a(Record.cpp.o)
...
"std::terminate()", referenced from:
llvm::itanium_demangle::OutputStream::grow(unsigned long) in libLLVMDemangle.a(ItaniumDemangle.cpp.o)
(anonymous namespace)::BumpPointerAllocator::allocateMassive(unsigned long) in libLLVMDemangle.a(ItaniumDemangle.cpp.o)
(anonymous namespace)::BumpPointerAllocator::grow() in libLLVMDemangle.a(ItaniumDemangle.cpp.o)
llvm::itanium_demangle::PODSmallVector<llvm::itanium_demangle::ForwardTemplateReference*, 4ul>::reserve(unsigned long) in libLLVMDemangle.a(ItaniumDemangle.cpp.o)
llvm::itanium_demangle::PODSmallVector<llvm::itanium_demangle::PODSmallVector<llvm::itanium_demangle::Node*, 8ul>, 4ul>::reserve(unsigned long) in libLLVMDemangle.a(ItaniumDemangle.cpp.o)
llvm::itanium_demangle::PODSmallVector<llvm::itanium_demangle::Node
, 8ul>::reserve(unsigned long) in libLLVMDemangle.a(ItaniumDemangle.cpp.o)
llvm::itanium_demangle::PODSmallVector<llvm::itanium_demangle::Node*, 32ul>::reserve(unsigned long) in libLLVMDemangle.a(ItaniumDemangle.cpp.o)
...
"std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator >::__init(char const*, unsigned long)", referenced from:
std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator >::basic_stringstd::nullptr_t(char const*) in AsmMatcherEmitter.cpp.o
std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator >::basic_string(char const*, unsigned long) in AsmMatcherEmitter.cpp.o
std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator >::basic_stringstd::nullptr_t(char const*) in AsmWriterEmitter.cpp.o
std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator >::basic_stringstd::nullptr_t(char const*) in AsmWriterInst.cpp.o
std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator >::basic_stringstd::nullptr_t(char const*) in CodeEmitterGen.cpp.o
std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator >::basic_stringstd::nullptr_t(char const*) in CodeGenDAGPatterns.cpp.o
std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator >::basic_stringstd::nullptr_t(char const*) in CodeGenInstruction.cpp.o
...
"void std::__1::__sort<std::__1::__less<int, int>&, int*>(int*, int*, std::__1::__less<int, int>&)", referenced from:
void std::__1::sort<int*, std::__1::__less<int, int> >(int*, int*, std::__1::__less<int, int>) in RegisterInfoEmitter.cpp.o
"std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator >::reserve(unsigned long)", referenced from:
std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > llvm::detail::join_impl<std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const*>(std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const*, std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const*, llvm::StringRef, std::__1::forward_iterator_tag) in DFAEmitter.cpp.o
std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > llvm::detail::join_impl<std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator >>(std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator >, std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator >, llvm::StringRef, std::__1::forward_iterator_tag) in GlobalISelEmitter.cpp.o
llvm::escapeForRST(llvm::StringRef) in InstrDocsEmitter.cpp.o
std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > llvm::detail::join_impl<std::__1::__wrap_iter<std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator >
> >(std::__1::__wrap_iter<std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator >>, std::__1::__wrap_iter<std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator >>, llvm::StringRef, std::__1::forward_iterator_tag) in IntrinsicEmitter.cpp.o
"std::__1::__call_once(unsigned long volatile&, void*, void ()(void))", referenced from:
void std::__1::call_once<void (&)()>(std::__1::once_flag&, void (&)()) in libLLVMSupport.a(ManagedStatic.cpp.o)
"void std::__1::__sort<std::__1::__less<unsigned int, unsigned int>&, unsigned int*>(unsigned int*, unsigned int*, std::__1::__less<unsigned int, unsigned int>&)", referenced from:
void std::__1::sort<unsigned int*, std::__1::__less<unsigned int, unsigned int> >(unsigned int*, unsigned int*, std::__1::__less<unsigned int, unsigned int>) in CodeGenRegisters.cpp.o
void std::__1::sort<unsigned int*, std::__1::__less<unsigned int, unsigned int> >(unsigned int*, unsigned int*, std::__1::__less<unsigned int, unsigned int>) in GlobalISelEmitter.cpp.o
"vtable for std::__1::__shared_weak_count", referenced from:
std::__1::__shared_weak_count::__shared_weak_count(long) in CodeGenDAGPatterns.cpp.o
std::__1::__shared_weak_count::__shared_weak_count(long) in libLLVMSupport.a(Path.cpp.o)
std::__1::__shared_weak_count::__shared_weak_count(long) in libLLVMSupport.a(VirtualFileSystem.cpp.o)
NOTE: a missing vtable usually means the first non-inline virtual member function has no definition.
"std::__1::mutex::unlock()", referenced from:
std::__1::lock_guardstd::__1::mutex::~lock_guard() in libLLVMSupport.a(ErrorHandling.cpp.o)
"std::__1::__shared_weak_count::__get_deleter(std::type_info const&) const", referenced from:
vtable for std::__1::__shared_ptr_emplace<llvm::TreePatternNode, std::__1::allocatorllvm::TreePatternNode > in CodeGenDAGPatterns.cpp.o
vtable for std::__1::__shared_ptr_emplace<llvm::sys::fs::detail::DirIterState, std::__1::allocatorllvm::sys::fs::detail::DirIterState > in libLLVMSupport.a(Path.cpp.o)
vtable for std::__1::__shared_ptr_emplace<(anonymous namespace)::RealFSDirIter, std::__1::allocator<(anonymous namespace)::RealFSDirIter> > in libLLVMSupport.a(VirtualFileSystem.cpp.o)
"std::__1::system_category()", referenced from:
std::__1::error_code::error_code() in libLLVMSupport.a(Error.cpp.o)
std::__1::error_code::error_code() in libLLVMSupport.a(raw_ostream.cpp.o)
std::__1::error_code::error_code() in libLLVMSupport.a(MemoryBuffer.cpp.o)
std::__1::error_code::error_code() in libLLVMTableGen.a(Main.cpp.o)
std::__1::error_code::error_code() in libLLVMSupport.a(Timer.cpp.o)
std::__1::error_code::error_code() in libLLVMSupport.a(CommandLine.cpp.o)
std::__1::error_code::error_code() in libLLVMSupport.a(Signals.cpp.o)
...
"std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator >::push_back(char)", referenced from:
std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator >::operator+=(char) in AsmMatcherEmitter.cpp.o
std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > std::__1::operator+<char, std::__1::char_traits, std::__1::allocator >(std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator >&&, char) in AsmMatcherEmitter.cpp.o
std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > std::__1::operator+<char, std::__1::char_traits, std::__1::allocator >(std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator >&&, char) in AsmWriterInst.cpp.o
std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > std::__1::operator+<char, std::__1::char_traits, std::__1::allocator >(std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator >&&, char) in CodeGenDAGPatterns.cpp.o
std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator >::operator+=(char) in CodeGenRegisters.cpp.o
std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator >::operator+=(char) in CodeGenSchedule.cpp.o
std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator >::operator+=(char) in CodeGenTarget.cpp.o
...
"std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator >::__init(unsigned long, char)", referenced from:
std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator >::basic_string(unsigned long, char) in AsmWriterInst.cpp.o
std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator >::basic_string(unsigned long, char) in CallingConvEmitter.cpp.o
std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator >::basic_string(unsigned long, char) in GlobalISelEmitter.cpp.o
std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator >::basic_string(unsigned long, char) in InstrDocsEmitter.cpp.o
std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator >::basic_string(unsigned long, char) in OptRSTEmitter.cpp.o
std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator >::basic_string(unsigned long, char) in libLLVMSupport.a(StringRef.cpp.o)
std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator >::basic_string(unsigned long, char) in libLLVMSupport.a(Timer.cpp.o)
...
"std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator >::compare(unsigned long, unsigned long, char const*, unsigned long) const", referenced from:
bool std::__1::operator==<char, std::__1::char_traits, std::__1::allocator >(std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&, char const*) in AsmMatcherEmitter.cpp.o
bool std::__1::operator==<char, std::__1::char_traits, std::__1::allocator >(std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&, char const*) in CodeGenInstruction.cpp.o
bool std::__1::operator==<char, std::__1::char_traits, std::__1::allocator >(std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&, char const*) in CodeGenTarget.cpp.o
bool std::__1::operator==<char, std::__1::char_traits, std::__1::allocator >(std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&, char const*) in DAGISelMatcherEmitter.cpp.o
bool std::__1::operator==<char, std::__1::char_traits, std::__1::allocator >(std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&, char const*) in DisassemblerEmitter.cpp.o
bool std::__1::operator==<char, std::__1::char_traits, std::__1::allocator >(std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&, char const*) in FastISelEmitter.cpp.o
bool std::__1::operator==<char, std::__1::char_traits, std::__1::allocator >(std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&, char const*) in FixedLenDecoderEmitter.cpp.o
...
"std::__1::to_string(int)", referenced from:
(anonymous namespace)::RISCVCompressInstEmitter::emitCompressInstEmitter(llvm::raw_ostream&, (anonymous namespace)::RISCVCompressInstEmitter::EmitterType) in RISCVCompressInstEmitter.cpp.o
"std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator >::__init(char const*, unsigned long, unsigned long)", referenced from:
std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > std::__1::operator+<char, std::__1::char_traits, std::__1::allocator >(std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&, char const*) in AsmMatcherEmitter.cpp.o
std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > std::__1::operator+<char, std::__1::char_traits, std::__1::allocator >(std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&, char const*) in AsmWriterInst.cpp.o
std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > std::__1::operator+<char, std::__1::char_traits, std::__1::allocator >(std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&, std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&) in CodeGenDAGPatterns.cpp.o
std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > std::__1::operator+<char, std::__1::char_traits, std::__1::allocator >(std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&, char const*) in CodeGenInstruction.cpp.o
std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > std::__1::operator+<char, std::__1::char_traits, std::__1::allocator >(std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&, char const*) in CodeGenRegisters.cpp.o
std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > std::__1::operator+<char, std::__1::char_traits, std::__1::allocator >(std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&, char const*) in CodeGenSchedule.cpp.o
std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > std::__1::operator+<char, std::__1::char_traits, std::__1::allocator >(std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&, char const*) in CodeGenTarget.cpp.o
...
"std::__1::__shared_weak_count::__release_weak()", referenced from:
std::__1::__shared_weak_count::__release_shared() in CodeGenDAGPatterns.cpp.o
std::__1::__shared_weak_count::__release_shared() in libLLVMSupport.a(Path.cpp.o)
std::__1::__shared_weak_count::__release_shared() in libLLVMSupport.a(VirtualFileSystem.cpp.o)
"std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator >::__grow_by(unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long)", referenced from:
std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator >& std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator >::__append_forward_unsafe<char const*>(char const*, char const*) in AsmMatcherEmitter.cpp.o
std::__1::enable_if<(__is_cpp17_forward_iterator<char const*>::value) && (__libcpp_string_gets_noexcept_iterator<char const*>::value), std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator >&>::type std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator >::assign<char const*>(char const*, char const*) in CodeGenDAGPatterns.cpp.o
"vtable for std::__1::error_category", referenced from:
std::__1::error_category::error_category() in libLLVMSupport.a(Error.cpp.o)
NOTE: a missing vtable usually means the first non-inline virtual member function has no definition.
"operator new[](unsigned long)", referenced from:
llvm::CachedHashString::CachedHashString(llvm::CachedHashString const&) in AsmMatcherEmitter.cpp.o
llvm::CachedHashString::CachedHashString(llvm::StringRef, unsigned int) in AsmMatcherEmitter.cpp.o
llvm::raw_ostream::SetBufferSize(unsigned long) in FixedLenDecoderEmitter.cpp.o
unsigned int llvm::ComputeEditDistance(llvm::ArrayRef, llvm::ArrayRef, bool, unsigned int) in libLLVMSupport.a(StringRef.cpp.o)
llvm::circular_raw_ostream::circular_raw_ostream(llvm::raw_ostream&, char const*, unsigned long, bool) in libLLVMSupport.a(Debug.cpp.o)
getClearedMemory(unsigned int) in libLLVMSupport.a(APInt.cpp.o)
getMemory(unsigned int) in libLLVMSupport.a(APInt.cpp.o)
...
"std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator >::basic_string()", referenced from:
llvm::cl::opt_storage<std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator >, false, true>::opt_storage() in AsmMatcherEmitter.cpp.o
"vtable for std::__1::__shared_count", referenced from:
std::__1::__shared_count::__shared_count(long) in CodeGenDAGPatterns.cpp.o
std::__1::__shared_count::__shared_count(long) in libLLVMSupport.a(Path.cpp.o)
std::__1::__shared_count::__shared_count(long) in libLLVMSupport.a(VirtualFileSystem.cpp.o)
NOTE: a missing vtable usually means the first non-inline virtual member function has no definition.
"std::nothrow", referenced from:
std::__1::pair<std::__1::unique_ptr<(anonymous namespace)::MatchableInfo, std::__1::default_delete<(anonymous namespace)::MatchableInfo> >, long> std::__1::get_temporary_buffer<std::__1::unique_ptr<(anonymous namespace)::MatchableInfo, std::__1::default_delete<(anonymous namespace)::MatchableInfo> > >(long) in AsmMatcherEmitter.cpp.o
std::__1::pair<unsigned int
, long> std::__1::get_temporary_buffer(long) in CodeGenRegisters.cpp.o
std::__1::pair<llvm::CodeGenRegisterClass**, long> std::__1::get_temporary_bufferllvm::CodeGenRegisterClass*(long) in CodeGenTarget.cpp.o
std::__1::pair<llvm::PatternToMatch const**, long> std::__1::get_temporary_buffer<llvm::PatternToMatch const*>(long) in DAGISelEmitter.cpp.o
std::__1::pair<std::__1::unique_ptr<(anonymous namespace)::OperandPredicateMatcher, std::__1::default_delete<(anonymous namespace)::OperandPredicateMatcher> >, long> std::__1::get_temporary_buffer<std::__1::unique_ptr<(anonymous namespace)::OperandPredicateMatcher, std::__1::default_delete<(anonymous namespace)::OperandPredicateMatcher> > >(long) in GlobalISelEmitter.cpp.o
std::__1::pair<(anonymous namespace)::RuleMatcher
, long> std::__1::get_temporary_buffer<(anonymous namespace)::RuleMatcher>(long) in GlobalISelEmitter.cpp.o
std::__1::pair<(anonymous namespace)::Matcher**, long> std::__1::get_temporary_buffer<(anonymous namespace)::Matcher*>(long) in GlobalISelEmitter.cpp.o
...
"std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator >::insert(unsigned long, char const*)", referenced from:
std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > std::__1::operator+<char, std::__1::char_traits, std::__1::allocator >(char const*, std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator >&&) in AsmMatcherEmitter.cpp.o
std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > std::__1::operator+<char, std::__1::char_traits, std::__1::allocator >(char const*, std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator >&&) in AsmWriterEmitter.cpp.o
std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > std::__1::operator+<char, std::__1::char_traits, std::__1::allocator >(char const*, std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator >&&) in AsmWriterInst.cpp.o
std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > std::__1::operator+<char, std::__1::char_traits, std::__1::allocator >(char const*, std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator >&&) in CodeEmitterGen.cpp.o
std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > std::__1::operator+<char, std::__1::char_traits, std::__1::allocator >(char const*, std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator >&&) in CodeGenDAGPatterns.cpp.o
std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > std::__1::operator+<char, std::__1::char_traits, std::__1::allocator >(char const*, std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator >&&) in CodeGenMapTable.cpp.o
std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > std::__1::operator+<char, std::__1::char_traits, std::__1::allocator >(char const*, std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator >&&) in CodeGenSchedule.cpp.o
...
"std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator >::assign(char const*)", referenced from:
std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator >::operator=(char const*) in AsmMatcherEmitter.cpp.o
std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator >::operator=(char const*) in CodeGenDAGPatterns.cpp.o
std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator >::operator=(char const*) in CodeGenInstruction.cpp.o
std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator >::operator=(char const*) in CodeGenTarget.cpp.o
std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator >::operator=(char const*) in DisassemblerEmitter.cpp.o
std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator >::operator=(char const*) in GlobalISelEmitter.cpp.o
std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator >::operator=(char const*) in X86RecognizableInstr.cpp.o
...
"std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator >::append(char const*)", referenced from:
std::__1::basic_string<char, std::__1::char_traits

@solas
Copy link
Author

solas commented Dec 1, 2020

If it helps, a hybrid install done
LLVM_CONFIG=/Users/..../Language/llvmlite_build/bin/llvm-config pip install llvmlite
and a partially fixed variant of (3) above result in:

import llvmlite.binding as llvm
OSError: Could not load shared object file: libllvmlite.dylib

but llbllvmlite.dylib is directly in the binding directory within the installed site-packages....

@esc
Copy link
Member

esc commented Dec 1, 2020

@solas thank you for reporting this. You are experiencing a number of conflated issues. I would like to diagnose them one after another. If you are in urgent need of a working Numba on your machine, I would recommend to try a miniconda3/conda approach. As for the first issue, can you list which version of pip you are using?

@seibert
Copy link
Contributor

seibert commented Dec 1, 2020

Thanks to some information in this issue thread, I now understand the problem. It is likely that the version of pip you have does not know that macOS 10.x wheels are compatible with macOS 11. Interestingly, users who get their Python from Anaconda or conda-forge won't see this issue because platform.platform() reports the OS version as macOS-10.16, which lets pip fetch the existing wheels. Only the Apple-shipped Python reports the OS version correctly as macOS-11.0 (and presumably future versions of Python once Apple upstreams whatever patches they made), which unfortunately confuses pip.

As it happens, pip released version 20.3 yesterday, which includes a fix for this problem. Upgrade the pip inside your virtual environment with pip install --upgrade pip and you should be able to install the pre-built wheels.

@sklam sklam added question doc Issues/PRs related to documentation improvments labels Dec 1, 2020
@solas
Copy link
Author

solas commented Dec 1, 2020

Hi seibert, pip 20.3 does in fact solve (1) above. I also solved (3) by hand changing your cmake to use clang/++ only.
I don't think cc will work as per your docs, on BigSur.

I will open a separate ticket on this new issue: once this is all installed, I am seeing what many have seen in the past, which is: llvmlite cannot find its own embedded libllvmlite.dylib (and then subsequent dependent libraries). This is odd since I thought it was all statically linked. The only way to fix that is to have 1) an entire llvmlib library folder available 2) point DYLD_LIBRARY_PATH to that folder for any environment.

@pearu
Copy link
Contributor

pearu commented Dec 2, 2020

Comments in the description appear to apply to #663 as well.

@RippedCoder
Copy link

RippedCoder commented Dec 8, 2020

Hello guys. I am using MacOS BigSur(11.0.1) and I am having error installing llvmlite.
The exact error is pasted below. Does anyone know how to solve this issue ?
And I am using latest version of pip.

Running setup.py install for llvmlite ... error
ERROR: Command errored out with exit status 1:
command: /Library/Frameworks/Python.framework/Versions/3.9/bin/python3.9 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/tq/7h23qgpn7pvcgr4thxpwxjph0000gn/T/pip-install-aztnvx9r/llvmlite_7d8b7d9e31ef4ddd8f87527732cab6fa/setup.py'"'"'; file='"'"'/private/var/folders/tq/7h23qgpn7pvcgr4thxpwxjph0000gn/T/pip-install-aztnvx9r/llvmlite_7d8b7d9e31ef4ddd8f87527732cab6fa/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record /private/var/folders/tq/7h23qgpn7pvcgr4thxpwxjph0000gn/T/pip-record-_1_h9rpm/install-record.txt --single-version-externally-managed --compile --install-headers /Library/Frameworks/Python.framework/Versions/3.9/include/python3.9/llvmlite
cwd: /private/var/folders/tq/7h23qgpn7pvcgr4thxpwxjph0000gn/T/pip-install-aztnvx9r/llvmlite_7d8b7d9e31ef4ddd8f87527732cab6fa/
Complete output (29 lines):
running install
running build
got version from file /private/var/folders/tq/7h23qgpn7pvcgr4thxpwxjph0000gn/T/pip-install-aztnvx9r/llvmlite_7d8b7d9e31ef4ddd8f87527732cab6fa/llvmlite/_version.py {'version': '0.34.0', 'full': 'c5889c9e98c6b19d5d85ebdd982d64a03931f8e2'}
running build_ext
/Library/Frameworks/Python.framework/Versions/3.9/bin/python3.9 /private/var/folders/tq/7h23qgpn7pvcgr4thxpwxjph0000gn/T/pip-install-aztnvx9r/llvmlite_7d8b7d9e31ef4ddd8f87527732cab6fa/ffi/build.py
LLVM version... Traceback (most recent call last):
File "/private/var/folders/tq/7h23qgpn7pvcgr4thxpwxjph0000gn/T/pip-install-aztnvx9r/llvmlite_7d8b7d9e31ef4ddd8f87527732cab6fa/ffi/build.py", line 105, in main_posix
out = subprocess.check_output([llvm_config, '--version'])
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/subprocess.py", line 420, in check_output
return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/subprocess.py", line 501, in run
with Popen(*popenargs, **kwargs) as process:
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/subprocess.py", line 947, in init
self._execute_child(args, executable, preexec_fn, close_fds,
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/subprocess.py", line 1819, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'llvm-config'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/private/var/folders/tq/7h23qgpn7pvcgr4thxpwxjph0000gn/T/pip-install-aztnvx9r/llvmlite_7d8b7d9e31ef4ddd8f87527732cab6fa/ffi/build.py", line 191, in <module>
    main()
  File "/private/var/folders/tq/7h23qgpn7pvcgr4thxpwxjph0000gn/T/pip-install-aztnvx9r/llvmlite_7d8b7d9e31ef4ddd8f87527732cab6fa/ffi/build.py", line 185, in main
    main_posix('osx', '.dylib')
  File "/private/var/folders/tq/7h23qgpn7pvcgr4thxpwxjph0000gn/T/pip-install-aztnvx9r/llvmlite_7d8b7d9e31ef4ddd8f87527732cab6fa/ffi/build.py", line 107, in main_posix
    raise RuntimeError("%s failed executing, please point LLVM_CONFIG "
RuntimeError: llvm-config failed executing, please point LLVM_CONFIG to the path for llvm-config
error: command '/Library/Frameworks/Python.framework/Versions/3.9/bin/python3.9' failed with exit code 1
----------------------------------------

ERROR: Command errored out with exit status 1: /Library/Frameworks/Python.framework/Versions/3.9/bin/python3.9 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/tq/7h23qgpn7pvcgr4thxpwxjph0000gn/T/pip-install-aztnvx9r/llvmlite_7d8b7d9e31ef4ddd8f87527732cab6fa/setup.py'"'"'; file='"'"'/private/var/folders/tq/7h23qgpn7pvcgr4thxpwxjph0000gn/T/pip-install-aztnvx9r/llvmlite_7d8b7d9e31ef4ddd8f87527732cab6fa/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record /private/var/folders/tq/7h23qgpn7pvcgr4thxpwxjph0000gn/T/pip-record-_1_h9rpm/install-record.txt --single-version-externally-managed --compile --install-headers /Library/Frameworks/Python.framework/Versions/3.9/include/python3.9/llvmlite Check the logs for full command output.

@seibert
Copy link
Contributor

seibert commented Dec 8, 2020

In this case, the problem is that you are using Python 3.9 (not that you are using Big Sur), and we do not have wheels for Python 3.9 yet. Setup.py is attempting to build from source which requires LLVM, hence the llvm-config error. Note that if your ultimate goal is to install Numba, support for Python 3.9 won't be available until the next release: numba/numba#6345

@RippedCoder
Copy link

Ok ! I downgraded my Python to version 3.6 and it worked !

@costyn
Copy link

costyn commented Feb 20, 2021

In case anyone is reading this and wants a workaround, how I did it:

  • brew install python@3.8
  • brew unlink python@3.9 (which was already installed)
  • brew link python@3.8
  • pip install llvmlite

@HuangFJ
Copy link

HuangFJ commented Feb 26, 2021

In case anyone is reading this and wants a workaround, how I did it:

  • brew install python@3.8
  • brew unlink python@3.9 (which was already installed)
  • brew link python@3.8
  • pip install llvmlite

It works for me.

@programmingkidx
Copy link

I am on an M1 MacBook Air running Mac OS 11.1. I recently updated to pip version 22.0.3. When I ran 'pip install Numba' I saw this error:

Collecting numba
Using cached numba-0.55.1.tar.gz (2.3 MB)
Preparing metadata (setup.py) ... done
Collecting llvmlite<0.39,>=0.38.0rc1
Using cached llvmlite-0.38.0.tar.gz (129 kB)
Preparing metadata (setup.py) ... done
Requirement already satisfied: numpy<1.22,>=1.18 in /Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages (from numba) (1.21.1)
Requirement already satisfied: setuptools in /Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages (from numba) (56.0.0)
Using legacy 'setup.py install' for numba, since package 'wheel' is not installed.
Using legacy 'setup.py install' for llvmlite, since package 'wheel' is not installed.
Installing collected packages: llvmlite, numba
Running setup.py install for llvmlite ... error
error: subprocess-exited-with-error

× Running setup.py install for llvmlite did not run successfully.
│ exit code: 1
╰─> [14 lines of output]
running install
running build
got version from file /private/var/folders/6n/mlqd7hhx5kg4xvm7wml67rxc0000gn/T/pip-install-td7bdkex/llvmlite_112449016e7342ecb5e1201a02d9f18e/llvmlite/_version.py {'version': '0.38.0', 'full': 'f0365b91ce1e1f74c68785c6d0067f32f89857d9'}
running build_ext
/Library/Frameworks/Python.framework/Versions/3.9/bin/python3.9 /private/var/folders/6n/mlqd7hhx5kg4xvm7wml67rxc0000gn/T/pip-install-td7bdkex/llvmlite_112449016e7342ecb5e1201a02d9f18e/ffi/build.py
LLVM version... Traceback (most recent call last):
File "/private/var/folders/6n/mlqd7hhx5kg4xvm7wml67rxc0000gn/T/pip-install-td7bdkex/llvmlite_112449016e7342ecb5e1201a02d9f18e/ffi/build.py", line 220, in
main()
File "/private/var/folders/6n/mlqd7hhx5kg4xvm7wml67rxc0000gn/T/pip-install-td7bdkex/llvmlite_112449016e7342ecb5e1201a02d9f18e/ffi/build.py", line 214, in main
main_posix('osx', '.dylib')
File "/private/var/folders/6n/mlqd7hhx5kg4xvm7wml67rxc0000gn/T/pip-install-td7bdkex/llvmlite_112449016e7342ecb5e1201a02d9f18e/ffi/build.py", line 134, in main_posix
raise RuntimeError(msg) from None
RuntimeError: Could not find a llvm-config binary. There are a number of reasons this could occur, please see: https://llvmlite.readthedocs.io/en/latest/admin-guide/install.html#using-pip for help.
error: command '/Library/Frameworks/Python.framework/Versions/3.9/bin/python3.9' failed with exit code 1
[end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure

× Encountered error while trying to install package.
╰─> llvmlite

note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.

@esc
Copy link
Member

esc commented Feb 24, 2022

I am on an M1 MacBook Air running Mac OS 11.1. I recently updated to pip version 22.0.3. When I ran 'pip install Numba' I saw this error:

Collecting numba Using cached numba-0.55.1.tar.gz (2.3 MB) Preparing metadata (setup.py) ... done Collecting llvmlite<0.39,>=0.38.0rc1 Using cached llvmlite-0.38.0.tar.gz (129 kB) Preparing metadata (setup.py) ... done Requirement already satisfied: numpy<1.22,>=1.18 in /Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages (from numba) (1.21.1) Requirement already satisfied: setuptools in /Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages (from numba) (56.0.0) Using legacy 'setup.py install' for numba, since package 'wheel' is not installed. Using legacy 'setup.py install' for llvmlite, since package 'wheel' is not installed. Installing collected packages: llvmlite, numba Running setup.py install for llvmlite ... error error: subprocess-exited-with-error

× Running setup.py install for llvmlite did not run successfully. │ exit code: 1 ╰─> [14 lines of output] running install running build got version from file /private/var/folders/6n/mlqd7hhx5kg4xvm7wml67rxc0000gn/T/pip-install-td7bdkex/llvmlite_112449016e7342ecb5e1201a02d9f18e/llvmlite/_version.py {'version': '0.38.0', 'full': 'f0365b91ce1e1f74c68785c6d0067f32f89857d9'} running build_ext /Library/Frameworks/Python.framework/Versions/3.9/bin/python3.9 /private/var/folders/6n/mlqd7hhx5kg4xvm7wml67rxc0000gn/T/pip-install-td7bdkex/llvmlite_112449016e7342ecb5e1201a02d9f18e/ffi/build.py LLVM version... Traceback (most recent call last): File "/private/var/folders/6n/mlqd7hhx5kg4xvm7wml67rxc0000gn/T/pip-install-td7bdkex/llvmlite_112449016e7342ecb5e1201a02d9f18e/ffi/build.py", line 220, in main() File "/private/var/folders/6n/mlqd7hhx5kg4xvm7wml67rxc0000gn/T/pip-install-td7bdkex/llvmlite_112449016e7342ecb5e1201a02d9f18e/ffi/build.py", line 214, in main main_posix('osx', '.dylib') File "/private/var/folders/6n/mlqd7hhx5kg4xvm7wml67rxc0000gn/T/pip-install-td7bdkex/llvmlite_112449016e7342ecb5e1201a02d9f18e/ffi/build.py", line 134, in main_posix raise RuntimeError(msg) from None RuntimeError: Could not find a llvm-config binary. There are a number of reasons this could occur, please see: https://llvmlite.readthedocs.io/en/latest/admin-guide/install.html#using-pip for help. error: command '/Library/Frameworks/Python.framework/Versions/3.9/bin/python3.9' failed with exit code 1 [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip. error: legacy-install-failure

× Encountered error while trying to install package. ╰─> llvmlite

note: This is an issue with the package mentioned above, not pip. hint: See above for output from the failure.

Thank you for adding this. Better support for Numba and llvmlite is currently being worked on: #813 and we hope to make binary wheels available on PyPi with the next release.

@esc
Copy link
Member

esc commented Mar 26, 2022

Please subscribe to #799 for updates regarding wheel builds for pip install.

@esc
Copy link
Member

esc commented Mar 26, 2022

Closing as duplicate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
doc Issues/PRs related to documentation improvments duplicate question
Projects
None yet
Development

No branches or pull requests

9 participants