<h3 dir="auto">Environment info</h3>
<p dir="auto">Operating System: CentOS 6.7<br>
If installed from sources, provide the commit hash: <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/tensorflow/tensorflow/commit/eda89e930cfcbd992ecacafd40267d733e2153dc/hovercard" href="https://github.com/tensorflow/tensorflow/commit/eda89e930cfcbd992ecacafd40267d733e2153dc"><tt>eda89e9</tt></a></p>
<h3 dir="auto">Steps to reproduce</h3>
<ol dir="auto">
<li>Configure for gcc 4.8.2</li>
<li>./configure</li>
<li>Edit third_party/gpus/crosstool/clang/bin/crosstool_wrapper_driver_is_not_gcc
<ul dir="auto">
<li>This is necessary; otherwise <code class="notranslate">gcc</code> can't find <code class="notranslate">as</code>.</li>
<li>In fact, there are notes about this:
<ul dir="auto">
<li><code class="notranslate"># TODO(zhengxq): for some reason, 'gcc' needs this help to find 'as'.</code></li>
<li><code class="notranslate"># Need to investigate and fix.</code></li>
</ul>
</li>
<li>I had to comment their fix to get gcc to find <code class="notranslate">as</code> on my system.</li>
<li>Specifically, <code class="notranslate"># cmd = 'PATH=' + PREFIX_DIR + ' ' + cmd</code></li>
</ul>
</li>
<li><code class="notranslate">bazel build -c opt --config=cuda --verbose_failures --genrule_strategy=standalone --spawn_strategy=standalone //tensorflow/tools/pip_package:build_pip_package</code></li>
</ol>
<h3 dir="auto">What have you tried?</h3>
<ol dir="auto">
<li>I don't know what else to try.</li>
</ol>
<h3 dir="auto">Logs or other output that would be helpful</h3>
<p dir="auto">Most of the build succeeds, but then I get</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="INFO: Found 1 target...
ERROR: /home-4/rdipiet2@jhu.edu/install/tensorflow/tensorflow/core/kernels/BUILD:560:1: C++ compilation of rule '//tensorflow/core/kernels:matrix_solve_ls_op' failed: crosstool_wrapper_driver_is_not_gcc failed: error executing command 
  (cd /home-4/rdipiet2@jhu.edu/.cache/bazel/_bazel_rdipiet2@jhu.edu/549db212089e33b4d213773753834e47/tensorflow &amp;&amp; \
  exec env - \
    PATH=/home-4/rdipiet2@jhu.edu/install/bazel/output:/home-4/rdipiet2@jhu.edu/.usr/bin:/home-4/rdipiet2@jhu.edu/vc/scripts:/home-4/rdipiet2@jhu.edu/.local/bin:/cm/shared/apps/java/JDK_1.8.0_45/bin:/cm/shared/apps/cuda/7.0/bin:/cm/shared/apps/git/2.6.4/bin:/cm/shared/apps/anaconda/2.7.10/bin:/cm/shared/apps/slurm/current/sbin:/cm/shared/apps/slurm/current/bin:/cm/shared/apps/gcc/4.8.2/bin:/cm/shared/apps/Intel/openmpi/1.8.4/bin:/cm/shared/apps/binutils:/cm/shared/apps/binutils/2.25/src/bin:/cm/shared/apps/parallel_studio_xe_2015_update2/composer_xe_2015.2.164/bin/intel64:/usr/lib64/qt-3.3/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/opt/ibutils/bin:/sbin:/usr/sbin:/cm/local/apps/environment-modules/3.2.10/bin:/opt/dell/srvadmin/bin:/home-4/rdipiet2@jhu.edu/bin \
  third_party/gpus/crosstool/clang/bin/crosstool_wrapper_driver_is_not_gcc -U_FORTIFY_SOURCE '-D_FORTIFY_SOURCE=1' -fstack-protector -fPIE -Wall -Wunused-but-set-parameter -Wno-free-nonheap-object -fno-omit-frame-pointer -g0 -O2 -DNDEBUG -ffunction-sections -fdata-sections '-std=c++11' -iquote . -iquote bazel-out/local_linux-opt/genfiles -iquote external/bazel_tools -iquote bazel-out/local_linux-opt/genfiles/external/bazel_tools -iquote external/jpeg_archive -iquote bazel-out/local_linux-opt/genfiles/external/jpeg_archive -iquote external/png_archive -iquote bazel-out/local_linux-opt/genfiles/external/png_archive -iquote external/re2 -iquote bazel-out/local_linux-opt/genfiles/external/re2 -iquote external/eigen_archive -iquote bazel-out/local_linux-opt/genfiles/external/eigen_archive -isystem google/protobuf/src -isystem bazel-out/local_linux-opt/genfiles/google/protobuf/src -isystem external/bazel_tools/tools/cpp/gcc3 -isystem external/jpeg_archive/jpeg-9a -isystem bazel-out/local_linux-opt/genfiles/external/jpeg_archive/jpeg-9a -isystem external/png_archive/libpng-1.2.53 -isystem bazel-out/local_linux-opt/genfiles/external/png_archive/libpng-1.2.53 -isystem external/re2 -isystem bazel-out/local_linux-opt/genfiles/external/re2 -isystem third_party/eigen3 -isystem bazel-out/local_linux-opt/genfiles/third_party/eigen3 -isystem external/eigen_archive/eigen-eigen-017cff30cf74 -isystem bazel-out/local_linux-opt/genfiles/external/eigen_archive/eigen-eigen-017cff30cf74 -isystem third_party/gpus/cuda -isystem bazel-out/local_linux-opt/genfiles/third_party/gpus/cuda -isystem third_party/gpus/cuda/include -isystem bazel-out/local_linux-opt/genfiles/third_party/gpus/cuda/include -fno-exceptions -DEIGEN_AVOID_STL_ARRAY '-DGOOGLE_CUDA=1' -pthread '-DGOOGLE_CUDA=1' -no-canonical-prefixes -Wno-builtin-macro-redefined '-D__DATE__=&quot;redacted&quot;' '-D__TIMESTAMP__=&quot;redacted&quot;' '-D__TIME__=&quot;redacted&quot;' -fno-canonical-system-headers '-frandom-seed=bazel-out/local_linux-opt/bin/tensorflow/core/kernels/_objs/matrix_solve_ls_op/tensorflow/core/kernels/matrix_solve_ls_op.pic.o' -MD -MF bazel-out/local_linux-opt/bin/tensorflow/core/kernels/_objs/matrix_solve_ls_op/tensorflow/core/kernels/matrix_solve_ls_op.pic.d -fPIC -c tensorflow/core/kernels/matrix_solve_ls_op.cc -o bazel-out/local_linux-opt/bin/tensorflow/core/kernels/_objs/matrix_solve_ls_op/tensorflow/core/kernels/matrix_solve_ls_op.pic.o): com.google.devtools.build.lib.shell.BadExitStatusException: Process exited with status 1: crosstool_wrapper_driver_is_not_gcc failed: error executing command 
  (cd /home-4/rdipiet2@jhu.edu/.cache/bazel/_bazel_rdipiet2@jhu.edu/549db212089e33b4d213773753834e47/tensorflow &amp;&amp; \
  exec env - \
    PATH=/home-4/rdipiet2@jhu.edu/install/bazel/output:/home-4/rdipiet2@jhu.edu/.usr/bin:/home-4/rdipiet2@jhu.edu/vc/scripts:/home-4/rdipiet2@jhu.edu/.local/bin:/cm/shared/apps/java/JDK_1.8.0_45/bin:/cm/shared/apps/cuda/7.0/bin:/cm/shared/apps/git/2.6.4/bin:/cm/shared/apps/anaconda/2.7.10/bin:/cm/shared/apps/slurm/current/sbin:/cm/shared/apps/slurm/current/bin:/cm/shared/apps/gcc/4.8.2/bin:/cm/shared/apps/Intel/openmpi/1.8.4/bin:/cm/shared/apps/binutils:/cm/shared/apps/binutils/2.25/src/bin:/cm/shared/apps/parallel_studio_xe_2015_update2/composer_xe_2015.2.164/bin/intel64:/usr/lib64/qt-3.3/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/opt/ibutils/bin:/sbin:/usr/sbin:/cm/local/apps/environment-modules/3.2.10/bin:/opt/dell/srvadmin/bin:/home-4/rdipiet2@jhu.edu/bin \
  third_party/gpus/crosstool/clang/bin/crosstool_wrapper_driver_is_not_gcc -U_FORTIFY_SOURCE '-D_FORTIFY_SOURCE=1' -fstack-protector -fPIE -Wall -Wunused-but-set-parameter -Wno-free-nonheap-object -fno-omit-frame-pointer -g0 -O2 -DNDEBUG -ffunction-sections -fdata-sections '-std=c++11' -iquote . -iquote bazel-out/local_linux-opt/genfiles -iquote external/bazel_tools -iquote bazel-out/local_linux-opt/genfiles/external/bazel_tools -iquote external/jpeg_archive -iquote bazel-out/local_linux-opt/genfiles/external/jpeg_archive -iquote external/png_archive -iquote bazel-out/local_linux-opt/genfiles/external/png_archive -iquote external/re2 -iquote bazel-out/local_linux-opt/genfiles/external/re2 -iquote external/eigen_archive -iquote bazel-out/local_linux-opt/genfiles/external/eigen_archive -isystem google/protobuf/src -isystem bazel-out/local_linux-opt/genfiles/google/protobuf/src -isystem external/bazel_tools/tools/cpp/gcc3 -isystem external/jpeg_archive/jpeg-9a -isystem bazel-out/local_linux-opt/genfiles/external/jpeg_archive/jpeg-9a -isystem external/png_archive/libpng-1.2.53 -isystem bazel-out/local_linux-opt/genfiles/external/png_archive/libpng-1.2.53 -isystem external/re2 -isystem bazel-out/local_linux-opt/genfiles/external/re2 -isystem third_party/eigen3 -isystem bazel-out/local_linux-opt/genfiles/third_party/eigen3 -isystem external/eigen_archive/eigen-eigen-017cff30cf74 -isystem bazel-out/local_linux-opt/genfiles/external/eigen_archive/eigen-eigen-017cff30cf74 -isystem third_party/gpus/cuda -isystem bazel-out/local_linux-opt/genfiles/third_party/gpus/cuda -isystem third_party/gpus/cuda/include -isystem bazel-out/local_linux-opt/genfiles/third_party/gpus/cuda/include -fno-exceptions -DEIGEN_AVOID_STL_ARRAY '-DGOOGLE_CUDA=1' -pthread '-DGOOGLE_CUDA=1' -no-canonical-prefixes -Wno-builtin-macro-redefined '-D__DATE__=&quot;redacted&quot;' '-D__TIMESTAMP__=&quot;redacted&quot;' '-D__TIME__=&quot;redacted&quot;' -fno-canonical-system-headers '-frandom-seed=bazel-out/local_linux-opt/bin/tensorflow/core/kernels/_objs/matrix_solve_ls_op/tensorflow/core/kernels/matrix_solve_ls_op.pic.o' -MD -MF bazel-out/local_linux-opt/bin/tensorflow/core/kernels/_objs/matrix_solve_ls_op/tensorflow/core/kernels/matrix_solve_ls_op.pic.d -fPIC -c tensorflow/core/kernels/matrix_solve_ls_op.cc -o bazel-out/local_linux-opt/bin/tensorflow/core/kernels/_objs/matrix_solve_ls_op/tensorflow/core/kernels/matrix_solve_ls_op.pic.o): com.google.devtools.build.lib.shell.BadExitStatusException: Process exited with status 1.
tensorflow/core/kernels/matrix_solve_ls_op.cc: In member function 'void tensorflow::MatrixSolveLsOp&lt;Scalar, SupportsBatchOperationT&gt;::ComputeMatrix(tensorflow::OpKernelContext*, const typename tensorflow::BinaryLinearAlgebraOp&lt;Scalar, SupportsBatchOperationT&gt;::ConstMatrixMap&amp;, const typename tensorflow::BinaryLinearAlgebraOp&lt;Scalar, SupportsBatchOperationT&gt;::ConstMatrixMap&amp;, typename tensorflow::BinaryLinearAlgebraOp&lt;Scalar, SupportsBatchOperationT&gt;::MatrixMap*)':
tensorflow/core/kernels/matrix_solve_ls_op.cc:111:41: error: 'Matrix' is not a class, namespace, or enumeration
               (Scalar(l2_regularizer) * Matrix::Ones(cols, 1)).asDiagonal();
                                         ^
tensorflow/core/kernels/matrix_solve_ls_op.cc:131:41: error: 'Matrix' is not a class, namespace, or enumeration
               (Scalar(l2_regularizer) * Matrix::Ones(rows, 1)).asDiagonal();
                                         ^
In file included from ./tensorflow/core/framework/op_kernel.h:22:0,
                 from tensorflow/core/kernels/matrix_solve_ls_op.cc:23:
./tensorflow/core/framework/allocator.h: In member function 'virtual std::size_t tensorflow::Allocator::RequestedSize(void*)':
./tensorflow/core/framework/allocator.h:152:3: warning: control reaches end of non-void function [-Wreturn-type]
   }
   ^
In file included from ./tensorflow/core/framework/op_kernel.h:25:0,
                 from tensorflow/core/kernels/matrix_solve_ls_op.cc:23:
./tensorflow/core/framework/device_base.h: In member function 'virtual tensorflow::Allocator* tensorflow::DeviceBase::GetAllocator(tensorflow::AllocatorAttributes)':
./tensorflow/core/framework/device_base.h:150:3: warning: control reaches end of non-void function [-Wreturn-type]
   }
   ^
./tensorflow/core/framework/device_base.h: In member function 'virtual const tensorflow::DeviceAttributes&amp; tensorflow::DeviceBase::attributes() const':
./tensorflow/core/framework/device_base.h:181:3: warning: control reaches end of non-void function [-Wreturn-type]
   }
   ^
Target //tensorflow/tools/pip_package:build_pip_package failed to build
INFO: Elapsed time: 12.708s, Critical Path: 12.06s
"><pre class="notranslate"><code class="notranslate">INFO: Found 1 target...
ERROR: /home-4/rdipiet2@jhu.edu/install/tensorflow/tensorflow/core/kernels/BUILD:560:1: C++ compilation of rule '//tensorflow/core/kernels:matrix_solve_ls_op' failed: crosstool_wrapper_driver_is_not_gcc failed: error executing command 
  (cd /home-4/rdipiet2@jhu.edu/.cache/bazel/_bazel_rdipiet2@jhu.edu/549db212089e33b4d213773753834e47/tensorflow &amp;&amp; \
  exec env - \
    PATH=/home-4/rdipiet2@jhu.edu/install/bazel/output:/home-4/rdipiet2@jhu.edu/.usr/bin:/home-4/rdipiet2@jhu.edu/vc/scripts:/home-4/rdipiet2@jhu.edu/.local/bin:/cm/shared/apps/java/JDK_1.8.0_45/bin:/cm/shared/apps/cuda/7.0/bin:/cm/shared/apps/git/2.6.4/bin:/cm/shared/apps/anaconda/2.7.10/bin:/cm/shared/apps/slurm/current/sbin:/cm/shared/apps/slurm/current/bin:/cm/shared/apps/gcc/4.8.2/bin:/cm/shared/apps/Intel/openmpi/1.8.4/bin:/cm/shared/apps/binutils:/cm/shared/apps/binutils/2.25/src/bin:/cm/shared/apps/parallel_studio_xe_2015_update2/composer_xe_2015.2.164/bin/intel64:/usr/lib64/qt-3.3/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/opt/ibutils/bin:/sbin:/usr/sbin:/cm/local/apps/environment-modules/3.2.10/bin:/opt/dell/srvadmin/bin:/home-4/rdipiet2@jhu.edu/bin \
  third_party/gpus/crosstool/clang/bin/crosstool_wrapper_driver_is_not_gcc -U_FORTIFY_SOURCE '-D_FORTIFY_SOURCE=1' -fstack-protector -fPIE -Wall -Wunused-but-set-parameter -Wno-free-nonheap-object -fno-omit-frame-pointer -g0 -O2 -DNDEBUG -ffunction-sections -fdata-sections '-std=c++11' -iquote . -iquote bazel-out/local_linux-opt/genfiles -iquote external/bazel_tools -iquote bazel-out/local_linux-opt/genfiles/external/bazel_tools -iquote external/jpeg_archive -iquote bazel-out/local_linux-opt/genfiles/external/jpeg_archive -iquote external/png_archive -iquote bazel-out/local_linux-opt/genfiles/external/png_archive -iquote external/re2 -iquote bazel-out/local_linux-opt/genfiles/external/re2 -iquote external/eigen_archive -iquote bazel-out/local_linux-opt/genfiles/external/eigen_archive -isystem google/protobuf/src -isystem bazel-out/local_linux-opt/genfiles/google/protobuf/src -isystem external/bazel_tools/tools/cpp/gcc3 -isystem external/jpeg_archive/jpeg-9a -isystem bazel-out/local_linux-opt/genfiles/external/jpeg_archive/jpeg-9a -isystem external/png_archive/libpng-1.2.53 -isystem bazel-out/local_linux-opt/genfiles/external/png_archive/libpng-1.2.53 -isystem external/re2 -isystem bazel-out/local_linux-opt/genfiles/external/re2 -isystem third_party/eigen3 -isystem bazel-out/local_linux-opt/genfiles/third_party/eigen3 -isystem external/eigen_archive/eigen-eigen-017cff30cf74 -isystem bazel-out/local_linux-opt/genfiles/external/eigen_archive/eigen-eigen-017cff30cf74 -isystem third_party/gpus/cuda -isystem bazel-out/local_linux-opt/genfiles/third_party/gpus/cuda -isystem third_party/gpus/cuda/include -isystem bazel-out/local_linux-opt/genfiles/third_party/gpus/cuda/include -fno-exceptions -DEIGEN_AVOID_STL_ARRAY '-DGOOGLE_CUDA=1' -pthread '-DGOOGLE_CUDA=1' -no-canonical-prefixes -Wno-builtin-macro-redefined '-D__DATE__="redacted"' '-D__TIMESTAMP__="redacted"' '-D__TIME__="redacted"' -fno-canonical-system-headers '-frandom-seed=bazel-out/local_linux-opt/bin/tensorflow/core/kernels/_objs/matrix_solve_ls_op/tensorflow/core/kernels/matrix_solve_ls_op.pic.o' -MD -MF bazel-out/local_linux-opt/bin/tensorflow/core/kernels/_objs/matrix_solve_ls_op/tensorflow/core/kernels/matrix_solve_ls_op.pic.d -fPIC -c tensorflow/core/kernels/matrix_solve_ls_op.cc -o bazel-out/local_linux-opt/bin/tensorflow/core/kernels/_objs/matrix_solve_ls_op/tensorflow/core/kernels/matrix_solve_ls_op.pic.o): com.google.devtools.build.lib.shell.BadExitStatusException: Process exited with status 1: crosstool_wrapper_driver_is_not_gcc failed: error executing command 
  (cd /home-4/rdipiet2@jhu.edu/.cache/bazel/_bazel_rdipiet2@jhu.edu/549db212089e33b4d213773753834e47/tensorflow &amp;&amp; \
  exec env - \
    PATH=/home-4/rdipiet2@jhu.edu/install/bazel/output:/home-4/rdipiet2@jhu.edu/.usr/bin:/home-4/rdipiet2@jhu.edu/vc/scripts:/home-4/rdipiet2@jhu.edu/.local/bin:/cm/shared/apps/java/JDK_1.8.0_45/bin:/cm/shared/apps/cuda/7.0/bin:/cm/shared/apps/git/2.6.4/bin:/cm/shared/apps/anaconda/2.7.10/bin:/cm/shared/apps/slurm/current/sbin:/cm/shared/apps/slurm/current/bin:/cm/shared/apps/gcc/4.8.2/bin:/cm/shared/apps/Intel/openmpi/1.8.4/bin:/cm/shared/apps/binutils:/cm/shared/apps/binutils/2.25/src/bin:/cm/shared/apps/parallel_studio_xe_2015_update2/composer_xe_2015.2.164/bin/intel64:/usr/lib64/qt-3.3/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/opt/ibutils/bin:/sbin:/usr/sbin:/cm/local/apps/environment-modules/3.2.10/bin:/opt/dell/srvadmin/bin:/home-4/rdipiet2@jhu.edu/bin \
  third_party/gpus/crosstool/clang/bin/crosstool_wrapper_driver_is_not_gcc -U_FORTIFY_SOURCE '-D_FORTIFY_SOURCE=1' -fstack-protector -fPIE -Wall -Wunused-but-set-parameter -Wno-free-nonheap-object -fno-omit-frame-pointer -g0 -O2 -DNDEBUG -ffunction-sections -fdata-sections '-std=c++11' -iquote . -iquote bazel-out/local_linux-opt/genfiles -iquote external/bazel_tools -iquote bazel-out/local_linux-opt/genfiles/external/bazel_tools -iquote external/jpeg_archive -iquote bazel-out/local_linux-opt/genfiles/external/jpeg_archive -iquote external/png_archive -iquote bazel-out/local_linux-opt/genfiles/external/png_archive -iquote external/re2 -iquote bazel-out/local_linux-opt/genfiles/external/re2 -iquote external/eigen_archive -iquote bazel-out/local_linux-opt/genfiles/external/eigen_archive -isystem google/protobuf/src -isystem bazel-out/local_linux-opt/genfiles/google/protobuf/src -isystem external/bazel_tools/tools/cpp/gcc3 -isystem external/jpeg_archive/jpeg-9a -isystem bazel-out/local_linux-opt/genfiles/external/jpeg_archive/jpeg-9a -isystem external/png_archive/libpng-1.2.53 -isystem bazel-out/local_linux-opt/genfiles/external/png_archive/libpng-1.2.53 -isystem external/re2 -isystem bazel-out/local_linux-opt/genfiles/external/re2 -isystem third_party/eigen3 -isystem bazel-out/local_linux-opt/genfiles/third_party/eigen3 -isystem external/eigen_archive/eigen-eigen-017cff30cf74 -isystem bazel-out/local_linux-opt/genfiles/external/eigen_archive/eigen-eigen-017cff30cf74 -isystem third_party/gpus/cuda -isystem bazel-out/local_linux-opt/genfiles/third_party/gpus/cuda -isystem third_party/gpus/cuda/include -isystem bazel-out/local_linux-opt/genfiles/third_party/gpus/cuda/include -fno-exceptions -DEIGEN_AVOID_STL_ARRAY '-DGOOGLE_CUDA=1' -pthread '-DGOOGLE_CUDA=1' -no-canonical-prefixes -Wno-builtin-macro-redefined '-D__DATE__="redacted"' '-D__TIMESTAMP__="redacted"' '-D__TIME__="redacted"' -fno-canonical-system-headers '-frandom-seed=bazel-out/local_linux-opt/bin/tensorflow/core/kernels/_objs/matrix_solve_ls_op/tensorflow/core/kernels/matrix_solve_ls_op.pic.o' -MD -MF bazel-out/local_linux-opt/bin/tensorflow/core/kernels/_objs/matrix_solve_ls_op/tensorflow/core/kernels/matrix_solve_ls_op.pic.d -fPIC -c tensorflow/core/kernels/matrix_solve_ls_op.cc -o bazel-out/local_linux-opt/bin/tensorflow/core/kernels/_objs/matrix_solve_ls_op/tensorflow/core/kernels/matrix_solve_ls_op.pic.o): com.google.devtools.build.lib.shell.BadExitStatusException: Process exited with status 1.
tensorflow/core/kernels/matrix_solve_ls_op.cc: In member function 'void tensorflow::MatrixSolveLsOp&lt;Scalar, SupportsBatchOperationT&gt;::ComputeMatrix(tensorflow::OpKernelContext*, const typename tensorflow::BinaryLinearAlgebraOp&lt;Scalar, SupportsBatchOperationT&gt;::ConstMatrixMap&amp;, const typename tensorflow::BinaryLinearAlgebraOp&lt;Scalar, SupportsBatchOperationT&gt;::ConstMatrixMap&amp;, typename tensorflow::BinaryLinearAlgebraOp&lt;Scalar, SupportsBatchOperationT&gt;::MatrixMap*)':
tensorflow/core/kernels/matrix_solve_ls_op.cc:111:41: error: 'Matrix' is not a class, namespace, or enumeration
               (Scalar(l2_regularizer) * Matrix::Ones(cols, 1)).asDiagonal();
                                         ^
tensorflow/core/kernels/matrix_solve_ls_op.cc:131:41: error: 'Matrix' is not a class, namespace, or enumeration
               (Scalar(l2_regularizer) * Matrix::Ones(rows, 1)).asDiagonal();
                                         ^
In file included from ./tensorflow/core/framework/op_kernel.h:22:0,
                 from tensorflow/core/kernels/matrix_solve_ls_op.cc:23:
./tensorflow/core/framework/allocator.h: In member function 'virtual std::size_t tensorflow::Allocator::RequestedSize(void*)':
./tensorflow/core/framework/allocator.h:152:3: warning: control reaches end of non-void function [-Wreturn-type]
   }
   ^
In file included from ./tensorflow/core/framework/op_kernel.h:25:0,
                 from tensorflow/core/kernels/matrix_solve_ls_op.cc:23:
./tensorflow/core/framework/device_base.h: In member function 'virtual tensorflow::Allocator* tensorflow::DeviceBase::GetAllocator(tensorflow::AllocatorAttributes)':
./tensorflow/core/framework/device_base.h:150:3: warning: control reaches end of non-void function [-Wreturn-type]
   }
   ^
./tensorflow/core/framework/device_base.h: In member function 'virtual const tensorflow::DeviceAttributes&amp; tensorflow::DeviceBase::attributes() const':
./tensorflow/core/framework/device_base.h:181:3: warning: control reaches end of non-void function [-Wreturn-type]
   }
   ^
Target //tensorflow/tools/pip_package:build_pip_package failed to build
INFO: Elapsed time: 12.708s, Critical Path: 12.06s

</code></pre></div>
<p dir="auto">I'm hoping very much to get this running on a CentOS cluster – any help will be very appreciated. Thanks.</p>
<p dir="auto">I have been trying to compile tensorflow from source without success.<br>
I could compile version 0.6.0 with no trouble, but trying to compile 0.7.1 produces the following error:</p>
<blockquote>
tensorflow/core/kernels/matrix_solve_ls_op.cc: In member function 'void tensorflow::MatrixSolveLsOp::ComputeMatrix(tensorflow::OpKernelContext*, const typename tensorflow::BinaryLinearAlgebraOp::ConstMatrixMap&amp;, const typename tensorflow::BinaryLinearAlgebraOp::ConstMatrixMap&amp;, typename tensorflow::BinaryLinearAlgebraOp::MatrixMap*)':
tensorflow/core/kernels/matrix_solve_ls_op.cc:111:41: error: 'Matrix' is not a class, namespace, or enumeration
               (Scalar(l2_regularizer) * Matrix::Ones(cols, 1)).asDiagonal();
                                         ^
tensorflow/core/kernels/matrix_solve_ls_op.cc:131:41: error: 'Matrix' is not a class, namespace, or enumeration
               (Scalar(l2_regularizer) * Matrix::Ones(rows, 1)).asDiagonal();
                                         ^
In file included from ./tensorflow/core/framework/op_kernel.h:22:0,
                 from tensorflow/core/kernels/matrix_solve_ls_op.cc:23:
./tensorflow/core/framework/allocator.h: In member function 'virtual std::size_t tensorflow::Allocator::RequestedSize(void*)':
./tensorflow/core/framework/allocator.h:128:3: warning: control reaches end of non-void function [-Wreturn-type]
   }
   ^
In file included from ./tensorflow/core/framework/op_kernel.h:25:0,
                 from tensorflow/core/kernels/matrix_solve_ls_op.cc:23:
./tensorflow/core/framework/device_base.h: In member function 'virtual tensorflow::Allocator* tensorflow::DeviceBase::GetAllocator(tensorflow::AllocatorAttributes)':
./tensorflow/core/framework/device_base.h:149:3: warning: control reaches end of non-void function [-Wreturn-type]
   }
   ^
./tensorflow/core/framework/device_base.h: In member function 'virtual const tensorflow::DeviceAttributes&amp; tensorflow::DeviceBase::attributes() const':
./tensorflow/core/framework/device_base.h:179:3: warning: control reaches end of non-void function [-Wreturn-type]
   }
   ^
</blockquote>
<p dir="auto">I tried to find the definition of Matrix::Ones in all folders, but couldn't find anything. In fact</p>
<blockquote>
<p dir="auto">grep "Ones" tensorflow/* -R</p>
</blockquote>
<p dir="auto">returns</p>
<blockquote>
core/kernels/matrix_solve_ls_op.cc:              (Scalar(l2_regularizer) * Matrix::Ones(cols, 1)).asDiagonal();
core/kernels/matrix_solve_ls_op.cc:              (Scalar(l2_regularizer) * Matrix::Ones(rows, 1)).asDiagonal();
python/kernel_tests/constant_op_test.py:class OnesTest(tf.test.TestCase):
python/kernel_tests/constant_op_test.py:  def _Ones(self, shape):
python/kernel_tests/constant_op_test.py:    self.assertTrue(np.array_equal(self._Ones([2, 3]), np.array([[1] * 3] * 2)))
python/kernel_tests/constant_op_test.py:class OnesLikeTest(tf.test.TestCase):
python/kernel_tests/constant_op_test.py:  def testOnesLike(self):
python/kernel_tests/constant_op_test.py:  def testOnesLikePartialShape(self):
python/kernel_tests/shape_ops_test.py:  def testSqueezeAllOnes(self):
python/kernel_tests/shape_ops_test.py:  def testSqueezeOnlyOnes(self):
</blockquote>
<h3 dir="auto">Environment info</h3>
<p dir="auto">OS : CentOS 6.6, but I have gcc 4.8.2 installed.</p>
<h3 dir="auto">Steps to reproduce</h3>
<blockquote>
<p dir="auto">./configure</p>
</blockquote>
<p dir="auto">say yes to GPU, cuda 7.5, cudnn 4</p>
<blockquote>
<p dir="auto">bazel build --config=cuda --jobs 6 --verbose_failures --linkopt="-lrt" --linkopt="-lm" --genrule_strategy=standalone --spawn_strategy=standalone -c opt //tensorflow/tools/pip_package:build_pip_package</p>
</blockquote>