Error while parsing .d file when compiling bazel from source

720 views
Skip to first unread message

qzl847...@gmail.com

unread,
May 4, 2016, 5:05:54 AM5/4/16
to bazel-discuss
Hi all,

I've been trying to get TensorFlow working on a cluster which runs on CentOS 6.7 with a custom GCC. However, It always terminates with error "Error while parsing .d file" with different file.
It's something like this:



>>>>> # //third_party/zlib:zlib [action 'Compiling third_party/zlib/gzwrite.c']
(cd /HOME/sysu_sc_ll/bazel-tmp/bazel.ICq1aRIO/out/bazel && \
exec env - \
PATH=/HOME/sysu_sc_ll/WORKSPACE/tf-rh/bazel-/hackbin/:/WORK/app/Python/2.7.9-icc15/bin:/WORK/app/gcc/4.9.2/bin:/WORK/app/java/jdk1.8.0_11/bin:/HOME/sysu_sc_ll/env/bin:/WORK/app/modules/3.2.10/Modules/3.2.10/bin:/usr/local/mpi3-dynamic/bin:/opt/intel/composer_xe_2013_sp1.2.144/bin/intel64:/opt/intel/composer_xe_2013_sp1.2.144/mpirt/bin/intel64:/opt/intel/composer_xe_2013_sp1.2.144/debugger/gdb/intel64_mic/py26/bin:/opt/intel/composer_xe_2013_sp1.2.144/debugger/gdb/intel64/py26/bin:/opt/intel/composer_xe_2013_sp1.2.144/bin/intel64:/opt/intel/composer_xe_2013_sp1.2.144/bin/intel64_mic:/opt/intel/composer_xe_2013_sp1.2.144/debugger/gui/intel64:/usr/lib64/qt-3.3/bin:/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/HOME/sysu_sc_ll/software/matlab/bin:/HOME/sysu_sc_ll/.local/bin:/HOME/sysu_sc_ll/bin:/HOME/sysu_sc_ll/bin \
TMPDIR=/HOME/sysu_sc_ll/bazel-tmp/ \
/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 -Wunused-but-set-parameter -Wno-free-nonheap-object -fno-omit-frame-pointer -iquote . -iquote bazel-out/local-fastbuild/genfiles -iquote external/bazel_tools -iquote bazel-out/local-fastbuild/genfiles/external/bazel_tools -isystem third_party/zlib -isystem bazel-out/local-fastbuild/genfiles/third_party/zlib -isystem external/bazel_tools/tools/cpp/gcc3 -w -no-canonical-prefixes -fno-canonical-system-headers -Wno-builtin-macro-redefined '-D__DATE__="redacted"' '-D__TIMESTAMP__="redacted"' '-D__TIME__="redacted"' '-frandom-seed=bazel-out/local-fastbuild/bin/third_party/zlib/_objs/zlib/third_party/zlib/gzwrite.pic.o' -MD -MF bazel-out/local-fastbuild/bin/third_party/zlib/_objs/zlib/third_party/zlib/gzwrite.pic.d -fPIC -c third_party/zlib/gzwrite.c -o bazel-out/local-fastbuild/bin/third_party/zlib/_objs/zlib/third_party/zlib/gzwrite.pic.o)
ERROR: /HOME/sysu_sc_ll/WORKSPACE/tf-rh/bazel/third_party/zlib/BUILD:9:1: error while parsing .d file: /HOME/sysu_sc_ll/bazel-tmp/bazel.ICq1aRIO/out/bazel/bazel-out/local-fastbuild/bin/third_party/zlib/_objs/zlib/third_party/zlib/adler32.pic.d (No such file or directory).



Completely no idea. Could anyone here give me some help?

Brian Silverman

unread,
May 4, 2016, 12:58:45 PM5/4/16
to qzl847...@gmail.com, bazel-discuss
Does /HOME/sysu_sc_ll/bazel-tmp/bazel.ICq1aRIO/out/bazel/bazel-out/local-fastbuild/bin/third_party/zlib/_objs/zlib/third_party/zlib/adler32.pic.d (or whatever that file it mentions at the end of the output) exist? If so, do its contents look reasonable (mostly, do all the filenames in it exist)?

Also, what does `echo '#include <stddef.h>' > test_deps.c && /HOME/sysu_sc_ll/WORKSPACE/tf-rh/bazel-/hackbin/gcc -MD -MF test_deps_file.d -c test_deps.c && cat test_deps_file.d` print?


--
You received this message because you are subscribed to the Google Groups "bazel-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bazel-discus...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/bazel-discuss/5381ad41-08a4-44de-a4e7-35cc3b4feb7d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

qzl847...@gmail.com

unread,
May 4, 2016, 9:23:44 PM5/4/16
to bazel-discuss, qzl847...@gmail.com
在 2016年5月5日星期四 UTC+8上午12:58:45,Brian Silverman写道:
No, there is not such file.Instead, there is a file named the same but with .o as suffix.

The output is
$ echo '#include <stddef.h>' > test_deps.c && /HOME/sysu_sc_ll/WORKSPACE/tf-rh/bazel-/hackbin/gcc -MD -MF test_deps_file.d -c test_deps.c && cat test_deps_file.d
test_deps.o: test_deps.c \
/WORK/app/gcc/4.9.2/lib/gcc/x86_64-unknown-linux-gnu/4.9.2/include/stddef.h

qzl847...@gmail.com

unread,
May 4, 2016, 11:29:09 PM5/4/16
to bazel-discuss, qzl847...@gmail.com
在 2016年5月5日星期四 UTC+8上午9:23:44,qzl847...@gmail.com写道:
Strangely, it works now. But i did not make any change actually.
Sorry.

exo...@gmail.com

unread,
Apr 8, 2017, 6:54:58 AM4/8/17
to bazel-discuss, qzl847...@gmail.com
在 2016年5月5日星期四 UTC+8上午11:29:09,qzl847...@gmail.com写道:
Same to me! I've encountered such situations several times and they turns to work again some time later without any manual changes.
Reply all
Reply to author
Forward
0 new messages