Notice: This issue has been resolved, but I don't see it in the stackoverflow, so I brought it up for others to refer to.
My execution environment is gcc (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0. When I add to the cmake file set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=thread -g -fno-omit-frame-pointer") and compile code, it report an error : /usr/bin/ld can't find libtsan_preinit.o
after my search, it is the bug of Ubuntu, refer to: https://bugs.launchpad.net/ubuntu/+source/gcc-9/+bug/2029910. if you use gcc 9.x in Ubuntu 20.04, you can use the following code to fix it.
# install dev package
sudo apt install libgcc-10-dev
# ln it
sudo ln -s /usr/lib/gcc/x86_64-linux-gnu/10/libtsan_preinit.o /usr/lib/libtsan_preinit.o
Have a good day, everyone:D