-
Notifications
You must be signed in to change notification settings - Fork 74.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tensorflow-2.3.0 build failed #41926
Comments
@beew |
Not work, updated setuptools to the latest version (49.2.1), failed again, similar but different error
Should add that I have the same setup with bazel 2.0 and was able to build tf 2.2.0 without a hitch. |
Facing the same issue on CI where we also use Ubuntu 16.04 + GCC 5.4.0 |
@Saduf2019 Your two links are completely different issues. |
According to HowardHinnant/date#477 it might be because of GCC itself. |
I have tried multiple versions of gcc but still not working. I tried to compile with gcc-9.3.0 installed in custom location but bazel said
I then tried gcc-7.5 and it said libstdc++.so.6 is missing GLIBCXX_3.4.26 (which is supported for libstdc++.so.6 in gcc-9.3.0) |
Using backported gcc-6 from ubuntu toolchain team worked for me: https://launchpad.net/~ubuntu-toolchain-r/+archive/ubuntu/test?field.series_filter=xenial Just install gcc-6, g++-6 and either setup alternatives for gcc/g++ or |
@beew You can also take a look at the header, there is support for disabling |
@lissyx Compiling with gcc-6.5 works, however, update alternatives is not enough, I got the error
So I had to make a conf file in /etc/ld.so.conf.d with /path/to/gcc-6.5.0/lib64 followed by sudo ldconfig Build was successful, but I am wondering if it will have other side effects by leaving this version of libstdc++.so.6 in the ld path? (tensorflow 2.3 won't run without it) Thanks |
@Saduf2019 The issue is clearly just that this cannot build with GCC 5.4. I have been able to do so with a little nasty patch: mozilla@6fad14b#diff-18a66e25fbcbd72730332a799ddee2ec This does had a define |
That depends on your needs. |
Hi, My question is really whether the presence of a higher libstdc++so.6 in the library path would interfere with projects compiled with a lower version. All the links provided by @Saduf2019 involve upgrading libstdc++so.6 one way or the other basically like what I have done, by making a config file in /etc/ld.so.conf.d, except I keep the older system version as well. I could set LD_LIBRARY_PATH at runtime but it is kind of cumbersome (or by adding it to LD_LIBRARY_PATH in the script I invoke to launch python-3.8 but it has the same concern since I have compiled quite a few python packages from source) BTW setting LD_LIBRARY_PATH doesn't work for compile time since bazel couldn't find it, only adding to /etc/ld.so.conf.d works. |
I've been facing the same error with gcc 5.4 but I can't update my gcc as anaconda doesn't have 6.x packages for gcc/gxx. I tried above mentioned patch as well as defined the macro
It looks like the way I've defined it isn't right. Could someone please help me define this macro? |
Have you applied the linked patch? Once that's the case, |
Yes, I've it applied -
|
Well, it's working for us, I can't do more. |
With same gcc 5.4? |
Okay. Thanks. |
@lissyx - The macro setting mentioned in bazelrc worked for cpu builds but not for gpu build. It looks like the same macro has to be defined for nvcc too. I've tried this |
no, I can't help you. again, what I shared is what we use and it works everywhere. |
The build is also working fine for us. I cannot reproduce the issue. Since we cannot reproduce the problem, one way we can help is if you can create a docker container where we can reproduce the problem, we may be able to debug and help. |
@gunan Have you tried on a distro using GCC 5.4 ? |
Thanks a lot everyone. I was able to fix the problem using GCC 5.4 by adding another line in bazelrc for setting --host_copt too as below.
|
Hi, I'm really confused about how to use the patch and where to set these two lines you mentioned. Could you please explain more details? Thanks a lot! |
The patch being talked here is
|
Thanks for your reply. What's the specific command line to add the additional stuff? Could you please tell me the detailed steps? I'm not familiar with the operations of patches. Thanks again! |
@Yuze-HE
|
Thank you very much! |
Is it something that will be integrated into TF build in some reasonable time period? |
@npanpaliya "edit the files mentioned here mozilla/tensorflow@6fad14b#diff-18a66e25fbcbd72730332a799ddee2ec." |
Editing the files in absl as per the changes mentioned at mozilla/tensorflow@6fad14b#diff-18a66e25fbcbd72730332a799ddee2ec. Regarding TF including these changes - I think it will probably not included by TF as these changes are needed to get TF built with older gcc 5.4. But TF community can comment more on this. |
Same issue with |
@npanpaliya Are you talking about this patch? mozilla@6fad14b#diff-8757a02eb58c1cd11dda17ad77b09ded795db562ed05acd02248b00d141356e6 |
I have 3 folder:
I applied <path_to_tensorflow>/third_party/com_google_absl_fix_mac_and_nvcc_build.patch on 2nd folder. Now you say to hand edit files from mozilla patch. |
I ended up adding
at the beginning of <path_to_tensorflow>/third_party/com_google_absl_fix_mac_and_nvcc_build.patch adding
in .bazelrc Build completed successfully with |
Hello, I followed your steps to compile tensorflow2.3.0, but it got this error:
My enviroment:
It's so wired. I have no idea about how to correct this ? |
Yes, but #20764 is not solved. |
worked for me |
wow, it's a good idea. |
cuda10.2 |
In v2.5, the bug still exists, and |
Thanks, but I applied this patch and added the two lines and still got the same error.. I checked the downloaded absl code and I am sure the patch is applied.
|
System information
Describe the problem
Cannot build tensorflow
Tensorflow configured with cuda and tensorrt enabled
build with
build failed with these output
The text was updated successfully, but these errors were encountered: