Skip to content
This repository has been archived by the owner on Jul 1, 2023. It is now read-only.

undefined reference to `pthread_create' #451

Open
baoleai opened this issue Jul 21, 2022 · 1 comment
Open

undefined reference to `pthread_create' #451

baoleai opened this issue Jul 21, 2022 · 1 comment

Comments

@baoleai
Copy link

baoleai commented Jul 21, 2022

Hi, when I build as follows

$ cd tensorpipe
$ mkdir build
$ cd build
$ cmake ../ -GNinja -DTP_BUILD_TESTING=ON
$ ninja

I got the following errors:

FAILED: tensorpipe/test/channel/cma/tensorpipe_channel_cma_probe
tensorpipe/libtensorpipe.a(context_impl.cc.o): In function std::thread::thread<void (tensorpipe::channel::cma::ContextImpl::*)(), tensorpipe::channel::cma::ContextImpl*>(void (tensorpipe::channel::cma::ContextImpl::*&&)(), tensorpipe::channel::cma::ContextImpl*&&)': context_impl.cc:(.text._ZNSt6threadC2IMN10tensorpipe7channel3cma11ContextImplEFvvEJPS4_EEEOT_DpOT0_[_ZNSt6threadC5IMN10tensorpipe7channel3cma11ContextImplEFvvEJPS4_EEEOT_DpOT0_]+0x33): undefined reference to pthread_create'
tensorpipe/libtensorpipe.a(system.cc.o): In function tensorpipe::setThreadName(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)': system.cc:(.text+0x1aa2): undefined reference to pthread_setname_np'
collect2: error: ld returned 1 exit status

My env is glibc 2.27 and g++ 7.5.

@baoleai
Copy link
Author

baoleai commented Jul 21, 2022

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

No branches or pull requests

1 participant