{"action":"created","issue":{"url":"https://api.github.com/repos/numba/llvmlite/issues/166","repository_url":"https://api.github.com/repos/numba/llvmlite","labels_url":"https://api.github.com/repos/numba/llvmlite/issues/166/labels{/name}","comments_url":"https://api.github.com/repos/numba/llvmlite/issues/166/comments","events_url":"https://api.github.com/repos/numba/llvmlite/issues/166/events","html_url":"https://github.com/numba/llvmlite/issues/166","id":147269866,"number":166,"title":"Can't build llvmlite, option --single-version-externally-managed not recognized","user":{"login":"krey","id":223908,"avatar_url":"https://avatars.githubusercontent.com/u/223908?v=3","gravatar_id":"","url":"https://api.github.com/users/krey","html_url":"https://github.com/krey","followers_url":"https://api.github.com/users/krey/followers","following_url":"https://api.github.com/users/krey/following{/other_user}","gists_url":"https://api.github.com/users/krey/gists{/gist_id}","starred_url":"https://api.github.com/users/krey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/krey/subscriptions","organizations_url":"https://api.github.com/users/krey/orgs","repos_url":"https://api.github.com/users/krey/repos","events_url":"https://api.github.com/users/krey/events{/privacy}","received_events_url":"https://api.github.com/users/krey/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2016-04-10T21:33:49Z","updated_at":"2016-04-10T22:54:17Z","closed_at":null,"body":"Hello thank you for fixing [https://github.com/numba/llvmlite/issues/150](https://github.com/numba/llvmlite/issues/150). I am trying to install llvmlite through pip and I get the following error:\r\n\r\n```\r\nCollecting git+git://github.com/numba/llvmlite\r\n  Cloning git://github.com/numba/llvmlite to /tmp/pip-5yuixewg-build\r\nInstalling collected packages: llvmlite\r\n  Running setup.py install for llvmlite ... error\r\n    Complete output from command /usr/bin/python -u -c \"import setuptools, tokenize;__file__='/tmp/pip-5yuixewg-build/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\\r\\n', '\\n'), __file__, 'exec'))\" install --record /tmp/pip-0wmlan94-record/install-record.txt --single-version-externally-managed --compile:\r\n    /home/krey/.local/lib/python3.5/site-packages/setuptools/dist.py:285: UserWarning: Normalizing '0.11.0.dev+6.gc329287' to '0.11.0.dev0+6.gc329287'\r\n      normalized_version,\r\n    usage: -c [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]\r\n       or: -c --help [cmd1 cmd2 ...]\r\n       or: -c --help-commands\r\n       or: -c cmd --help\r\n    \r\n    error: option --single-version-externally-managed not recognized\r\n```\r\nI get the same error going through pip and pip+github. Could you please advise me on fixing this?\r\n\r\nThank you,\r\n\r\nk"},"comment":{"url":"https://api.github.com/repos/numba/llvmlite/issues/comments/208087247","html_url":"https://github.com/numba/llvmlite/issues/166#issuecomment-208087247","issue_url":"https://api.github.com/repos/numba/llvmlite/issues/166","id":208087247,"user":{"login":"krey","id":223908,"avatar_url":"https://avatars.githubusercontent.com/u/223908?v=3","gravatar_id":"","url":"https://api.github.com/users/krey","html_url":"https://github.com/krey","followers_url":"https://api.github.com/users/krey/followers","following_url":"https://api.github.com/users/krey/following{/other_user}","gists_url":"https://api.github.com/users/krey/gists{/gist_id}","starred_url":"https://api.github.com/users/krey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/krey/subscriptions","organizations_url":"https://api.github.com/users/krey/orgs","repos_url":"https://api.github.com/users/krey/repos","events_url":"https://api.github.com/users/krey/events{/privacy}","received_events_url":"https://api.github.com/users/krey/received_events","type":"User","site_admin":false},"created_at":"2016-04-10T22:54:17Z","updated_at":"2016-04-10T22:54:17Z","body":"Oh dear\r\n\r\n```\r\nCollecting git+git://github.com/numba/llvmlite\r\n  Cloning git://github.com/numba/llvmlite to /tmp/pip-dhfiqr6k-build\r\nInstalling collected packages: llvmlite\r\n  Running setup.py install for llvmlite ... error\r\n    Complete output from command /usr/bin/python -u -c \"import setuptools, tokenize;__file__='/tmp/pip-dhfiqr6k-build/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\\r\\n', '\\n'), __file__, 'exec'))\" install --record /tmp/pip-k_0f2z3p-record/install-record.txt --compile --user --prefix=:\r\n    /home/krey/.local/lib/python3.5/site-packages/setuptools/dist.py:285: UserWarning: Normalizing '0.11.0.dev+6.gc329287' to '0.11.0.dev0+6.gc329287'\r\n      normalized_version,\r\n    running install\r\n    running build\r\n    got version from VCS {'version': '0.11.0.dev+6.gc329287', 'full': 'c3292876a5fb404205afee3febec3f3999417339'}\r\n    running build_ext\r\n    /usr/bin/python /tmp/pip-dhfiqr6k-build/ffi/build.py\r\n    LLVM version... 3.5.2\r\n    # static-libstdc++ avoids runtime dependencies on a\r\n    # particular libstdc++ version.\r\n    g++ -static-libstdc++ -shared -I/usr/include -DNDEBUG -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -O3 -fomit-frame-pointer -std=c++11 -fvisibility-inlines-hidden -fno-exceptions -fPIC -Woverloaded-virtual -ffunction-sections -fdata-sections -Wcast-qual -fno-rtti -g -flto assembly.cpp bitcode.cpp core.cpp initfini.cpp module.cpp value.cpp executionengine.cpp transforms.cpp passmanagers.cpp targets.cpp dylib.cpp linker.cpp -o libllvmlite.so -L/usr/lib -flto -Wl,--exclude-libs=ALL -lLLVMLTO -lLLVMObjCARCOpts -lLLVMLinker -lLLVMipo -lLLVMVectorize -lLLVMBitWriter -lLLVMIRReader -lLLVMAsmParser -lLLVMR600CodeGen -lLLVMR600Desc -lLLVMR600Info -lLLVMR600AsmPrinter -lLLVMSystemZDisassembler -lLLVMSystemZCodeGen -lLLVMSystemZAsmParser -lLLVMSystemZDesc -lLLVMSystemZInfo -lLLVMSystemZAsmPrinter -lLLVMHexagonCodeGen -lLLVMHexagonAsmPrinter -lLLVMHexagonDesc -lLLVMHexagonInfo -lLLVMNVPTXCodeGen -lLLVMNVPTXDesc -lLLVMNVPTXInfo -lLLVMNVPTXAsmPrinter -lLLVMCppBackendCodeGen -lLLVMCppBackendInfo -lLLVMMSP430CodeGen -lLLVMMSP430Desc -lLLVMMSP430Info -lLLVMMSP430AsmPrinter -lLLVMXCoreDisassembler -lLLVMXCoreCodeGen -lLLVMXCoreDesc -lLLVMXCoreInfo -lLLVMXCoreAsmPrinter -lLLVMMipsDisassembler -lLLVMMipsCodeGen -lLLVMMipsAsmParser -lLLVMMipsDesc -lLLVMMipsInfo -lLLVMMipsAsmPrinter -lLLVMAArch64Disassembler -lLLVMAArch64CodeGen -lLLVMAArch64AsmParser -lLLVMAArch64Desc -lLLVMAArch64Info -lLLVMAArch64AsmPrinter -lLLVMAArch64Utils -lLLVMARMDisassembler -lLLVMARMCodeGen -lLLVMARMAsmParser -lLLVMARMDesc -lLLVMARMInfo -lLLVMARMAsmPrinter -lLLVMPowerPCDisassembler -lLLVMPowerPCCodeGen -lLLVMPowerPCAsmParser -lLLVMPowerPCDesc -lLLVMPowerPCInfo -lLLVMPowerPCAsmPrinter -lLLVMSparcDisassembler -lLLVMSparcCodeGen -lLLVMSparcAsmParser -lLLVMSparcDesc -lLLVMSparcInfo -lLLVMSparcAsmPrinter -lLLVMTableGen -lLLVMDebugInfo -lLLVMOption -lLLVMX86Disassembler -lLLVMX86AsmParser -lLLVMX86CodeGen -lLLVMSelectionDAG -lLLVMAsmPrinter -lLLVMX86Desc -lLLVMX86Info -lLLVMX86AsmPrinter -lLLVMX86Utils -lLLVMJIT -lLLVMLineEditor -lLLVMMCAnalysis -lLLVMMCDisassembler -lLLVMInstrumentation -lLLVMInterpreter -lLLVMCodeGen -lLLVMScalarOpts -lLLVMInstCombine -lLLVMTransformUtils -lLLVMipa -lLLVMAnalysis -lLLVMProfileData -lLLVMMCJIT -lLLVMTarget -lLLVMRuntimeDyld -lLLVMObject -lLLVMMCParser -lLLVMBitReader -lLLVMExecutionEngine -lLLVMMC -lLLVMCore -lLLVMSupport -lz -lpthread -lffi -lcurses -ldl -lm\r\n    assembly.cpp: In function ‘LLVMOpaqueModule* LLVMPY_ParseAssembly(LLVMContextRef, const char*, const char**)’:\r\n    assembly.cpp:25:64: error: ‘parseAssemblyString’ was not declared in this scope\r\n         Module *m = parseAssemblyString(ir, error, *unwrap(context)).release();\r\n                                                                    ^\r\n    bitcode.cpp: In function ‘void LLVMPY_WriteBitcodeToString(LLVMModuleRef, const char**, size_t*)’:\r\n    bitcode.cpp:13:62: error: ‘LLVMWriteBitcodeToMemoryBuffer’ was not declared in this scope\r\n         LLVMMemoryBufferRef MB = LLVMWriteBitcodeToMemoryBuffer(M);\r\n                                                                  ^\r\n    core.cpp: In function ‘void LLVMPY_SetCommandLine(const char*, const char*)’:\r\n    core.cpp:36:46: error: ‘LLVMParseCommandLineOptions’ was not declared in this scope\r\n         LLVMParseCommandLineOptions(2, argv, NULL);\r\n                                                  ^\r\n    module.cpp: In function ‘LLVMOpaqueModule* LLVMPY_CloneModule(LLVMModuleRef)’:\r\n    module.cpp:223:29: error: ‘LLVMCloneModule’ was not declared in this scope\r\n         return LLVMCloneModule(M);\r\n                                 ^\r\n    executionengine.cpp: In function ‘LLVMOpaqueExecutionEngine* create_execution_engine(LLVMModuleRef, LLVMTargetMachineRef, char**)’:\r\n    executionengine.cpp:72:74: error: no matching function for call to ‘llvm::EngineBuilder::EngineBuilder(std::unique_ptr<llvm::Module>)’\r\n         llvm::EngineBuilder eb(std::unique_ptr<llvm::Module>(llvm::unwrap(M)));\r\n                                                                              ^\r\n    In file included from executionengine.cpp:6:0:\r\n    /usr/include/llvm/ExecutionEngine/ExecutionEngine.h:594:3: note: candidate: llvm::EngineBuilder::EngineBuilder(llvm::Module*)\r\n       EngineBuilder(Module *m) : M(m) {\r\n       ^\r\n    /usr/include/llvm/ExecutionEngine/ExecutionEngine.h:594:3: note:   no known conversion for argument 1 from ‘std::unique_ptr<llvm::Module>’ to ‘llvm::Module*’\r\n    /usr/include/llvm/ExecutionEngine/ExecutionEngine.h:570:7: note: candidate: llvm::EngineBuilder::EngineBuilder(const llvm::EngineBuilder&)\r\n     class EngineBuilder {\r\n           ^\r\n    /usr/include/llvm/ExecutionEngine/ExecutionEngine.h:570:7: note:   no known conversion for argument 1 from ‘std::unique_ptr<llvm::Module>’ to ‘const llvm::EngineBuilder&’\r\n    /usr/include/llvm/ExecutionEngine/ExecutionEngine.h:570:7: note: candidate: llvm::EngineBuilder::EngineBuilder(llvm::EngineBuilder&&)\r\n    /usr/include/llvm/ExecutionEngine/ExecutionEngine.h:570:7: note:   no known conversion for argument 1 from ‘std::unique_ptr<llvm::Module>’ to ‘llvm::EngineBuilder&&’\r\n    executionengine.cpp: In function ‘uint64_t LLVMPY_GetGlobalValueAddress(LLVMExecutionEngineRef, const char*)’:\r\n    executionengine.cpp:107:46: error: ‘LLVMGetGlobalValueAddress’ was not declared in this scope\r\n         return LLVMGetGlobalValueAddress(EE, Name);\r\n                                                  ^\r\n    executionengine.cpp: In function ‘uint64_t LLVMPY_GetFunctionAddress(LLVMExecutionEngineRef, const char*)’:\r\n    executionengine.cpp:114:43: error: ‘LLVMGetFunctionAddress’ was not declared in this scope\r\n         return LLVMGetFunctionAddress(EE, Name);\r\n                                               ^\r\n    executionengine.cpp: At global scope:\r\n    executionengine.cpp:187:45: error: ‘llvm::MemoryBufferRef’ has not been declared\r\n                                           llvm::MemoryBufferRef MBR)\r\n                                                 ^\r\n    executionengine.cpp:200:49: error: conflicting return type specified for ‘virtual std::unique_ptr<llvm::MemoryBuffer> LLVMPYObjectCache::getObject(const llvm::Module*)’\r\n         virtual std::unique_ptr<llvm::MemoryBuffer> getObject(const llvm::Module* M)\r\n                                                     ^\r\n    In file included from executionengine.cpp:8:0:\r\n    /usr/include/llvm/ExecutionEngine/ObjectCache.h:36:25: error:   overriding ‘virtual llvm::MemoryBuffer* llvm::ObjectCache::getObject(const llvm::Module*)’\r\n       virtual MemoryBuffer* getObject(const Module* M) = 0;\r\n                             ^\r\n    /usr/include/llvm/ExecutionEngine/ObjectCache.h:30:16: warning: ‘virtual void llvm::ObjectCache::notifyObjectCompiled(const llvm::Module*, const llvm::MemoryBuffer*)’ was hidden [-Woverloaded-virtual]\r\n       virtual void notifyObjectCompiled(const Module *M, const MemoryBuffer *Obj) = 0;\r\n                    ^\r\n    executionengine.cpp:186:18: warning:   by ‘virtual void LLVMPYObjectCache::notifyObjectCompiled(const llvm::Module*, int)’ [-Woverloaded-virtual]\r\n         virtual void notifyObjectCompiled(const llvm::Module *M,\r\n                      ^\r\n    executionengine.cpp: In member function ‘virtual void LLVMPYObjectCache::notifyObjectCompiled(const llvm::Module*, int)’:\r\n    executionengine.cpp:191:42: error: request for member ‘getBufferStart’ in ‘MBR’, which is of non-class type ‘int’\r\n                                          MBR.getBufferStart(),\r\n                                              ^\r\n    executionengine.cpp:192:42: error: request for member ‘getBufferSize’ in ‘MBR’, which is of non-class type ‘int’\r\n                                          MBR.getBufferSize() };\r\n                                              ^\r\n    executionengine.cpp: In member function ‘virtual std::unique_ptr<llvm::MemoryBuffer> LLVMPYObjectCache::getObject(const llvm::Module*)’:\r\n    executionengine.cpp:211:21: error: no match for ‘operator=’ (operand types are ‘std::unique_ptr<llvm::MemoryBuffer>’ and ‘llvm::MemoryBuffer*’)\r\n                     res = llvm::MemoryBuffer::getMemBufferCopy(\r\n                         ^\r\n    In file included from /usr/include/c++/5.3.0/memory:81:0,\r\n                     from /usr/include/llvm/ADT/SmallVector.h:28,\r\n                     from /usr/include/llvm/IR/DataLayout.h:24,\r\n                     from /usr/include/llvm/IR/Module.h:20,\r\n                     from executionengine.cpp:5:\r\n    /usr/include/c++/5.3.0/bits/unique_ptr.h:249:7: note: candidate: std::unique_ptr<_Tp, _Dp>& std::unique_ptr<_Tp, _Dp>::operator=(std::unique_ptr<_Tp, _Dp>&&) [with _Tp = llvm::MemoryBuffer; _Dp = std::default_delete<llvm::MemoryBuffer>]\r\n           operator=(unique_ptr&& __u) noexcept\r\n           ^\r\n    /usr/include/c++/5.3.0/bits/unique_ptr.h:249:7: note:   no known conversion for argument 1 from ‘llvm::MemoryBuffer*’ to ‘std::unique_ptr<llvm::MemoryBuffer>&&’\r\n    /usr/include/c++/5.3.0/bits/unique_ptr.h:269:2: note: candidate: template<class _Up, class _Ep> typename std::enable_if<std::__and_<std::is_convertible<typename std::unique_ptr<_Up, _Ep>::pointer, typename std::unique_ptr<_Tp, _Dp>::_Pointer::type>, std::__not_<std::is_array<_Up> > >::value, std::unique_ptr<_Tp, _Dp>&>::type std::unique_ptr<_Tp, _Dp>::operator=(std::unique_ptr<_Up, _Ep>&&) [with _Up = _Up; _Ep = _Ep; _Tp = llvm::MemoryBuffer; _Dp = std::default_delete<llvm::MemoryBuffer>]\r\n      operator=(unique_ptr<_Up, _Ep>&& __u) noexcept\r\n      ^\r\n    /usr/include/c++/5.3.0/bits/unique_ptr.h:269:2: note:   template argument deduction/substitution failed:\r\n    executionengine.cpp:211:21: note:   mismatched types ‘std::unique_ptr<_Tp, _Dp>’ and ‘llvm::MemoryBuffer*’\r\n                     res = llvm::MemoryBuffer::getMemBufferCopy(\r\n                         ^\r\n    In file included from /usr/include/c++/5.3.0/memory:81:0,\r\n                     from /usr/include/llvm/ADT/SmallVector.h:28,\r\n                     from /usr/include/llvm/IR/DataLayout.h:24,\r\n                     from /usr/include/llvm/IR/Module.h:20,\r\n                     from executionengine.cpp:5:\r\n    /usr/include/c++/5.3.0/bits/unique_ptr.h:278:7: note: candidate: std::unique_ptr<_Tp, _Dp>& std::unique_ptr<_Tp, _Dp>::operator=(std::nullptr_t) [with _Tp = llvm::MemoryBuffer; _Dp = std::default_delete<llvm::MemoryBuffer>; std::nullptr_t = std::nullptr_t]\r\n           operator=(nullptr_t) noexcept\r\n           ^\r\n    /usr/include/c++/5.3.0/bits/unique_ptr.h:278:7: note:   no known conversion for argument 1 from ‘llvm::MemoryBuffer*’ to ‘std::nullptr_t’\r\n    executionengine.cpp: In function ‘LLVMPYObjectCache* LLVMPY_CreateObjectCache(ObjectCacheNotifyFunc, ObjectCacheGetObjectFunc, void*)’:\r\n    executionengine.cpp:233:72: error: invalid new-expression of abstract class type ‘LLVMPYObjectCache’\r\n         return new LLVMPYObjectCache(notify_func, getobject_func, user_data);\r\n                                                                            ^\r\n    executionengine.cpp:176:7: note:   because the following virtual functions are pure within ‘LLVMPYObjectCache’:\r\n     class LLVMPYObjectCache : public llvm::ObjectCache {\r\n           ^\r\n    In file included from executionengine.cpp:8:0:\r\n    /usr/include/llvm/ExecutionEngine/ObjectCache.h:30:16: note: \tvirtual void llvm::ObjectCache::notifyObjectCompiled(const llvm::Module*, const llvm::MemoryBuffer*)\r\n       virtual void notifyObjectCompiled(const Module *M, const MemoryBuffer *Obj) = 0;\r\n                    ^\r\n    targets.cpp:7:45: fatal error: llvm/Analysis/TargetLibraryInfo.h: No such file or directory\r\n    compilation terminated.\r\n    linker.cpp: In function ‘int LLVMPY_LinkModules(LLVMModuleRef, LLVMModuleRef, int, const char**)’:\r\n    linker.cpp:19:32: error: ‘DiagnosticInfo’ does not name a type\r\n         auto diagnose = [&] (const DiagnosticInfo &DI) {\r\n                                    ^\r\n    linker.cpp:30:6: error: expected ‘)’ before ‘;’ token\r\n         };\r\n          ^\r\n    linker.cpp: In lambda function:\r\n    linker.cpp:30:6: error: expected ‘{’ before ‘;’ token\r\n    linker.cpp: In function ‘int LLVMPY_LinkModules(LLVMModuleRef, LLVMModuleRef, int, const char**)’:\r\n    linker.cpp:32:34: error: ‘LLVMCloneModule’ was not declared in this scope\r\n             Src = LLVMCloneModule(Src);\r\n                                      ^\r\n    linker.cpp:33:74: error: no matching function for call to ‘llvm::Linker::LinkModules(llvm::Module*, llvm::Module*, LLVMPY_LinkModules(LLVMModuleRef, LLVMModuleRef, int, const char**)::<lambda(int)>&)’\r\n         bool failed = Linker::LinkModules(unwrap(Dest), unwrap(Src), diagnose);\r\n                                                                              ^\r\n    In file included from linker.cpp:4:0:\r\n    /usr/include/llvm/Linker/Linker.h:51:17: note: candidate: static bool llvm::Linker::LinkModules(llvm::Module*, llvm::Module*, unsigned int, std::__cxx11::string*)\r\n         static bool LinkModules(Module *Dest, Module *Src, unsigned Mode,\r\n                     ^\r\n    /usr/include/llvm/Linker/Linker.h:51:17: note:   candidate expects 4 arguments, 3 provided\r\n    Makefile.linux:19: recipe for target 'libllvmlite.so' failed\r\n    make: *** [libllvmlite.so] Error 1\r\n    Traceback (most recent call last):\r\n      File \"/tmp/pip-dhfiqr6k-build/ffi/build.py\", line 141, in <module>\r\n        main()\r\n      File \"/tmp/pip-dhfiqr6k-build/ffi/build.py\", line 131, in main\r\n        main_posix('linux', '.so')\r\n      File \"/tmp/pip-dhfiqr6k-build/ffi/build.py\", line 123, in main_posix\r\n        subprocess.check_call(['make', '-f', makefile])\r\n      File \"/usr/lib/python3.5/subprocess.py\", line 584, in check_call\r\n        raise CalledProcessError(retcode, cmd)\r\n    subprocess.CalledProcessError: Command '['make', '-f', 'Makefile.linux']' returned non-zero exit status 2\r\n    error: command '/usr/bin/python' failed with exit status 1\r\n    \r\n    ----------------------------------------\r\nCommand \"/usr/bin/python -u -c \"import setuptools, tokenize;__file__='/tmp/pip-dhfiqr6k-build/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\\r\\n', '\\n'), __file__, 'exec'))\" install --record /tmp/pip-k_0f2z3p-record/install-record.txt --compile --user --prefix=\" failed with error code 1 in /tmp/pip-dhfiqr6k-build/\r\n```"}}