Skip to content

Broken build on gcc 6.2.1 #5419

Closed
Closed

Description

@pavelchristof

ERROR: /XXX/tensorflow/core/kernels/BUILD:2632:1: C++ compilation of rule '//tensorflow/core/kernels:quantized_ops' failed: gcc failed: error executing command /usr/bin/gcc -U_FORTIFY_SOURCE '-D_FORTIFY_SOURCE=1' -fstack-protector -Wall -Wl,-z,-relro,-z,now -B/usr/bin -B/usr/bin -Wunused-but-set-parameter -Wno-free-nonheap-object -fno-canonical-system-headers ... (remaining 125 argument(s) skipped): com.google.devtools.build.lib.shell.BadExitStatusException: Process exited with status 1.
tensorflow/core/kernels/quantize_op.cc: In instantiation of 'void tensorflow::QuantizeV2Op<Device, T>::Compute(tensorflow::OpKernelContext*) [with Device = Eigen::ThreadPoolDevice; T = Eigen::QInt16]':
tensorflow/core/kernels/quantize_op.cc:166:1: required from here
tensorflow/core/kernels/quantize_op.cc:116:33: error: no matching function for call to 'std::function<float(float)>::function()'
.unaryExpr(std::function<float(float)>(round))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ./tensorflow/core/framework/op.h:19:0,
from tensorflow/core/kernels/quantize_op.cc:20:
/usr/lib/gcc/x86_64-pc-linux-gnu/6.2.1/../../../../include/c++/6.2.1/functional:2115:7: note: candidate: template<class _Functor, class, class> std::function<_Res(_ArgTypes ...)>::function(_Functor)
function<_Res(_ArgTypes...)>::
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/lib/gcc/x86_64-pc-linux-gnu/6.2.1/../../../../include/c++/6.2.1/functional:2115:7: note: template argument deduction/substitution failed:
tensorflow/core/kernels/quantize_op.cc:116:33: note: couldn't deduce template parameter '_Functor'
.unaryExpr(std::function<float(float)>(round))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ./tensorflow/core/framework/op.h:19:0,
from tensorflow/core/kernels/quantize_op.cc:20:
/usr/lib/gcc/x86_64-pc-linux-gnu/6.2.1/../../../../include/c++/6.2.1/functional:1897:7: note: candidate: std::function<_Res(_ArgTypes ...)>::function(std::function<_Res(_ArgTypes ...)>&&) [with _Res = float; _ArgTypes = {float}]
function(function&& __x) : _Function_base()
^~~~~~~~
/usr/lib/gcc/x86_64-pc-linux-gnu/6.2.1/../../../../include/c++/6.2.1/functional:1897:7: note: no known conversion for argument 1 from '' to 'std::function<float(float)>&&'
/usr/lib/gcc/x86_64-pc-linux-gnu/6.2.1/../../../../include/c++/6.2.1/functional:2101:5: note: candidate: std::function<_Res(_ArgTypes ...)>::function(const std::function<_Res(_ArgTypes ...)>&) [with _Res = float; _ArgTypes = {float}]
function<_Res(_ArgTypes...)>::
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/lib/gcc/x86_64-pc-linux-gnu/6.2.1/../../../../include/c++/6.2.1/functional:2101:5: note: no known conversion for argument 1 from '' to 'const std::function<float(float)>&'
/usr/lib/gcc/x86_64-pc-linux-gnu/6.2.1/../../../../include/c++/6.2.1/functional:1877:7: note: candidate: std::function<_Res(_ArgTypes ...)>::function(std::nullptr_t) [with _Res = float; _ArgTypes = {float}; std::nullptr_t = std::nullptr_t]
function(nullptr_t) noexcept
^~~~~~~~
/usr/lib/gcc/x86_64-pc-linux-gnu/6.2.1/../../../../include/c++/6.2.1/functional:1877:7: note: no known conversion for argument 1 from '' to 'std::nullptr_t'
/usr/lib/gcc/x86_64-pc-linux-gnu/6.2.1/../../../../include/c++/6.2.1/functional:1870:7: note: candidate: std::function<_Res(_ArgTypes ...)>::function() [with _Res = float; _ArgTypes = {float}]
function() noexcept
^~~~~~~~
/usr/lib/gcc/x86_64-pc-linux-gnu/6.2.1/../../../../include/c++/6.2.1/functional:1870:7: note: candidate expects 0 arguments, 1 provided
tensorflow/core/kernels/quantize_op.cc: In instantiation of 'void tensorflow::QuantizeV2Op<Device, T>::Compute(tensorflow::OpKernelContext*) [with Device = Eigen::ThreadPoolDevice; T = Eigen::QUInt16]':
tensorflow/core/kernels/quantize_op.cc:166:1: required from here
tensorflow/core/kernels/quantize_op.cc:116:33: error: no matching function for call to 'std::function<float(float)>::function()'
.unaryExpr(std::function<float(float)>(round))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ./tensorflow/core/framework/op.h:19:0,
from tensorflow/core/kernels/quantize_op.cc:20:
/usr/lib/gcc/x86_64-pc-linux-gnu/6.2.1/../../../../include/c++/6.2.1/functional:2115:7: note: candidate: template<class _Functor, class, class> std::function<_Res(_ArgTypes ...)>::function(_Functor)
function<_Res(_ArgTypes...)>::
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/lib/gcc/x86_64-pc-linux-gnu/6.2.1/../../../../include/c++/6.2.1/functional:2115:7: note: template argument deduction/substitution failed:
tensorflow/core/kernels/quantize_op.cc:116:33: note: couldn't deduce template parameter '_Functor'
.unaryExpr(std::function<float(float)>(round))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ./tensorflow/core/framework/op.h:19:0,
from tensorflow/core/kernels/quantize_op.cc:20:
/usr/lib/gcc/x86_64-pc-linux-gnu/6.2.1/../../../../include/c++/6.2.1/functional:1897:7: note: candidate: std::function<_Res(_ArgTypes ...)>::function(std::function<_Res(_ArgTypes ...)>&&) [with _Res = float; _ArgTypes = {float}]
function(function&& __x) : _Function_base()
^~~~~~~~
/usr/lib/gcc/x86_64-pc-linux-gnu/6.2.1/../../../../include/c++/6.2.1/functional:1897:7: note: no known conversion for argument 1 from '' to 'std::function<float(float)>&&'
/usr/lib/gcc/x86_64-pc-linux-gnu/6.2.1/../../../../include/c++/6.2.1/functional:2101:5: note: candidate: std::function<_Res(_ArgTypes ...)>::function(const std::function<_Res(_ArgTypes ...)>&) [with _Res = float; _ArgTypes = {float}]
function<_Res(_ArgTypes...)>::
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/lib/gcc/x86_64-pc-linux-gnu/6.2.1/../../../../include/c++/6.2.1/functional:2101:5: note: no known conversion for argument 1 from '' to 'const std::function<float(float)>&'
/usr/lib/gcc/x86_64-pc-linux-gnu/6.2.1/../../../../include/c++/6.2.1/functional:1877:7: note: candidate: std::function<_Res(_ArgTypes ...)>::function(std::nullptr_t) [with _Res = float; _ArgTypes = {float}; std::nullptr_t = std::nullptr_t]
function(nullptr_t) noexcept
^~~~~~~~
/usr/lib/gcc/x86_64-pc-linux-gnu/6.2.1/../../../../include/c++/6.2.1/functional:1877:7: note: no known conversion for argument 1 from '' to 'std::nullptr_t'
/usr/lib/gcc/x86_64-pc-linux-gnu/6.2.1/../../../../include/c++/6.2.1/functional:1870:7: note: candidate: std::function<_Res(_ArgTypes ...)>::function() [with _Res = float; _ArgTypes = {float}]
function() noexcept
^~~~~~~~
/usr/lib/gcc/x86_64-pc-linux-gnu/6.2.1/../../../../include/c++/6.2.1/functional:1870:7: note: candidate expects 0 arguments, 1 provided
tensorflow/core/kernels/quantize_op.cc: In instantiation of 'void tensorflow::QuantizeV2Op<Device, T>::Compute(tensorflow::OpKernelContext*) [with Device = Eigen::ThreadPoolDevice; T = Eigen::QInt8]':
tensorflow/core/kernels/quantize_op.cc:166:1: required from here
tensorflow/core/kernels/quantize_op.cc:116:33: error: no matching function for call to 'std::function<float(float)>::function()'
.unaryExpr(std::function<float(float)>(round))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ./tensorflow/core/framework/op.h:19:0,
from tensorflow/core/kernels/quantize_op.cc:20:
/usr/lib/gcc/x86_64-pc-linux-gnu/6.2.1/../../../../include/c++/6.2.1/functional:2115:7: note: candidate: template<class _Functor, class, class> std::function<_Res(_ArgTypes ...)>::function(_Functor)
function<_Res(_ArgTypes...)>::
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/lib/gcc/x86_64-pc-linux-gnu/6.2.1/../../../../include/c++/6.2.1/functional:2115:7: note: template argument deduction/substitution failed:
tensorflow/core/kernels/quantize_op.cc:116:33: note: couldn't deduce template parameter '_Functor'
.unaryExpr(std::function<float(float)>(round))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ./tensorflow/core/framework/op.h:19:0,
from tensorflow/core/kernels/quantize_op.cc:20:
/usr/lib/gcc/x86_64-pc-linux-gnu/6.2.1/../../../../include/c++/6.2.1/functional:1897:7: note: candidate: std::function<_Res(_ArgTypes ...)>::function(std::function<_Res(_ArgTypes ...)>&&) [with _Res = float; _ArgTypes = {float}]
function(function&& __x) : _Function_base()
^~~~~~~~
/usr/lib/gcc/x86_64-pc-linux-gnu/6.2.1/../../../../include/c++/6.2.1/functional:1897:7: note: no known conversion for argument 1 from '' to 'std::function<float(float)>&&'
/usr/lib/gcc/x86_64-pc-linux-gnu/6.2.1/../../../../include/c++/6.2.1/functional:2101:5: note: candidate: std::function<_Res(_ArgTypes ...)>::function(const std::function<_Res(_ArgTypes ...)>&) [with _Res = float; _ArgTypes = {float}]
function<_Res(_ArgTypes...)>::
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/lib/gcc/x86_64-pc-linux-gnu/6.2.1/../../../../include/c++/6.2.1/functional:2101:5: note: no known conversion for argument 1 from '' to 'const std::function<float(float)>&'
/usr/lib/gcc/x86_64-pc-linux-gnu/6.2.1/../../../../include/c++/6.2.1/functional:1877:7: note: candidate: std::function<_Res(_ArgTypes ...)>::function(std::nullptr_t) [with _Res = float; _ArgTypes = {float}; std::nullptr_t = std::nullptr_t]
function(nullptr_t) noexcept
^~~~~~~~
/usr/lib/gcc/x86_64-pc-linux-gnu/6.2.1/../../../../include/c++/6.2.1/functional:1877:7: note: no known conversion for argument 1 from '' to 'std::nullptr_t'
/usr/lib/gcc/x86_64-pc-linux-gnu/6.2.1/../../../../include/c++/6.2.1/functional:1870:7: note: candidate: std::function<_Res(_ArgTypes ...)>::function() [with _Res = float; _ArgTypes = {float}]
function() noexcept
^~~~~~~~
/usr/lib/gcc/x86_64-pc-linux-gnu/6.2.1/../../../../include/c++/6.2.1/functional:1870:7: note: candidate expects 0 arguments, 1 provided
tensorflow/core/kernels/quantize_op.cc: In instantiation of 'void tensorflow::QuantizeV2Op<Device, T>::Compute(tensorflow::OpKernelContext*) [with Device = Eigen::ThreadPoolDevice; T = Eigen::QUInt8]':
tensorflow/core/kernels/quantize_op.cc:166:1: required from here
tensorflow/core/kernels/quantize_op.cc:116:33: error: no matching function for call to 'std::function<float(float)>::function()'
.unaryExpr(std::function<float(float)>(round))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ./tensorflow/core/framework/op.h:19:0,
from tensorflow/core/kernels/quantize_op.cc:20:
/usr/lib/gcc/x86_64-pc-linux-gnu/6.2.1/../../../../include/c++/6.2.1/functional:2115:7: note: candidate: template<class _Functor, class, class> std::function<_Res(_ArgTypes ...)>::function(_Functor)
function<_Res(_ArgTypes...)>::
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/lib/gcc/x86_64-pc-linux-gnu/6.2.1/../../../../include/c++/6.2.1/functional:2115:7: note: template argument deduction/substitution failed:
tensorflow/core/kernels/quantize_op.cc:116:33: note: couldn't deduce template parameter '_Functor'
.unaryExpr(std::function<float(float)>(round))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ./tensorflow/core/framework/op.h:19:0,
from tensorflow/core/kernels/quantize_op.cc:20:
/usr/lib/gcc/x86_64-pc-linux-gnu/6.2.1/../../../../include/c++/6.2.1/functional:1897:7: note: candidate: std::function<_Res(_ArgTypes ...)>::function(std::function<_Res(_ArgTypes ...)>&&) [with _Res = float; _ArgTypes = {float}]
function(function&& __x) : _Function_base()
^~~~~~~~
/usr/lib/gcc/x86_64-pc-linux-gnu/6.2.1/../../../../include/c++/6.2.1/functional:1897:7: note: no known conversion for argument 1 from '' to 'std::function<float(float)>&&'
/usr/lib/gcc/x86_64-pc-linux-gnu/6.2.1/../../../../include/c++/6.2.1/functional:2101:5: note: candidate: std::function<_Res(_ArgTypes ...)>::function(const std::function<_Res(_ArgTypes ...)>&) [with _Res = float; _ArgTypes = {float}]
function<_Res(_ArgTypes...)>::
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/lib/gcc/x86_64-pc-linux-gnu/6.2.1/../../../../include/c++/6.2.1/functional:2101:5: note: no known conversion for argument 1 from '' to 'const std::function<float(float)>&'
/usr/lib/gcc/x86_64-pc-linux-gnu/6.2.1/../../../../include/c++/6.2.1/functional:1877:7: note: candidate: std::function<_Res(_ArgTypes ...)>::function(std::nullptr_t) [with _Res = float; _ArgTypes = {float}; std::nullptr_t = std::nullptr_t]
function(nullptr_t) noexcept
^~~~~~~~
/usr/lib/gcc/x86_64-pc-linux-gnu/6.2.1/../../../../include/c++/6.2.1/functional:1877:7: note: no known conversion for argument 1 from '' to 'std::nullptr_t'
/usr/lib/gcc/x86_64-pc-linux-gnu/6.2.1/../../../../include/c++/6.2.1/functional:1870:7: note: candidate: std::function<_Res(_ArgTypes ...)>::function() [with _Res = float; _ArgTypes = {float}]
function() noexcept
^~~~~~~~
/usr/lib/gcc/x86_64-pc-linux-gnu/6.2.1/../../../../include/c++/6.2.1/functional:1870:7: note: candidate expects 0 arguments, 1 provided

Activity

  1. thjashin commented on Nov 7, 2016

    @thjashin
    Contributor

    Also found by me when compiling using gcc 6.2.0

  2. added
    type:build/install
    on Nov 7, 2016
  3. aselle commented on Nov 7, 2016

    @aselle
    Contributor

    @benoitsteiner, it looks like an Eigen related compilation problem.

  4. pavelchristof commented on Nov 7, 2016

    @pavelchristof
    ContributorAuthor

    Replacing the problematic line (tensorflow/core/kernels/quantize_op.cc:116) with
    .unaryExpr([] (float r) -> float { return round(r); })
    works.

  5. drpngx commented on Nov 8, 2016

    @drpngx
    Contributor

    What happens when you pass &::round? Or &std::round?

  6. benoitsteiner commented on Nov 9, 2016

    @benoitsteiner
    Contributor

    I rewrote the code to avoid calling std::round in fb60813.

    Unfortunately I don't have gcc 6.2 installed so I couldn't verify that this solves the problem. Can you try and let me know if it works for you ?

  7. thjashin commented on Nov 9, 2016

    @thjashin
    Contributor

    @benoitsteiner It works with gcc-6.2.0.

  8. benoitsteiner commented on Nov 9, 2016

    @benoitsteiner
    Contributor

    Thanks, closing this issue

  9. added a commit that references this issue on Nov 14, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

type:build/install

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions