Hi Junjie,
(Replying to list this time...)
Almost certainly pthread is present on your system. You can use apt-file
to find out where the libpthread.so file is (the library)
$ apt-file find libpthread.so
libc6: /lib/x86_64-linux-gnu/libpthread.so.0
The above path for me is in my default linker path, so it is sufficient
to ensure that your linking flags include "-lpthread" (check LDFLAGS, or
modify cmakelists.txt - ensure you delete CMakecache.txt for it to take
effect (occasionally this is not sufficient)) , in order for this to work.
Alternatively you could disable pthreads entirely, by ensuring that
pthread support is disabled.
option(enable-pthread "Enable POSIX threads support" OFF)
And ensure you don't set enable-pthr-widget or enable-pthread in some
other manner.