Skip to content

Tensorflow failed to compile #18450

Closed

Description

@Moocow9m

System information

  • Have I written custom code (as opposed to using a stock example script provided in TensorFlow): No
  • OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Arch Linux
  • TensorFlow installed from (source or binary): Source from branch r1.7, did not compile
  • TensorFlow version (use command below): 1.7.0
  • Python version: 3.6.4
  • Bazel version (if compiling from source): 0.12.0
  • GCC/Compiler version (if compiling from source): 7.3.1
  • CUDA/cuDNN version: N/A
  • GPU model and memory: N/A
  • Exact command to reproduce: ./configure && bazel build --config=opt //tensorflow/tools/pip_package:build_pip_package

Describe the problem

While compiling tensorflow build failed. I just pulled the latest commit(92e6c3e) from the r1.7 branch. I also updated bazel (from 0.11.1 to 0.12.0) and some other programs(should be irrelevant to tensorflow) beforehand.

Source code / logs

`ERROR: /home/UserHome/.cache/bazel/_bazel_UserHome/ab33c8274551e1ea3125872a4c4e7db9/external/jpeg/BUILD:126:12: Illegal ambiguous match on configurable attribute "deps" in @jpeg//:jpeg:
@jpeg//:k8
@jpeg//:armeabi-v7a
Multiple matches are not allowed unless one is unambiguously more specialized.
ERROR: Analysis of target '//tensorflow/tools/pip_package:build_pip_package' failed; build aborted:

/home/UserHome/.cache/bazel/_bazel_UserHome/ab33c8274551e1ea3125872a4c4e7db9/external/jpeg/BUILD:126:12: Illegal ambiguous match on configurable attribute "deps" in @jpeg//:jpeg:
@jpeg//:k8
@jpeg//:armeabi-v7a
Multiple matches are not allowed unless one is unambiguously more specialized.
INFO: Elapsed time: 1.086s
FAILED: Build did NOT complete successfully (3 packages loaded)`

UPDATE: The r1.8 branch compiles successfully. The 1.8 branch might have a fix? Or perhaps a dependency was updated and that fixed it?

Activity

  1. Lu-Yi-Hsun commented on Apr 12, 2018

    @Lu-Yi-Hsun

    try gcc 4~6 don't use gcc7

  2. rharish101 commented on Apr 12, 2018

    @rharish101

    I'm also facing build problems even with gcc-6.

    System information
    Have I written custom code (as opposed to using a stock example script provided in TensorFlow): No
    OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Arch Linux
    TensorFlow installed from (source or binary): Source from master branch (r1.7)
    TensorFlow version (use command below): 1.7.0
    Python version: 3.6.4
    Bazel version (if compiling from source): 0.11.1
    GCC/Compiler version (if compiling from source): 6.4.1
    CUDA/cuDNN version: 9.1.85/7.1.2
    GPU model and memory: Nvidia GTX 960M, 4GB
    Exact command to reproduce: ./configure && bazel build --config=opt --config=cuda --cxxopt="-D_GLIBCXX_USE_CXX11_ABI=0" //tensorflow/tools/pip_package:build_pip_package --verbose_failures

    Logs:

    INFO: From Compiling tensorflow/contrib/reduce_slice_ops/kernels/reduce_slice_ops_gpu.cu.cc:
    /usr/lib/gcc/x86_64-pc-linux-gnu/6.4.1/include/c++/tuple: In instantiation of 'static constexpr bool std::_TC<<anonymous>, _Elements>::_MoveConstructibleTuple() [with _UElements = {const std::tuple<int, int, int>&}; bool <anonymous> = true; _Elements = {int, int, int}]':
    /usr/lib/gcc/x86_64-pc-linux-gnu/6.4.1/include/c++/tuple:626:248:   required by substitution of 'template<class ... _UElements, typename std::enable_if<(((std::_TC<(sizeof... (_UElements) == 1), int, int, int>::_NotSameTuple<_UElements ...>() && std::_TC<(1ul == sizeof... (_UElements)), int, int, int>::_MoveConstructibleTuple<_UElements ...>()) && std::_TC<(1ul == sizeof... (_UElements)), int, int, int>::_ImplicitlyMoveConvertibleTuple<_UElements ...>()) && (3ul >= 1)), bool>::type <anonymous> > constexpr std::tuple< <template-parameter-1-1> >::tuple(_UElements&& ...) [with _UElements = {const std::tuple<int, int, int>&}; typename std::enable_if<(((std::_TC<(sizeof... (_UElements) == 1), int, int, int>::_NotSameTuple<_UElements ...>() && std::_TC<(1ul == sizeof... (_UElements)), int, int, int>::_MoveConstructibleTuple<_UElements ...>()) && std::_TC<(1ul == sizeof... (_UElements)), int, int, int>::_ImplicitlyMoveConvertibleTuple<_UElements ...>()) && (3ul >= 1)), bool>::type <anonymous> = <missing>]'
    /usr/lib/gcc/x86_64-pc-linux-gnu/6.4.1/include/c++/type_traits:970:16:   required by substitution of 'template<class _Tp, class _Arg, class> static std::true_type std::__do_is_direct_constructible_impl::__test(int) [with _Tp = std::tuple<int, int, int>; _Arg = const std::tuple<int, int, int>&; <template-parameter-1-3> = <missing>]'
    /usr/lib/gcc/x86_64-pc-linux-gnu/6.4.1/include/c++/type_traits:981:40:   required from 'struct std::__is_direct_constructible_impl<std::tuple<int, int, int>, const std::tuple<int, int, int>&>'
    /usr/lib/gcc/x86_64-pc-linux-gnu/6.4.1/include/c++/type_traits:143:8:   required from 'struct std::__and_<std::is_destructible<std::tuple<int, int, int> >, std::__is_direct_constructible_impl<std::tuple<int, int, int>, const std::tuple<int, int, int>&> >'
    /usr/lib/gcc/x86_64-pc-linux-gnu/6.4.1/include/c++/type_traits:985:8:   required from 'struct std::__is_direct_constructible_new_safe<std::tuple<int, int, int>, const std::tuple<int, int, int>&>'
    /usr/lib/gcc/x86_64-pc-linux-gnu/6.4.1/include/c++/type_traits:1067:8:   [ skipping 2 instantiation contexts, use -ftemplate-backtrace-limit=0 to disable ]
    /usr/lib/gcc/x86_64-pc-linux-gnu/6.4.1/include/c++/type_traits:1115:8:   required from 'struct std::__is_constructible_impl<std::tuple<int, int, int>, const std::tuple<int, int, int>&>'
    /usr/lib/gcc/x86_64-pc-linux-gnu/6.4.1/include/c++/type_traits:1126:8:   required from 'struct std::is_constructible<std::tuple<int, int, int>, const std::tuple<int, int, int>&>'
    /usr/lib/gcc/x86_64-pc-linux-gnu/6.4.1/include/c++/type_traits:1138:8:   required from 'struct std::__is_copy_constructible_impl<std::tuple<int, int, int>, true>'
    /usr/lib/gcc/x86_64-pc-linux-gnu/6.4.1/include/c++/type_traits:1144:8:   required from 'struct std::is_copy_constructible<std::tuple<int, int, int> >'
    ./tensorflow/compiler/xla/statusor.h:87:7:   required from 'class xla::StatusOr<std::tuple<int, int, int> >'
    ./tensorflow/stream_executor/dnn.h:890:68:   required from here
    /usr/lib/gcc/x86_64-pc-linux-gnu/6.4.1/include/c++/tuple:483:67: error: mismatched argument pack lengths while expanding 'std::is_constructible<_Elements, _UElements&&>'
           return __and_<is_constructible<_Elements, _UElements&&>...>::value;
                                                                       ^~~~~
    /usr/lib/gcc/x86_64-pc-linux-gnu/6.4.1/include/c++/tuple:484:1: error: body of constexpr function 'static constexpr bool std::_TC<<anonymous>, _Elements>::_MoveConstructibleTuple() [with _UElements = {const std::tuple<int, int, int>&}; bool <anonymous> = true; _Elements = {int, int, int}]' not a return-statement
         }
     ^
    /usr/lib/gcc/x86_64-pc-linux-gnu/6.4.1/include/c++/tuple: In instantiation of 'static constexpr bool std::_TC<<anonymous>, _Elements>::_ImplicitlyMoveConvertibleTuple() [with _UElements = {const std::tuple<int, int, int>&}; bool <anonymous> = true; _Elements = {int, int, int}]':
    /usr/lib/gcc/x86_64-pc-linux-gnu/6.4.1/include/c++/tuple:626:362:   required by substitution of 'template<class ... _UElements, typename std::enable_if<(((std::_TC<(sizeof... (_UElements) == 1), int, int, int>::_NotSameTuple<_UElements ...>() && std::_TC<(1ul == sizeof... (_UElements)), int, int, int>::_MoveConstructibleTuple<_UElements ...>()) && std::_TC<(1ul == sizeof... (_UElements)), int, int, int>::_ImplicitlyMoveConvertibleTuple<_UElements ...>()) && (3ul >= 1)), bool>::type <anonymous> > constexpr std::tuple< <template-parameter-1-1> >::tuple(_UElements&& ...) [with _UElements = {const std::tuple<int, int, int>&}; typename std::enable_if<(((std::_TC<(sizeof... (_UElements) == 1), int, int, int>::_NotSameTuple<_UElements ...>() && std::_TC<(1ul == sizeof... (_UElements)), int, int, int>::_MoveConstructibleTuple<_UElements ...>()) && std::_TC<(1ul == sizeof... (_UElements)), int, int, int>::_ImplicitlyMoveConvertibleTuple<_UElements ...>()) && (3ul >= 1)), bool>::type <anonymous> = <missing>]'
    /usr/lib/gcc/x86_64-pc-linux-gnu/6.4.1/include/c++/type_traits:970:16:   required by substitution of 'template<class _Tp, class _Arg, class> static std::true_type std::__do_is_direct_constructible_impl::__test(int) [with _Tp = std::tuple<int, int, int>; _Arg = const std::tuple<int, int, int>&; <template-parameter-1-3> = <missing>]'
    /usr/lib/gcc/x86_64-pc-linux-gnu/6.4.1/include/c++/type_traits:981:40:   required from 'struct std::__is_direct_constructible_impl<std::tuple<int, int, int>, const std::tuple<int, int, int>&>'
    /usr/lib/gcc/x86_64-pc-linux-gnu/6.4.1/include/c++/type_traits:143:8:   required from 'struct std::__and_<std::is_destructible<std::tuple<int, int, int> >, std::__is_direct_constructible_impl<std::tuple<int, int, int>, const std::tuple<int, int, int>&> >'
    /usr/lib/gcc/x86_64-pc-linux-gnu/6.4.1/include/c++/type_traits:985:8:   required from 'struct std::__is_direct_constructible_new_safe<std::tuple<int, int, int>, const std::tuple<int, int, int>&>'
    /usr/lib/gcc/x86_64-pc-linux-gnu/6.4.1/include/c++/type_traits:1067:8:   [ skipping 2 instantiation contexts, use -ftemplate-backtrace-limit=0 to disable ]
    /usr/lib/gcc/x86_64-pc-linux-gnu/6.4.1/include/c++/type_traits:1115:8:   required from 'struct std::__is_constructible_impl<std::tuple<int, int, int>, const std::tuple<int, int, int>&>'
    /usr/lib/gcc/x86_64-pc-linux-gnu/6.4.1/include/c++/type_traits:1126:8:   required from 'struct std::is_constructible<std::tuple<int, int, int>, const std::tuple<int, int, int>&>'
    /usr/lib/gcc/x86_64-pc-linux-gnu/6.4.1/include/c++/type_traits:1138:8:   required from 'struct std::__is_copy_constructible_impl<std::tuple<int, int, int>, true>'
    /usr/lib/gcc/x86_64-pc-linux-gnu/6.4.1/include/c++/type_traits:1144:8:   required from 'struct std::is_copy_constructible<std::tuple<int, int, int> >'
    ./tensorflow/compiler/xla/statusor.h:87:7:   required from 'class xla::StatusOr<std::tuple<int, int, int> >'
    ./tensorflow/stream_executor/dnn.h:890:68:   required from here
    /usr/lib/gcc/x86_64-pc-linux-gnu/6.4.1/include/c++/tuple:489:65: error: mismatched argument pack lengths while expanding 'std::is_convertible<_UElements&&, _Elements>'
           return __and_<is_convertible<_UElements&&, _Elements>...>::value;
                                                                     ^~~~~
    /usr/lib/gcc/x86_64-pc-linux-gnu/6.4.1/include/c++/tuple:490:1: error: body of constexpr function 'static constexpr bool std::_TC<<anonymous>, _Elements>::_ImplicitlyMoveConvertibleTuple() [with _UElements = {const std::tuple<int, int, int>&}; bool <anonymous> = true; _Elements = {int, int, int}]' not a return-statement
         }
     ^
    /usr/lib/gcc/x86_64-pc-linux-gnu/6.4.1/include/c++/tuple: In instantiation of 'static constexpr bool std::_TC<<anonymous>, _Elements>::_NonNestedTuple() [with _SrcTuple = const std::tuple<int, int, int>&; bool <anonymous> = true; _Elements = {int, int, int}]':
    /usr/lib/gcc/x86_64-pc-linux-gnu/6.4.1/include/c++/tuple:662:419:   required by substitution of 'template<class ... _UElements, class _Dummy, typename std::enable_if<((std::_TC<(1ul == sizeof... (_UElements)), int, int, int>::_ConstructibleTuple<_UElements ...>() && std::_TC<(1ul == sizeof... (_UElements)), int, int, int>::_ImplicitlyConvertibleTuple<_UElements ...>()) && std::_TC<(std::is_same<_Dummy, void>::value && (1ul == 1)), int, int, int>::_NonNestedTuple<const tuple<_Elements ...>&>()), bool>::type <anonymous> > constexpr std::tuple< <template-parameter-1-1> >::tuple(const std::tuple<_Args1 ...>&) [with _UElements = {int, int, int}; _Dummy = void; typename std::enable_if<((std::_TC<(1ul == sizeof... (_UElements)), int, int, int>::_ConstructibleTuple<_UElements ...>() && std::_TC<(1ul == sizeof... (_UElements)), int, int, int>::_ImplicitlyConvertibleTuple<_UElements ...>()) && std::_TC<(std::is_same<_Dummy, void>::value && (1ul == 1)), int, int, int>::_NonNestedTuple<const tuple<_Elements ...>&>()), bool>::type <anonymous> = <missing>]'
    /usr/lib/gcc/x86_64-pc-linux-gnu/6.4.1/include/c++/type_traits:970:16:   required by substitution of 'template<class _Tp, class _Arg, class> static std::true_type std::__do_is_direct_constructible_impl::__test(int) [with _Tp = std::tuple<int, int, int>; _Arg = const std::tuple<int, int, int>&; <template-parameter-1-3> = <missing>]'
    /usr/lib/gcc/x86_64-pc-linux-gnu/6.4.1/include/c++/type_traits:981:40:   required from 'struct std::__is_direct_constructible_impl<std::tuple<int, int, int>, const std::tuple<int, int, int>&>'
    /usr/lib/gcc/x86_64-pc-linux-gnu/6.4.1/include/c++/type_traits:143:8:   required from 'struct std::__and_<std::is_destructible<std::tuple<int, int, int> >, std::__is_direct_constructible_impl<std::tuple<int, int, int>, const std::tuple<int, int, int>&> >'
    /usr/lib/gcc/x86_64-pc-linux-gnu/6.4.1/include/c++/type_traits:985:8:   required from 'struct std::__is_direct_constructible_new_safe<std::tuple<int, int, int>, const std::tuple<int, int, int>&>'
    /usr/lib/gcc/x86_64-pc-linux-gnu/6.4.1/include/c++/type_traits:1067:8:   [ skipping 2 instantiation contexts, use -ftemplate-backtrace-limit=0 to disable ]
    /usr/lib/gcc/x86_64-pc-linux-gnu/6.4.1/include/c++/type_traits:1115:8:   required from 'struct std::__is_constructible_impl<std::tuple<int, int, int>, const std::tuple<int, int, int>&>'
    /usr/lib/gcc/x86_64-pc-linux-gnu/6.4.1/include/c++/type_traits:1126:8:   required from 'struct std::is_constructible<std::tuple<int, int, int>, const std::tuple<int, int, int>&>'
    /usr/lib/gcc/x86_64-pc-linux-gnu/6.4.1/include/c++/type_traits:1138:8:   required from 'struct std::__is_copy_constructible_impl<std::tuple<int, int, int>, true>'
    /usr/lib/gcc/x86_64-pc-linux-gnu/6.4.1/include/c++/type_traits:1144:8:   required from 'struct std::is_copy_constructible<std::tuple<int, int, int> >'
    ./tensorflow/compiler/xla/statusor.h:87:7:   required from 'class xla::StatusOr<std::tuple<int, int, int> >'
    ./tensorflow/stream_executor/dnn.h:890:68:   required from here
    /usr/lib/gcc/x86_64-pc-linux-gnu/6.4.1/include/c++/tuple:495:244: error: wrong number of template arguments (4, should be 2)
           return  __and_<__not_<is_same<tuple<_Elements...>,
                                                                                                                                                                                                                                                        ^    
    /usr/lib/gcc/x86_64-pc-linux-gnu/6.4.1/include/c++/type_traits:1558:8: note: provided for 'template<class _From, class _To> struct std::is_convertible'
         struct is_convertible
            ^~~~~~~~~~~~~~
    /usr/lib/gcc/x86_64-pc-linux-gnu/6.4.1/include/c++/tuple:502:1: error: body of constexpr function 'static constexpr bool std::_TC<<anonymous>, _Elements>::_NonNestedTuple() [with _SrcTuple = const std::tuple<int, int, int>&; bool <anonymous> = true; _Elements = {int, int, int}]' not a return-statement
         }
     ^
    /usr/lib/gcc/x86_64-pc-linux-gnu/6.4.1/include/c++/tuple: In instantiation of 'static constexpr bool std::_TC<<anonymous>, _Elements>::_MoveConstructibleTuple() [with _UElements = {std::tuple<int, int, int>}; bool <anonymous> = true; _Elements = {int, int, int}]':
    /usr/lib/gcc/x86_64-pc-linux-gnu/6.4.1/include/c++/tuple:626:248:   required by substitution of 'template<class ... _UElements, typename std::enable_if<(((std::_TC<(sizeof... (_UElements) == 1), int, int, int>::_NotSameTuple<_UElements ...>() && std::_TC<(1ul == sizeof... (_UElements)), int, int, int>::_MoveConstructibleTuple<_UElements ...>()) && std::_TC<(1ul == sizeof... (_UElements)), int, int, int>::_ImplicitlyMoveConvertibleTuple<_UElements ...>()) && (3ul >= 1)), bool>::type <anonymous> > constexpr std::tuple< <template-parameter-1-1> >::tuple(_UElements&& ...) [with _UElements = {std::tuple<int, int, int>}; typename std::enable_if<(((std::_TC<(sizeof... (_UElements) == 1), int, int, int>::_NotSameTuple<_UElements ...>() && std::_TC<(1ul == sizeof... (_UElements)), int, int, int>::_MoveConstructibleTuple<_UElements ...>()) && std::_TC<(1ul == sizeof... (_UElements)), int, int, int>::_ImplicitlyMoveConvertibleTuple<_UElements ...>()) && (3ul >= 1)), bool>::type <anonymous> = <missing>]'
    /usr/lib/gcc/x86_64-pc-linux-gnu/6.4.1/include/c++/type_traits:970:16:   required by substitution of 'template<class _Tp, class _Arg, class> static std::true_type std::__do_is_direct_constructible_impl::__test(int) [with _Tp = std::tuple<int, int, int>; _Arg = std::tuple<int, int, int>&&; <template-parameter-1-3> = <missing>]'
    /usr/lib/gcc/x86_64-pc-linux-gnu/6.4.1/include/c++/type_traits:981:40:   required from 'struct std::__is_direct_constructible_impl<std::tuple<int, int, int>, std::tuple<int, int, int>&&>'
    /usr/lib/gcc/x86_64-pc-linux-gnu/6.4.1/include/c++/type_traits:143:8:   required from 'struct std::__and_<std::is_destructible<std::tuple<int, int, int> >, std::__is_direct_constructible_impl<std::tuple<int, int, int>, std::tuple<int, int, int>&&> >'
    /usr/lib/gcc/x86_64-pc-linux-gnu/6.4.1/include/c++/type_traits:985:8:   required from 'struct std::__is_direct_constructible_new_safe<std::tuple<int, int, int>, std::tuple<int, int, int>&&>'
    /usr/lib/gcc/x86_64-pc-linux-gnu/6.4.1/include/c++/type_traits:1067:8:   [ skipping 2 instantiation contexts, use -ftemplate-backtrace-limit=0 to disable ]
    /usr/lib/gcc/x86_64-pc-linux-gnu/6.4.1/include/c++/type_traits:1115:8:   required from 'struct std::__is_constructible_impl<std::tuple<int, int, int>, std::tuple<int, int, int>&&>'
    /usr/lib/gcc/x86_64-pc-linux-gnu/6.4.1/include/c++/type_traits:1126:8:   required from 'struct std::is_constructible<std::tuple<int, int, int>, std::tuple<int, int, int>&&>'
    /usr/lib/gcc/x86_64-pc-linux-gnu/6.4.1/include/c++/type_traits:1156:8:   required from 'struct std::__is_move_constructible_impl<std::tuple<int, int, int>, true>'
    /usr/lib/gcc/x86_64-pc-linux-gnu/6.4.1/include/c++/type_traits:1162:8:   required from 'struct std::is_move_constructible<std::tuple<int, int, int> >'
    ./tensorflow/compiler/xla/statusor.h:87:7:   required from 'class xla::StatusOr<std::tuple<int, int, int> >'
    ./tensorflow/stream_executor/dnn.h:890:68:   required from here
    /usr/lib/gcc/x86_64-pc-linux-gnu/6.4.1/include/c++/tuple:483:67: error: mismatched argument pack lengths while expanding 'std::is_constructible<_Elements, _UElements&&>'
           return __and_<is_constructible<_Elements, _UElements&&>...>::value;
                                                                       ^~~~~
    /usr/lib/gcc/x86_64-pc-linux-gnu/6.4.1/include/c++/tuple:484:1: error: body of constexpr function 'static constexpr bool std::_TC<<anonymous>, _Elements>::_MoveConstructibleTuple() [with _UElements = {std::tuple<int, int, int>}; bool <anonymous> = true; _Elements = {int, int, int}]' not a return-statement
         }
     ^
    /usr/lib/gcc/x86_64-pc-linux-gnu/6.4.1/include/c++/tuple: In instantiation of 'static constexpr bool std::_TC<<anonymous>, _Elements>::_ImplicitlyMoveConvertibleTuple() [with _UElements = {std::tuple<int, int, int>}; bool <anonymous> = true; _Elements = {int, int, int}]':
    /usr/lib/gcc/x86_64-pc-linux-gnu/6.4.1/include/c++/tuple:626:362:   required by substitution of 'template<class ... _UElements, typename std::enable_if<(((std::_TC<(sizeof... (_UElements) == 1), int, int, int>::_NotSameTuple<_UElements ...>() && std::_TC<(1ul == sizeof... (_UElements)), int, int, int>::_MoveConstructibleTuple<_UElements ...>()) && std::_TC<(1ul == sizeof... (_UElements)), int, int, int>::_ImplicitlyMoveConvertibleTuple<_UElements ...>()) && (3ul >= 1)), bool>::type <anonymous> > constexpr std::tuple< <template-parameter-1-1> >::tuple(_UElements&& ...) [with _UElements = {std::tuple<int, int, int>}; typename std::enable_if<(((std::_TC<(sizeof... (_UElements) == 1), int, int, int>::_NotSameTuple<_UElements ...>() && std::_TC<(1ul == sizeof... (_UElements)), int, int, int>::_MoveConstructibleTuple<_UElements ...>()) && std::_TC<(1ul == sizeof... (_UElements)), int, int, int>::_ImplicitlyMoveConvertibleTuple<_UElements ...>()) && (3ul >= 1)), bool>::type <anonymous> = <missing>]'
    /usr/lib/gcc/x86_64-pc-linux-gnu/6.4.1/include/c++/type_traits:970:16:   required by substitution of 'template<class _Tp, class _Arg, class> static std::true_type std::__do_is_direct_constructible_impl::__test(int) [with _Tp = std::tuple<int, int, int>; _Arg = std::tuple<int, int, int>&&; <template-parameter-1-3> = <missing>]'
    /usr/lib/gcc/x86_64-pc-linux-gnu/6.4.1/include/c++/type_traits:981:40:   required from 'struct std::__is_direct_constructible_impl<std::tuple<int, int, int>, std::tuple<int, int, int>&&>'
    /usr/lib/gcc/x86_64-pc-linux-gnu/6.4.1/include/c++/type_traits:143:8:   required from 'struct std::__and_<std::is_destructible<std::tuple<int, int, int> >, std::__is_direct_constructible_impl<std::tuple<int, int, int>, std::tuple<int, int, int>&&> >'
    /usr/lib/gcc/x86_64-pc-linux-gnu/6.4.1/include/c++/type_traits:985:8:   required from 'struct std::__is_direct_constructible_new_safe<std::tuple<int, int, int>, std::tuple<int, int, int>&&>'
    /usr/lib/gcc/x86_64-pc-linux-gnu/6.4.1/include/c++/type_traits:1067:8:   [ skipping 2 instantiation contexts, use -ftemplate-backtrace-limit=0 to disable ]
    /usr/lib/gcc/x86_64-pc-linux-gnu/6.4.1/include/c++/type_traits:1115:8:   required from 'struct std::__is_constructible_impl<std::tuple<int, int, int>, std::tuple<int, int, int>&&>'
    /usr/lib/gcc/x86_64-pc-linux-gnu/6.4.1/include/c++/type_traits:1126:8:   required from 'struct std::is_constructible<std::tuple<int, int, int>, std::tuple<int, int, int>&&>'
    /usr/lib/gcc/x86_64-pc-linux-gnu/6.4.1/include/c++/type_traits:1156:8:   required from 'struct std::__is_move_constructible_impl<std::tuple<int, int, int>, true>'
    /usr/lib/gcc/x86_64-pc-linux-gnu/6.4.1/include/c++/type_traits:1162:8:   required from 'struct std::is_move_constructible<std::tuple<int, int, int> >'
    ./tensorflow/compiler/xla/statusor.h:87:7:   required from 'class xla::StatusOr<std::tuple<int, int, int> >'
    ./tensorflow/stream_executor/dnn.h:890:68:   required from here
    /usr/lib/gcc/x86_64-pc-linux-gnu/6.4.1/include/c++/tuple:489:65: error: mismatched argument pack lengths while expanding 'std::is_convertible<_UElements&&, _Elements>'
           return __and_<is_convertible<_UElements&&, _Elements>...>::value;
                                                                     ^~~~~
    /usr/lib/gcc/x86_64-pc-linux-gnu/6.4.1/include/c++/tuple:490:1: error: body of constexpr function 'static constexpr bool std::_TC<<anonymous>, _Elements>::_ImplicitlyMoveConvertibleTuple() [with _UElements = {std::tuple<int, int, int>}; bool <anonymous> = true; _Elements = {int, int, int}]' not a return-statement
         }
     ^
    /usr/lib/gcc/x86_64-pc-linux-gnu/6.4.1/include/c++/tuple: In instantiation of 'static constexpr bool std::_TC<<anonymous>, _Elements>::_NonNestedTuple() [with _SrcTuple = std::tuple<int, int, int>&&; bool <anonymous> = true; _Elements = {int, int, int}]':
    /usr/lib/gcc/x86_64-pc-linux-gnu/6.4.1/include/c++/tuple:686:422:   required by substitution of 'template<class ... _UElements, class _Dummy, typename std::enable_if<((std::_TC<(1ul == sizeof... (_UElements)), int, int, int>::_MoveConstructibleTuple<_UElements ...>() && std::_TC<(1ul == sizeof... (_UElements)), int, int, int>::_ImplicitlyMoveConvertibleTuple<_UElements ...>()) && std::_TC<(std::is_same<_Dummy, void>::value && (1ul == 1)), int, int, int>::_NonNestedTuple<tuple<_Elements ...>&&>()), bool>::type <anonymous> > constexpr std::tuple< <template-parameter-1-1> >::tuple(std::tuple<_Args1 ...>&&) [with _UElements = {int, int, int}; _Dummy = void; typename std::enable_if<((std::_TC<(1ul == sizeof... (_UElements)), int, int, int>::_MoveConstructibleTuple<_UElements ...>() && std::_TC<(1ul == sizeof... (_UElements)), int, int, int>::_ImplicitlyMoveConvertibleTuple<_UElements ...>()) && std::_TC<(std::is_same<_Dummy, void>::value && (1ul == 1)), int, int, int>::_NonNestedTuple<tuple<_Elements ...>&&>()), bool>::type <anonymous> = <missing>]'
    /usr/lib/gcc/x86_64-pc-linux-gnu/6.4.1/include/c++/type_traits:970:16:   required by substitution of 'template<class _Tp, class _Arg, class> static std::true_type std::__do_is_direct_constructible_impl::__test(int) [with _Tp = std::tuple<int, int, int>; _Arg = std::tuple<int, int, int>&&; <template-parameter-1-3> = <missing>]'
    /usr/lib/gcc/x86_64-pc-linux-gnu/6.4.1/include/c++/type_traits:981:40:   required from 'struct std::__is_direct_constructible_impl<std::tuple<int, int, int>, std::tuple<int, int, int>&&>'
    /usr/lib/gcc/x86_64-pc-linux-gnu/6.4.1/include/c++/type_traits:143:8:   required from 'struct std::__and_<std::is_destructible<std::tuple<int, int, int> >, std::__is_direct_constructible_impl<std::tuple<int, int, int>, std::tuple<int, int, int>&&> >'
    /usr/lib/gcc/x86_64-pc-linux-gnu/6.4.1/include/c++/type_traits:985:8:   required from 'struct std::__is_direct_constructible_new_safe<std::tuple<int, int, int>, std::tuple<int, int, int>&&>'
    /usr/lib/gcc/x86_64-pc-linux-gnu/6.4.1/include/c++/type_traits:1067:8:   [ skipping 2 instantiation contexts, use -ftemplate-backtrace-limit=0 to disable ]
    /usr/lib/gcc/x86_64-pc-linux-gnu/6.4.1/include/c++/type_traits:1115:8:   required from 'struct std::__is_constructible_impl<std::tuple<int, int, int>, std::tuple<int, int, int>&&>'
    /usr/lib/gcc/x86_64-pc-linux-gnu/6.4.1/include/c++/type_traits:1126:8:   required from 'struct std::is_constructible<std::tuple<int, int, int>, std::tuple<int, int, int>&&>'
    /usr/lib/gcc/x86_64-pc-linux-gnu/6.4.1/include/c++/type_traits:1156:8:   required from 'struct std::__is_move_constructible_impl<std::tuple<int, int, int>, true>'
    /usr/lib/gcc/x86_64-pc-linux-gnu/6.4.1/include/c++/type_traits:1162:8:   required from 'struct std::is_move_constructible<std::tuple<int, int, int> >'
    ./tensorflow/compiler/xla/statusor.h:87:7:   required from 'class xla::StatusOr<std::tuple<int, int, int> >'
    ./tensorflow/stream_executor/dnn.h:890:68:   required from here
    /usr/lib/gcc/x86_64-pc-linux-gnu/6.4.1/include/c++/tuple:495:244: error: wrong number of template arguments (4, should be 2)
           return  __and_<__not_<is_same<tuple<_Elements...>,
                                                                                                                                                                                                                                                        ^    
    /usr/lib/gcc/x86_64-pc-linux-gnu/6.4.1/include/c++/type_traits:1558:8: note: provided for 'template<class _From, class _To> struct std::is_convertible'
         struct is_convertible
            ^~~~~~~~~~~~~~
    /usr/lib/gcc/x86_64-pc-linux-gnu/6.4.1/include/c++/tuple:502:1: error: body of constexpr function 'static constexpr bool std::_TC<<anonymous>, _Elements>::_NonNestedTuple() [with _SrcTuple = std::tuple<int, int, int>&&; bool <anonymous> = true; _Elements = {int, int, int}]' not a return-statement
         }
     ^
    /usr/lib/gcc/x86_64-pc-linux-gnu/6.4.1/include/c++/tuple: In instantiation of 'static constexpr bool std::_TC<<anonymous>, _Elements>::_MoveConstructibleTuple() [with _UElements = {tensorflow::Status}; bool <anonymous> = true; _Elements = {int, int, int}]':
    /usr/lib/gcc/x86_64-pc-linux-gnu/6.4.1/include/c++/tuple:626:248:   required by substitution of 'template<class ... _UElements, typename std::enable_if<(((std::_TC<(sizeof... (_UElements) == 1), int, int, int>::_NotSameTuple<_UElements ...>() && std::_TC<(1ul == sizeof... (_UElements)), int, int, int>::_MoveConstructibleTuple<_UElements ...>()) && std::_TC<(1ul == sizeof... (_UElements)), int, int, int>::_ImplicitlyMoveConvertibleTuple<_UElements ...>()) && (3ul >= 1)), bool>::type <anonymous> > constexpr std::tuple< <template-parameter-1-1> >::tuple(_UElements&& ...) [with _UElements = {tensorflow::Status}; typename std::enable_if<(((std::_TC<(sizeof... (_UElements) == 1), int, int, int>::_NotSameTuple<_UElements ...>() && std::_TC<(1ul == sizeof... (_UElements)), int, int, int>::_MoveConstructibleTuple<_UElements ...>()) && std::_TC<(1ul == sizeof... (_UElements)), int, int, int>::_ImplicitlyMoveConvertibleTuple<_UElements ...>()) && (3ul >= 1)), bool>::type <anonymous> = <missing>]'
    ./tensorflow/compiler/xla/statusor.h:227:80:   required from 'xla::StatusOr<T>::StatusOr(tensorflow::Status&&) [with T = std::tuple<int, int, int>]'
    ./tensorflow/stream_executor/dnn.h:891:91:   required from here
    /usr/lib/gcc/x86_64-pc-linux-gnu/6.4.1/include/c++/tuple:483:67: error: mismatched argument pack lengths while expanding 'std::is_constructible<_Elements, _UElements&&>'
           return __and_<is_constructible<_Elements, _UElements&&>...>::value;
                                                                       ^~~~~
    /usr/lib/gcc/x86_64-pc-linux-gnu/6.4.1/include/c++/tuple:484:1: error: body of constexpr function 'static constexpr bool std::_TC<<anonymous>, _Elements>::_MoveConstructibleTuple() [with _UElements = {tensorflow::Status}; bool <anonymous> = true; _Elements = {int, int, int}]' not a return-statement
         }
     ^
    /usr/lib/gcc/x86_64-pc-linux-gnu/6.4.1/include/c++/tuple: In instantiation of 'static constexpr bool std::_TC<<anonymous>, _Elements>::_ImplicitlyMoveConvertibleTuple() [with _UElements = {tensorflow::Status}; bool <anonymous> = true; _Elements = {int, int, int}]':
    /usr/lib/gcc/x86_64-pc-linux-gnu/6.4.1/include/c++/tuple:626:362:   required by substitution of 'template<class ... _UElements, typename std::enable_if<(((std::_TC<(sizeof... (_UElements) == 1), int, int, int>::_NotSameTuple<_UElements ...>() && std::_TC<(1ul == sizeof... (_UElements)), int, int, int>::_MoveConstructibleTuple<_UElements ...>()) && std::_TC<(1ul == sizeof... (_UElements)), int, int, int>::_ImplicitlyMoveConvertibleTuple<_UElements ...>()) && (3ul >= 1)), bool>::type <anonymous> > constexpr std::tuple< <template-parameter-1-1> >::tuple(_UElements&& ...) [with _UElements = {tensorflow::Status}; typename std::enable_if<(((std::_TC<(sizeof... (_UElements) == 1), int, int, int>::_NotSameTuple<_UElements ...>() && std::_TC<(1ul == sizeof... (_UElements)), int, int, int>::_MoveConstructibleTuple<_UElements ...>()) && std::_TC<(1ul == sizeof... (_UElements)), int, int, int>::_ImplicitlyMoveConvertibleTuple<_UElements ...>()) && (3ul >= 1)), bool>::type <anonymous> = <missing>]'
    ./tensorflow/compiler/xla/statusor.h:227:80:   required from 'xla::StatusOr<T>::StatusOr(tensorflow::Status&&) [with T = std::tuple<int, int, int>]'
    ./tensorflow/stream_executor/dnn.h:891:91:   required from here
    /usr/lib/gcc/x86_64-pc-linux-gnu/6.4.1/include/c++/tuple:489:65: error: mismatched argument pack lengths while expanding 'std::is_convertible<_UElements&&, _Elements>'
           return __and_<is_convertible<_UElements&&, _Elements>...>::value;
                                                                     ^~~~~
    /usr/lib/gcc/x86_64-pc-linux-gnu/6.4.1/include/c++/tuple:490:1: error: body of constexpr function 'static constexpr bool std::_TC<<anonymous>, _Elements>::_ImplicitlyMoveConvertibleTuple() [with _UElements = {tensorflow::Status}; bool <anonymous> = true; _Elements = {int, int, int}]' not a return-statement
         }
     ^
    ERROR: /mnt/Data/tensorflow/tensorflow/contrib/reduce_slice_ops/BUILD:14:1: output 'tensorflow/contrib/reduce_slice_ops/_objs/python/ops/_reduce_slice_ops_gpu/tensorflow/contrib/reduce_slice_ops/kernels/reduce_slice_ops_gpu.cu.pic.o' was not created
    ERROR: /mnt/Data/tensorflow/tensorflow/contrib/reduce_slice_ops/BUILD:14:1: not all outputs were created or valid
    Target //tensorflow/tools/pip_package:build_pip_package failed to build
    INFO: Elapsed time: 167.446s, Critical Path: 47.43s
    FAILED: Build did NOT complete successfully
    
  3. Moocow9m commented on Apr 12, 2018

    @Moocow9m
    Author

    gcc is not the problem(tried 4-6). It has worked with gcc 7.3.1 before as well. The only changes to programs related to tensorflow is the tensorflow commit itself and bazel.

  4. weinman commented on Apr 12, 2018

    @weinman

    To corroborate, I just experienced the same problem/error as in the original post. I'd compiled tf 1.7 successfully previously (Ubuntu 14.04.4) but just did an OS upgrade (Ubuntu 14.04.5) and now I get the same error. Several packages were updated---I'm not sure what may have been the cause.

  5. dbkinghorn commented on Apr 12, 2018

    @dbkinghorn

    Getting back to Moocow9m's issue. I just had the same problem. It was the bazel update from a couple of days ago. Try un-installing version 12 and get the 11.1 bazel deb file and install form that. I also had to add --action_env PATH="$PATH" to keep it from forgetting where Python was (I'm using Anaconda3)

    I also have the following cuda.conf in ld.so.conf.d
    /usr/local/cuda/lib64
    /usr/local/cuda/extras/CUPTI/lib64
    /usr/local/cuda/targets/x86_64-linux/lib/stubs

  6. Moocow9m commented on Apr 12, 2018

    @Moocow9m
    Author

    @dbkinghorn It does compile with the older bazel build, however since version 0.12.0 can compile branch r1.8 I still think this might be a tensorflow issue in the r1.7 branch.

  7. weinman commented on Apr 13, 2018

    @weinman

    I also can compile tf master with bazel 0.12. However, I'm still befuddled that the same tf commit (from branch 1.7) failed to compile after a suite of package updates. That doesn't necessarily mean it wasn't a tf issue in 1.7, just that it wasn't manifest until after a separate update (which I don't think changed bazel).

  8. lubingtan commented on Apr 13, 2018

    @lubingtan

    Maybe this problem is caused by bazel. I could compile branch r1.6 with bazel 0.11.1. If I update bazel from 0.11.1 to 0.12.0, it will be failed.

  9. rharish101 commented on Apr 13, 2018

    @rharish101

    I just pulled the latest commits, and it builds fine.

  10. Moocow9m commented on Apr 13, 2018

    @Moocow9m
    Author

    @rharish101 what version of bazel did you use? What is your OS?

  11. ysfalo commented on Apr 14, 2018

    @ysfalo

    @lubingtan , Yeah, must be the problem of bazel 0.12. I updated bazel from 0.12 to 0.11 and it seems fine now.
    tensorflow 1.5
    ubuntu16
    cuda 8.0
    cudnn 5.1

  12. agupta74 commented on Apr 14, 2018

    @agupta74

    Had similar issue building TF 1.7 with Bazel 0.12. Downgrading bazel to 0.11 seems to fix the issue

  13. erickchandra commented on Apr 14, 2018

    @erickchandra

    Downgrading to Bazel 0.11.1 may fix this issue currently
    -- Tensorflow r1.7 with CUDA 9.1 and CuDNN7.1

  14. zhanwenchen commented on Apr 15, 2018

    @zhanwenchen

    I confirm that downgrading bazel from 0.12.0 to 0.11.1 fixes the exact error. To downgrade, the only way I found is

    $ sudo apt-get install -y --no-install-recommends bash-completion g++ zlib1g-dev
    $ curl -LO "https://github.com/bazelbuild/bazel/releases/download/0.11.1/bazel_0.11.1-linux-x86_64.deb" 
    $ sudo dpkg -i bazel_*.deb

    Copied and modified from this bazel thread.

  15. rharish101 commented on Apr 15, 2018

    @rharish101

    @Moocow9m Here are my specs:
    OS: Arch Linux
    Python version: 3.6.4
    Bazel version (if compiling from source): 0.11.1
    CUDA/cuDNN version: 9.1.85/7.1.2
    GPU model and memory: Nvidia GTX 960M, 4GB

  16. jin commented on Apr 16, 2018

    @jin
    Contributor

    The fix for this was merged into TF at #17508

    It doesn't look like 1.7.0 has this fix, so it's failing with Bazel 0.12.0. cc @angersson @gunan

  17. peshmerge commented on Apr 16, 2018

    @peshmerge

    this fix by @zhanwenchen helped me

  18. assigned and unassigned on Apr 18, 2018
  19. liushuainudt commented on Apr 22, 2018

    @liushuainudt

    It's the problem caused by bazel, version 0.11 is fine with me.

  20. Mukundan314 commented on Apr 25, 2018

    @Mukundan314

    A better fix whould be to cherry-pick 15bda92.

    git cherry-pick 15bda92cdb12bceb7c96404a3abafeed1a416651
    
  21. JorgeVilchis commented on Apr 26, 2018

    @JorgeVilchis

    I had exactly the same issue, as soon as I switch from Bazel 0.12 to Bazel 0.11 the compilation went smoothly.
    I followed the recommendation from zhanwenchen:
    $ sudo apt-get install -y --no-install-recommends bash-completion g++ zlib1g-dev
    $ curl -LO "https://github.com/bazelbuild/bazel/releases/download/0.11.1/bazel_0.11.1-linux-x86_64.deb"
    $ sudo dpkg -i bazel_*.deb

  22. Mukundan314 commented on May 6, 2018

    @Mukundan314

    I think this issue can be closed since #17508 has been merged to all branches and v1.7.1 contains the fix.

  23. aenjon commented on Mar 10, 2019

    @aenjon

    --config=cuda_clang mabe close this issue

  24. added 3 commits that reference this issue on Nov 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions