-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Problems with include_paths when building TensorFlow 2.0 with Bazel 0.29.1 #10085
Comments
/cc @hlopko @meteorcloudy |
Also /cc @oquenchil |
I also exported GCC_HOST_COMPILER and GCC_HOST_COMPILER_PREFIX and it did not make a difference. I learnt from #4365 that TF does not use the default toolchain of bazel. So, probably modifying cc_configure.bzl was not required. However, even without modifying cc_configure.bzl, I continue to get the same error. I have verified that the environment variables are correctly exported and that gcc on its own is working fine. Therefore, I really need some assistance here on this matter. |
I have also tried with other versions of bazel such as 0.28.1 and the problem persists. |
@indranaut I see you are building TensorFlow with Cuda support, then the toolchain is generated by https://github.com/tensorflow/tensorflow/blob/master/third_party/gpus/cuda_configure.bzl#L1160, maybe you can try debug this file and see why your include path was not added to |
@meteorcloudy
|
I was suspecting that it could be due to some cache issue, but I have tried by cleaning the cache using |
The INCLUDE path doesn't look exactly the same,
But the
What is the |
It is due to a symbolic link. gpfslocalsup actually lies inside /gpfs7kro but there is a symbolic link to it present in /. |
I believe |
Well, ideally they should be there.
I think what is happening is that bazel instead of using the symlink path is trying to use the absolute path associated with the symlink. I do not know if this is an intended behavior or if there is an option to override this behavior. |
Can you rerun the build with |
Here is a small part of the output
|
What if you set |
Basically, I think CC should match what's in INCLUDE |
I think that your hunch is right. It begins to compile but later stops with the following error :
It is trying to locate I have already checked that the above path is not in
|
I think the ar path is affected by those two places: |
@meteorcloudy Thank you. This worked. I wrapped |
I hit the same problem. Instead of compiler from spack, I have gcc from linuxbrew. The same error shows up despite setting |
I have been trying to build TensorFlow 2.0 from the master branch on a Red Hat Linux Enterprise edition cluster.
The default GCC available is 4.8.5, and it is not possible to compile TensorFlow with it because it uses explicit
std=c++14
flag which is not available in GCC 4.8.5
Hence, I started using gcc/8.3.0 using a modulefile, which is configured as follows :
To compile TensorFlow, I first compiled bazel-0.29.1 and for that I modified the
tools/cpp/cc_toolchain_config.bzl
file as follows :
I replaced all occourances of
/usr/bin/gcc
,/usr/bin/gcov
,/usr/bin/nm
,/usr/bin/ar
,/usr/bin/cpp
with the binaries in PATH as shown above.I added the include path as shown above, to the list of
cxx_builtin_include_directory
present in the file.After that I proceeded to build TensorFlow.
The command used was :
CC=/gpfslocalsup/spack_soft/gcc/8.3.0/gcc-4.8.5-opnwtdjumg2hxo4ljvnx77ugb6afmvj3/bin/gcc bazel --output_user_root=/tmp/ujjwal-builds build --config=opt --config=cuda --config=mkl --config=numa //tensorflow/tools/pip_package:build_pip_package --verbose_failures
This ended up giving me the following error :
I have tried to search for solutions online but there are no satisfactory solutions. Can anyone please help me with what is going on here as it is important for me.
If it helps, I have attached the output of gcc and g++ include paths below :
The text was updated successfully, but these errors were encountered: