The TensorFlow OSS DevInfra Team is planning to upgrade the Linux wheels of TensorFlow to be manylinux2014 compatible. This has been in the works for a while and we are happy to announce that from Monday, March 21, we are going to start publishing manylinux2014 compatible TensorFlow nightly packages ahead of the next TensorFlow release, TensorFlow 2.9, which has its branch cut scheduled on March 29th, 2022 (tentative). As part of this upgrade, we are also shifting to using the new libstdcxx ABI which was discussed to be implemented as part of the manylinux upgrade in the March 2022 edition of TF Sig Build meeting.
Also on the 21st, the TF SIG Build Dockerfiles will change to use the new toolchain by default. As long as everything goes smoothly, the first manylinux2014 tf-nightly packages should arrive on Tuesday, March 22. If you’d like to help us test manylinux2014 packages before then, please use the links below.
If you would like to start testing the manylinux2014 packages for advanced comparison, here is a set of manylinux2010 and manylinux2014 packages we built at the same commit (9d98dc772).
Q1. I’m a downstream developer. How should I change my build process to be compatible with new TF wheels?
The ABI change is not compatible with the old (manylinux2010) wheels. To be compatible with the new TF wheels, please follow the instructions below:
- If you use TensorFlow’s toolchain/crosstool, upgrade to the new manylinux2014 crosstool. See the .bazelrc here.
- If your build contains the flag
--cxxopt=-D_GLIBCXX_USE_CXX11_ABI=0,change the 0 to 1. The new toolchain effectively sets this to 1 by default if it is not explicitly set.
Aside from the ABI flag change, the toolchain upgrade by itself (from devtoolset-7 to devtoolset-9) is not likely to cause breakages if your package does not already build with TensorFlow’s toolchains. If you do use TensorFlow’s toolchains, you should upgrade to the new manylinux2014 crosstool.
Q2. What kinds of breakages during the build process are most likely related to these changes?
- Linker errors / Undefined reference errors usually involving
RuntimeError: random_device could not be read