Closed t1nux closed 1 year ago
Setting this
export GCC_HOST_COMPILER_PATH=/usr/bin/gcc-10
export HOST_C_COMPILER=/usr/bin/gcc-10
export HOST_CXX_COMPILER=/usr/bin/g++-10
export CC=gcc-10
export CXX=g++-10
in PKGBUILD looks good at first, but eventually fails with
...
ERROR: /home/tinux/.cache/yay/tensorflow-rocm/src/tensorflow-2.4.0-rocm/tensorflow/BUILD:786:20: Linking tensorflow/libtensorflow.so.2.4.0 failed: (Exit 1): crosstool_wrapper_driver_is_not_gcc failed: error executing command external/local_config_rocm/crosstool/clang/bin/crosstool_wrapper_driver_is_not_gcc @bazel-out/k8-opt/bin/tensorflow/libtensorflow.so.2.4.0-2.params
bazel-out/k8-opt/bin/tensorflow/core/kernels/data/_objs/optional_ops_gpu/optional_ops.cu.pic.o:optional_ops.cu.cc:function tensorflow::Status tensorflow::data::OptionalZerosLike<Eigen::GpuDevice>(tensorflow::OpKernelContext*, tensorflow::data::OptionalVariant const&, tensorflow::data::OptionalVariant*): error: undefined reference to 'std::__throw_bad_array_new_length()'
bazel-out/k8-opt/bin/tensorflow/core/kernels/data/_objs/optional_ops_gpu/optional_ops.cu.pic.o:optional_ops.cu.cc:function tensorflow::Status tensorflow::data::OptionalBinaryAdd<Eigen::GpuDevice>(tensorflow::OpKernelContext*, tensorflow::data::OptionalVariant const&, tensorflow::data::OptionalVariant const&, tensorflow::data::OptionalVariant*): error: undefined reference to 'std::__throw_bad_array_new_length()'
bazel-out/k8-opt/bin/tensorflow/core/kernels/data/_objs/optional_ops_gpu/optional_ops.cu.pic.o:optional_ops.cu.cc:function std::_Hashtable<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::__detail::_Identity, std::equal_to<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::hash<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<true, true, true> >::_M_rehash_aux(unsigned long, std::integral_constant<bool, true>): error: undefined reference to 'std::__throw_bad_array_new_length()'
bazel-out/k8-opt/bin/tensorflow/core/kernels/data/_objs/optional_ops_gpu/optional_ops.cu.pic.o:optional_ops.cu.cc:function std::__shared_count<(__gnu_cxx::_Lock_policy)2>::__shared_count<std::vector<tensorflow::Tensor, std::allocator<tensorflow::Tensor> >, std::allocator<std::vector<tensorflow::Tensor, std::allocator<tensorflow::Tensor> > >, std::vector<tensorflow::Tensor, std::allocator<tensorflow::Tensor> > const&>(std::vector<tensorflow::Tensor, std::allocator<tensorflow::Tensor> >*&, std::_Sp_alloc_shared_tag<std::allocator<std::vector<tensorflow::Tensor, std::allocator<tensorflow::Tensor> > > >, std::vector<tensorflow::Tensor, std::allocator<tensorflow::Tensor> > const&): error: undefined reference to 'std::__throw_bad_array_new_length()'
collect2: error: ld returned 1 exit status
INFO: Elapsed time: 4006.308s, Critical Path: 358.11s
INFO: 16176 processes: 718 internal, 15458 local.
FAILED: Build did NOT complete successfully
==> ERROR: A failure occurred in build().
Aborting...
error making: tensorflow-rocm (tensorflow-opt-rocm)
Fix these two warnings first:
/home/tinux/.cache/yay/tensorflow-rocm/PKGBUILD: line 111: /opt/cuda/bin/nvcc: No such file or directory
sed: can't read /usr/include/cudnn_version.h: No such file or directory
By installing cudnn
, this should fix both of these, after that I cleaned the cache dir, but I'm not sure if that was necessary
cudnn is NVidia's CUDA framework, this is disabled in the rocm build so should not be enabled for this.
@t1nux - Hi, I'm also getting this error and I'm trying to pin down what is causing it. What gpu were you building tensorflow for?
@astrowave Sorry for the late reply. I'm trying to build for 2 slightly different GPUs on 2 different PCs. One is a Radeon VII and the other one is a Radeon VII Pro.
Closing this issue as a stale build issue. If you have further issues please open up another issue. Sorry @t1nux and @astrowave
Hello
I can't get this to build on my updated arch system (with gcc-11.1.0).