[llvm-bugs] [Bug 31616] New: undefined reference to pthread_create

via llvm-bugs llvm-bugs at lists.llvm.org
Thu Jan 12 01:29:01 PST 2017


https://llvm.org/bugs/show_bug.cgi?id=31616

            Bug ID: 31616
           Summary: undefined reference to pthread_create
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: libclang
          Assignee: unassignedclangbugs at nondot.org
          Reporter: xiangzhai83 at gmail.com
                CC: klimek at google.com, llvm-bugs at lists.llvm.org
    Classification: Unclassified

Created attachment 17833
  --> https://llvm.org/bugs/attachment.cgi?id=17833&action=edit
libclang-cmake-pthread.patch

Hi clang developers,

../../../../lib/libclangIncludeFixerPlugin.a(IncludeFixerPlugin.cpp.o): In
function
`std::__future_base::_Async_state_impl<std::_Bind_simple<std::function<std::unique_ptr<clang::include_fixer::SymbolIndex,
std::default_delete<clang::include_fixer::SymbolIndex> > ()> ()>,
std::unique_ptr<clang::include_fixer::SymbolIndex,
std::default_delete<clang::include_fixer::SymbolIndex> >
>::_Async_state_impl(std::_Bind_simple<std::function<std::unique_ptr<clang::include_fixer::SymbolIndex,
std::default_delete<clang::include_fixer::SymbolIndex> > ()> ()>&&)':
/data/project/LLVM/llvm/tools/clang/tools/extra/include-fixer/plugin/IncludeFixerPlugin.cpp:(.text._ZNSt13__future_base17_Async_state_implISt12_Bind_simpleIFSt8functionIFSt10unique_ptrIN5clang13include_fixer11SymbolIndexESt14default_deleteIS6_EEvEEvEES9_EC2EOSD_[_ZNSt13__future_base17_Async_state_implISt12_Bind_simpleIFSt8functionIFSt10unique_ptrIN5clang13include_fixer11SymbolIndexESt14default_deleteIS6_EEvEEvEES9_EC2EOSD_]+0xdf):
undefined reference to `pthread_create'
clang-3.9: error: linker command failed with exit code 1 (use -v to see
invocation)
tools/clang/tools/libclang/CMakeFiles/libclang.dir/build.make:631: recipe for
target 'lib/libclang.so.4.0' failed
make[2]: *** [lib/libclang.so.4.0] Error 1
CMakeFiles/Makefile2:32067: recipe for target
'tools/clang/tools/libclang/CMakeFiles/libclang.dir/all' failed
make[1]: *** [tools/clang/tools/libclang/CMakeFiles/libclang.dir/all] Error 2
Makefile:149: recipe for target 'all' failed
make: *** [all] Error 2


Workaround patched! please give me some advice, thanks a lot!

Regards,
Leslie Zhai

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20170112/db10a73c/attachment.html>


More information about the llvm-bugs mailing list