<p dir="auto">Operating System:  Ubuntu 14.04.4<br>
CUDA version: 7.5<br>
cuNN: 4.0.7</p>
<p dir="auto">Installed from sources:<br>
commit <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/tensorflow/tensorflow/commit/5681406e2874a02835d34be579810a93ad74a473/hovercard" href="https://github.com/tensorflow/tensorflow/commit/5681406e2874a02835d34be579810a93ad74a473"><tt>5681406</tt></a></p>
<p dir="auto">running : bazel build -c opt //tensorflow/cc:tutorials_example_trainer --verbose_failures --genrule_strategy=standalone --spawn_strategy=standalone</p>
<p dir="auto">Note : that i have configured my WORKSPACE file as per : <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="117675319" data-permission-text="Title is private" data-url="https://github.com/bazelbuild/bazel/issues/623" data-hovercard-type="issue" data-hovercard-url="/bazelbuild/bazel/issues/623/hovercard?comment_id=158151936&amp;comment_type=issue_comment" href="https://github.com/bazelbuild/bazel/issues/623#issuecomment-158151936">bazelbuild/bazel#623 (comment)</a>:</p>
<p dir="auto">(made the following corrections:)<br>
download jpeg.BUILD.txt, png.BUILD.txt, and WORKSPACE.txt from <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/srsaharoy/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/srsaharoy">@srsaharoy</a> 's message <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="123925935" data-permission-text="Title is private" data-url="https://github.com/tensorflow/tensorflow/issues/623" data-hovercard-type="pull_request" data-hovercard-url="/tensorflow/tensorflow/pull/623/hovercard" href="https://github.com/tensorflow/tensorflow/pull/623">#623</a> (comment) . (the 2nd post with attachments) and place these files in the tensorflow lib without the .txt extension instead of the existing files (in my case ~/git/tensorflow/tensorflow).<br>
create folder with external source files: ~/git/tensorflow/fix/files/re2 ~/git/tensorflow/fix/files/jpeg-9a/jpeg-9a ~/git/tensorflow/fix/files/gemmlowp ~/git/tensorflow/fix/files/libpng-1.2.53/libpng-1.2.53 ~/git/tensorflow/fix/files/six-1.10.0 Note the dir-in-dir for jpeg-9a and libpng-1.2.53. This is necessary.<br>
change paths in WORKSPACE file to match the location of the aux source files<br>
....</p>
<p dir="auto">Now I am just stuck with the following error:</p>
<p dir="auto">ERROR: /home/julialintern/tensorflow/tensorflow/core/BUILD:756:1: C++ compilation of rule '//tensorflow/core:lib_internal' failed: gcc failed: error executing command<br>
(cd /home/julialintern/.cache/bazel/<em>bazel_julialintern/1a7b4f00b1b7d4c4a3ca618f554c7ad8/tensorflow &amp;&amp; <br>
exec env - <br>
PATH=/home/julialintern/torch/install/bin:/home/julialintern/bin:/usr/local/cuda/bin/:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/home/julialintern/bin <br>
TMPDIR=/tmp/user/1001 <br>
/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-omit-frame-pointer -g0 -O2 -DNDEBUG -ffunction-sections -fdata-sections -g0 '-std=c++0x' -iquote . -iquote bazel-out/host/genfiles -iquote external/bazel_tools -iquote bazel-out/host/genfiles/external/bazel_tools -iquote external/jpeg_archive -iquote bazel-out/host/genfiles/external/jpeg_archive -iquote external/png_archive -iquote bazel-out/host/genfiles/external/png_archive -iquote external/re2 -iquote bazel-out/host/genfiles/external/re2 -iquote external/eigen_archive -iquote bazel-out/host/genfiles/external/eigen_archive -isystem google/protobuf/src -isystem bazel-out/host/genfiles/google/protobuf/src -isystem external/bazel_tools/tools/cpp/gcc3 -isystem external/jpeg_archive/jpeg-9a -isystem bazel-out/host/genfiles/external/jpeg_archive/jpeg-9a -isystem external/png_archive/libpng-1.2.53 -isystem bazel-out/host/genfiles/external/png_archive/libpng-1.2.53 -isystem third_party/eigen3 -isystem bazel-out/host/genfiles/third_party/eigen3 -isystem external/eigen_archive/eigen-eigen-50812b426b7c -isystem bazel-out/host/genfiles/external/eigen_archive/eigen-eigen-50812b426b7c -fno-exceptions -DEIGEN_AVOID_STL_ARRAY -DTENSORFLOW_USE_EIGEN_THREADPOOL -pthread -no-canonical-prefixes -fno-canonical-system-headers -Wno-builtin-macro-redefined '-D__DATE</em>_="redacted"' '-D__TIMESTAMP__="redacted"' '-D__TIME__="redacted"' '-frandom-seed=bazel-out/host/bin/tensorflow/core/_objs/lib_internal/tensorflow/core/lib/core/threadpool.o' -MD -MF bazel-out/host/bin/tensorflow/core/_objs/lib_internal/tensorflow/core/lib/core/threadpool.d -c tensorflow/core/lib/core/threadpool.cc -o bazel-out/host/bin/tensorflow/core/_objs/lib_internal/tensorflow/core/lib/core/threadpool.o): com.google.devtools.build.lib.shell.BadExitStatusException: Process exited with status 1.<br>
tensorflow/core/lib/core/threadpool.cc:83:49: error: expected template-name before '&lt;' token<br>
struct ThreadPool::Impl : Eigen::ThreadPoolTempl {<br>
^<br>
tensorflow/core/lib/core/threadpool.cc:83:49: error: expected '{' before '&lt;' token<br>
tensorflow/core/lib/core/threadpool.cc:83:49: error: expected unqualified-id before '&lt;' token<br>
tensorflow/core/lib/core/threadpool.cc:221:1: error: expected '}' at end of input<br>
}  // namespace tensorflow<br>
^<br>
tensorflow/core/lib/core/threadpool.cc:221:1: error: expected '}' at end of input<br>
Target //tensorflow/cc:tutorials_example_trainer failed to build</p>
<p dir="auto">Hi,<br>
I try to build tensorflow from source, but I get the ERROR as following:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="ERROR: /WORK/sysu_sc_ll/tf-rh/tensorflow-/tensorflow/core/BUILD:766:1: C++ compilation of rule '//tensorflow/core:lib_internal' failed: gcc failed: error executing command /HOME/sysu_sc_ll/WORKSPACE/tf-rh/bazel-/hackbin/gcc -U_FORTIFY_SOURCE '-D_FORTIFY_SOURCE=1' -fstack-protector -Wall -Wl,-z,-relro,-z,now -B/HOME/sysu_sc_ll/WORKSPACE/tf-rh/bazel-/hackbin -B/usr/bin ... (remaining 78 argument(s) skipped): com.google.devtools.build.lib.shell.BadExitStatusException: Process exited with status 1.
tensorflow/core/lib/core/threadpool.cc:82:49: error: expected template-name before '&lt;' token
 struct ThreadPool::Impl : Eigen::ThreadPoolTempl&lt;EigenEnvironment&gt; {
                                                 ^
tensorflow/core/lib/core/threadpool.cc:82:49: error: expected '{' before '&lt;' token
tensorflow/core/lib/core/threadpool.cc:82:49: error: expected unqualified-id before '&lt;' token
tensorflow/core/lib/core/threadpool.cc:220:1: error: expected '}' at end of input
 }  // namespace tensorflow
 ^
tensorflow/core/lib/core/threadpool.cc:220:1: error: expected '}' at end of input
Target //tensorflow/tools/pip_package:build_pip_package failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 12.663s, Critical Path: 10.84s
"><pre class="notranslate"><code class="notranslate">ERROR: /WORK/sysu_sc_ll/tf-rh/tensorflow-/tensorflow/core/BUILD:766:1: C++ compilation of rule '//tensorflow/core:lib_internal' failed: gcc failed: error executing command /HOME/sysu_sc_ll/WORKSPACE/tf-rh/bazel-/hackbin/gcc -U_FORTIFY_SOURCE '-D_FORTIFY_SOURCE=1' -fstack-protector -Wall -Wl,-z,-relro,-z,now -B/HOME/sysu_sc_ll/WORKSPACE/tf-rh/bazel-/hackbin -B/usr/bin ... (remaining 78 argument(s) skipped): com.google.devtools.build.lib.shell.BadExitStatusException: Process exited with status 1.
tensorflow/core/lib/core/threadpool.cc:82:49: error: expected template-name before '&lt;' token
 struct ThreadPool::Impl : Eigen::ThreadPoolTempl&lt;EigenEnvironment&gt; {
                                                 ^
tensorflow/core/lib/core/threadpool.cc:82:49: error: expected '{' before '&lt;' token
tensorflow/core/lib/core/threadpool.cc:82:49: error: expected unqualified-id before '&lt;' token
tensorflow/core/lib/core/threadpool.cc:220:1: error: expected '}' at end of input
 }  // namespace tensorflow
 ^
tensorflow/core/lib/core/threadpool.cc:220:1: error: expected '}' at end of input
Target //tensorflow/tools/pip_package:build_pip_package failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 12.663s, Critical Path: 10.84s

</code></pre></div>
<p dir="auto">OS:  redhat 6.7<br>
gcc: 4.9.2<br>
building with cuda</p>
<p dir="auto">run command:<br>
export EXTRA_BAZEL_ARGS='-s --verbose_failures --ignore_unsupported_sandboxing --genrule_strategy=standalone --spawn_strategy=standalone --jobs 8'<br>
bazel build -c opt //tensorflow/tools/pip_package:build_pip_package</p>
<p dir="auto">I did not change any source file,<br>
And previously, the is another error in the source tensorflow/core/lib/io/record_reader.cc<br>
which claim that the SIZE_MAX is not defined, I solve it by define it as size_t -1. And now this error show up.</p>
<p dir="auto">Could anyone give me some help here? Thanks.</p>