You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
libstdc++.so.6: version `CXXABI_1.3.8' not found #15777
All of my tf-nightly Travis CI pipelines started failing today with following error
ImportError: /usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `CXXABI_1.3.8' not found (required by /home/travis/virtualenv/python3.5.4/lib/python3.5/site-packages/tensorflow/python/_pywrap_tensorflow_internal.so)
Give that this broke this morning, I suspect this breakage is due to build infrastructure change that was checked in yesterday, perhaps this one -- 4036422
I have a similar issue with Travis CI starting tonight:
ImportError: /usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.20' not found
(required by /home/travis/virtualenv/python2.7.14/lib/python2.7/site-
packages/tensorflow/python/_pywrap_tensorflow_internal.so)
ImportError: /usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.21' not found
(required by /usr/local/lib/python2.7/dist-packages/tensorflow/python/_pywrap_tensorflow_internal.so)
We made this decision because cuda 9 docker images using ubuntu 14 were not available, and we elected to keep all builds on the same base system image.
The last comment on that Travis issue is over a year old... I guess that means they want you to move to docker for real. You're of course welcome to use our CI docker images.
As @gunan noted, we cannot stay with old Ubuntu since CUDA won't let us.
Ubuntu 14 LTE doesn't become EOL until April 2019. Are we planning to move it out of our support matrix? (See go/tf-issues-triage) What about CentOS 7, which has gcc 4.8.5? What are the benefits of this new ABI?
If changing our support matrix is the consensus here, I'd suggest we go a step further and compile prebuilt binaries with SSE4 (maybe AVX2, possibly even AVX512) since that makes TensorFlow CPU 4x faster.
Otherwise, maybe it's possible to use _GLIBCXX_USE_CXX11_ABI to support the old ABI? According to this page, the new ABI is mostly meant to resolve the concerns of the C++ standards committee.
To further clarify, I agree with the points @martinwicke and @gunan made about CUDA being responsible for how much Ubuntu 14.04 support we can offer. I'm just hoping that doesn't rule out the possibility of TensorFlow CPU continuing to support Ubuntu 14.04.
fwiw while nvidia doesn't provide cuda9 docker images for 14.04, it's pretty simple to install cuda9 on a base ubuntu 14.04 image (or even take the cuda8 image and install cuda9 on it).
All you have to do is install via the cuda9 .run file and skip the driver install.
Technically, you are right that it is an easy task to build such images.
But we are mostly constrained by what is officially available, as there are more than just technical side to consider.
IMHO it's too early to drop support for Ubuntu 14.04 and Docker still needs time to mature (ie, 3 months ago you couldn't use GPUs properly with docker)
@jhseu That's likely correct. Although @angersson was right that writing a crosstool is the way to go. We'd just probably have to build it on Debian 8 in order to guarantee support for glibc 2.19 and higher. Thankfully Clang team maintains an apt repo so we can have Clang 6.0 on Debian 8. That way we can build portable binaries that support anything up to AVX-512.
Building on Debian 8 should create binaries that work on at least the following distros:
Ubuntu 14+
CentOS 7+
Debian 8+
SuSE 13.2+
Mint 17.3+
Manjaro 0.8.11
I sent out a PR adding such a toolchain in #16173 although we can't make any promises at this time quite yet, whether or not we'll be able to incorporate this into our release process.
This issue should be safe to close, now that TF 1.5 is rolled out. To recap:
This problem wasn't easy to solve, due to challenging constraints imposed by vendors—who shall remain nameless.
What fixed this is @av8ramit@gunan@case540 (among others) are now putting aside added time to manually build CPU releases on Ubuntu 14.04, to maintain the compatibility commitments we made to the community.
An optional Debian 8 Clang 6.0 toolchain now also exists, but wasn't what solved this issue; however, it can provide flexibility for folks in the community needing to do compatible source builds—particularly ones that take advantage of recent instructions sets, e.g. AVX-512, on old distros with very recent hardware.
Please note I'm not sure what the status is for tf-nightly, which might not be Ubuntu 14 compatible.
Oh, for posterity, here are some facts we uncovered for anyone who's interested in using Debian 8 with Clang. This could potentially be useful for other people in the industry who are interested in distributing TensorFlow.
Debian 8 Jessie (lifetime 2015→2020) is my personal favorite. Clang team maintains an apt repo for Debian 8. The two have a surprising degree of synergy.
Unlike the GCC 4.9.2 which comes included with Debian 8, Clang 6.0 is able to generate opcodes for more recent instruction sets, e.g. AVX-512. Those can make TF potentially 10x faster on CPUs like Skylake Xeons (c. 2015) assuming -march=native is used.
If one's goal is compatibility, -msse3 is a safe optimization that works on nearly every x86_64 CPU in existence. For example, the optional TF Debian 8 Clang 6 Bazel CROSSTOOL should in theory create binaries that are compatible with:
Some facts we uncovered about x86 CPUs (w.r.t. scientific computing):
# Noteworthy CPU Features
SSE 128-bit vector instructions (e.g. addps http://www.felixcloutier.com/x86/ADDPS.html)
SSE4.1 Makes SSE good
SSE4.2 Makes SSE do strings and CRC32
AVX Makes SSE 256-bit (e.g. vaddps)
AVX2 Adds features to AVX
AVX-512 Makes SSE 512-bit
SHA Makes SSE do SHA1 and SHA256
FMA Fused multiply–add
CLMUL Carry-less multiplication https://goo.gl/ritKJX
TSX Transactional memory instructions for threads http://www.intel.com/software/tsx
# Intel CPU Line
2003 P6 M SSE SSE2
2004 prescott SSE3 SSSE3 (-march=prescott)
2006 core X64 SSE4.1 (only on 45nm variety) (-march=core2)
2008 nehalem SSE4.2 VT-x VT-d (-march=nehalem)
2010 westmere CLMUL AES (-march=westmere)
2012 sandybridge AVX TXT (-march=sandybridge)
2012 ivybridge F16C MOVBE (-march=ivybridge)
2013 haswell AVX2 TSX BMI2 FMA (-march=haswell)
2014 broadwell RDSEED ADCX PREFETCHW (-march=broadwell - works on trusty gcc4.9)
2015 skylake SGX ADX MPX AVX-512[xeon-only] (-march=skylake / -march=skylake-avx512 - needs gcc7)
2018 cannonlake AVX-512 SHA (-march=cannonlake - needs clang5)
# Intel Low Power CPU Line
2013 silvermont SSE4.1 SSE4.2 VT-x (-march=silvermont)
2016 goldmont SHA (-march=goldmont - needs clang5)
# AMD CPU Line
2003 k8 SSE SSE2 (-march=k8)
2005 k8 (Venus) SSE3 (-march=k8-sse3)
2008 barcelona SSE4a?! (-march=barcelona)
2011 bulldozer SSE4.1 SSE4.2 CLMUL AVX AES FMA4?! (-march=bdver1)
2011 piledriver FMA (-march=bdver2)
2015 excavator AVX2 BMI2 MOVBE (-march=bdver4)
# Google Compute Engine Supported CPUs
# https://cloud.google.com/compute/docs/cpu-platforms
2012 sandybridge 2.6gHz -march=sandybridge
2012 ivybridge 2.5gHz -march=ivybridge
2013 haswell 2.3gHz -march=haswell
2014 broadwell 2.2gHz -march=broadwell
2015 skylake 2.0gHz -march=skylake-avx512
One possibility Debian/Ubuntu distributors could explore is:
# We might be able to say something like this in /etc/apt/sources.list
# so folks can get a package for their specific microarchitecture.
deb [arch=skylake] https://apt.tensorflow.org/ stretch stable
Please note -msse3 or -march=native is not a binary dilemma. It's possible to use a single Debian 8 machine to cross-compile to -march=whatever.
There also appear to be sweet-spot combinations where you can build binaries that support large subsets in-between. For example, the following optimized CFLAGS have been carefully selected to represent the points in time where Intel and AMD microarchitectures came into alignment.
Reacted by Regev Golan, Luis E. Banegas Saybe, tp53, Mehrshad Zandigohar, Ping Cheng, rainycrying, Jacob, Vijay Bandari, waldemarmeier, Hunter and 9 more
Activity
yaroslavvb commentedon Jan 1, 2018
PS, happy new year!
yaroslavvb commentedon Jan 2, 2018
Give that this broke this morning, I suspect this breakage is due to build infrastructure change that was checked in yesterday, perhaps this one -- 4036422
cc @gunan
alsrgv commentedon Jan 2, 2018
I have a similar issue with Travis CI starting tonight:
alsrgv commentedon Jan 2, 2018
Similarly, in Debian Jessie:
ppwwyyxx commentedon Jan 2, 2018
Debian jessie is only gcc 4.9 (https://packages.debian.org/jessie/devel/gcc), so still not new enough. The build infra was switched to 16.04 in the new year which uses gcc 5.3 by default (https://packages.ubuntu.com/xenial/gcc). According to the symbol versioning (https://gcc.gnu.org/onlinedocs/libstdc++/manual/abi.html) you'll need at least gcc 5.1 runtime to run it.
gunan commentedon Jan 2, 2018
Happy new year!
The issue is potentially a side effect of us moving our build machines up to ubuntu 16.
https://github.com/tensorflow/tensorflow/blob/r1.5/RELEASE.md
We made this decision because cuda 9 docker images using ubuntu 14 were not available, and we elected to keep all builds on the same base system image.
@jhseu @martinwicke FYI
alsrgv commentedon Jan 2, 2018
@yaroslavvb, Travis CI don't have plans to support Ubuntu 16 (travis-ci/travis-ci#5821), so it seems that our only recourse is to dockerize the tests (https://docs.travis-ci.com/user/docker/, e.g. horovod/horovod#136).
martinwicke commentedon Jan 2, 2018
The last comment on that Travis issue is over a year old... I guess that means they want you to move to docker for real. You're of course welcome to use our CI docker images.
As @gunan noted, we cannot stay with old Ubuntu since CUDA won't let us.
jart commentedon Jan 4, 2018
Ubuntu 14 LTE doesn't become EOL until April 2019. Are we planning to move it out of our support matrix? (See go/tf-issues-triage) What about CentOS 7, which has gcc 4.8.5? What are the benefits of this new ABI?
If changing our support matrix is the consensus here, I'd suggest we go a step further and compile prebuilt binaries with SSE4 (maybe AVX2, possibly even AVX512) since that makes TensorFlow CPU 4x faster.
Otherwise, maybe it's possible to use _GLIBCXX_USE_CXX11_ABI to support the old ABI? According to this page, the new ABI is mostly meant to resolve the concerns of the C++ standards committee.
jart commentedon Jan 4, 2018
To further clarify, I agree with the points @martinwicke and @gunan made about CUDA being responsible for how much Ubuntu 14.04 support we can offer. I'm just hoping that doesn't rule out the possibility of TensorFlow CPU continuing to support Ubuntu 14.04.
soumith commentedon Jan 4, 2018
fwiw while nvidia doesn't provide cuda9 docker images for 14.04, it's pretty simple to install cuda9 on a base ubuntu 14.04 image (or even take the cuda8 image and install cuda9 on it).
All you have to do is install via the cuda9
.runfile and skip the driver install.gunan commentedon Jan 4, 2018
Technically, you are right that it is an easy task to build such images.
But we are mostly constrained by what is officially available, as there are more than just technical side to consider.
yaroslavvb commentedon Jan 5, 2018
IMHO it's too early to drop support for Ubuntu 14.04 and Docker still needs time to mature (ie, 3 months ago you couldn't use GPUs properly with docker)
11 remaining items
jhseu commentedon Jan 17, 2018
@angersson we would still have a glibc incompatibility even if we fix libstdc++.
Add C++ toolchain for portable Linux builds
jart commentedon Jan 17, 2018
@jhseu That's likely correct. Although @angersson was right that writing a crosstool is the way to go. We'd just probably have to build it on Debian 8 in order to guarantee support for glibc 2.19 and higher. Thankfully Clang team maintains an apt repo so we can have Clang 6.0 on Debian 8. That way we can build portable binaries that support anything up to AVX-512.
Building on Debian 8 should create binaries that work on at least the following distros:
I sent out a PR adding such a toolchain in #16173 although we can't make any promises at this time quite yet, whether or not we'll be able to incorporate this into our release process.
Add C++ toolchain for portable Linux builds
Add C++ toolchain for portable Linux builds (#16173)
jart commentedon Feb 6, 2018
This issue should be safe to close, now that TF 1.5 is rolled out. To recap:
This problem wasn't easy to solve, due to challenging constraints imposed by vendors—who shall remain nameless.
What fixed this is @av8ramit @gunan @case540 (among others) are now putting aside added time to manually build CPU releases on Ubuntu 14.04, to maintain the compatibility commitments we made to the community.
An optional Debian 8 Clang 6.0 toolchain now also exists, but wasn't what solved this issue; however, it can provide flexibility for folks in the community needing to do compatible source builds—particularly ones that take advantage of recent instructions sets, e.g. AVX-512, on old distros with very recent hardware.
Please note I'm not sure what the status is for tf-nightly, which might not be Ubuntu 14 compatible.
jart commentedon Feb 6, 2018
Oh, for posterity, here are some facts we uncovered for anyone who's interested in using Debian 8 with Clang. This could potentially be useful for other people in the industry who are interested in distributing TensorFlow.
Debian 8 Jessie (lifetime 2015→2020) is my personal favorite. Clang team maintains an apt repo for Debian 8. The two have a surprising degree of synergy.
Unlike the GCC 4.9.2 which comes included with Debian 8, Clang 6.0 is able to generate opcodes for more recent instruction sets, e.g. AVX-512. Those can make TF potentially 10x faster on CPUs like Skylake Xeons (c. 2015) assuming
-march=nativeis used.If one's goal is compatibility,
-msse3is a safe optimization that works on nearly every x86_64 CPU in existence. For example, the optional TF Debian 8 Clang 6 Bazel CROSSTOOL should in theory create binaries that are compatible with:Proof:
Some facts we uncovered about Linux distributions:
Some facts we uncovered about x86 CPUs (w.r.t. scientific computing):
One possibility Debian/Ubuntu distributors could explore is:
Please note
-msse3or-march=nativeis not a binary dilemma. It's possible to use a single Debian 8 machine to cross-compile to-march=whatever.There also appear to be sweet-spot combinations where you can build binaries that support large subsets in-between. For example, the following optimized CFLAGS have been carefully selected to represent the points in time where Intel and AMD microarchitectures came into alignment.
See also:
gmantova commentedon May 20, 2018
I get the same error while trying to run foxit pdf reader in ubuntu 17.10
babaknaimi commentedon Sep 30, 2018
The following solution worked for me on Centos 7:
Upgrade gcc version to 5.x.x, and then run the followings (depending on the gcc version, you may have a different file of libstdc++.so.6.0.25):
cp /usr/local/lib64/libstdc++.so.6.0.25 /lib64
cd /lib64
rm -rf libstdc++.so.6
ln -s libstdc++.so.6.0.25 libstdc++.so.6
vadamoto commentedon Mar 4, 2019
I get the same error on Centos 7
sakura7621 commentedon May 23, 2019
Upgrade gcc or degrade tensorflow version.
pip uninstall tensorflow
conda install tensorflow==1.12.0
plmsmile commentedon Sep 4, 2019
i get the same error when i
conda uninstall gccor install gcc new version.