Build with _GLIBCXX_USE_CXX11_ABI=1

I want to build pytorch libs with _GLIBCXX_USE_CXX11_ABI=1 in branch v1.1.0. And I reivise file. But it seems not to work. Is there some suggents?


You can add set(GLIBCXX_USE_CXX11_ABI 1) in the beginning of pytorch/CMakeLists.txt.

1 Like

We now have new CXX11 ABI binaries for libtorch. They can be found on, or at

Seems like, the pip packages on linux use the GLIBCXX_USE_CXX11_ABI=0 some say the conda ones use GLIBCXX_USE_CXX11_ABI=1 . Under windows its always GLIBCXX_USE_CXX11_ABI=0` for cpu and cuda builds it seems. ( I tested the 1.6 version using pip )

This is important for people like me that have a python extension which uses libtorch .
This is still an issue in 1.6cpu! that I tested

Update, it seems the conda package on Linux is also built using GLIBCXX_USE_CXX11_ABI=0 so does the package on windows:

In [2]: torch._C._GLIBCXX_USE_CXX11_ABI                                                                                                                              
Out[2]: False

so basically all Pytorch packages are shipped with GLIBCXX_USE_CXX11_ABI=0 but why?