I encountered the same problem as you, as long as torch is compiled with clang. You can modify CMakeLists.txt to specify clang++ to compile your program, then _GLIBCXX_USE_CXX11_ABI will not be added, or use gcc to compile pytorch instead of clang.