2017-05-30 55 views
0

我想從我的搬運工圖像中運行此巴澤勒命令巴澤爾構建tensorflow /蟒蛇/工具:strip_unused編譯失敗

docker run -it gcr.io/tensorflow/tensorflow:latest-devel 
cd /tensorflow 
bazel build tensorflow/python/tools:strip_unused 

但是它失敗,此錯誤:

ERROR: /tensorflow/tensorflow/core/kernels/BUILD:1970:1: C++ compilation of rule '//tensorflow/core/kernels:svd_op' failed: gcc failed: error executing command /usr/bin/gcc -U_FORTIFY_SOURCE -fstack-protector -Wall -B/usr/bin -B/usr/bin -Wunused-but-set-parameter -Wno-free-nonheap-object -fno-omit-frame-pointer -g0 -O2 '-D_FORTIFY_SOURCE=1' -DNDEBUG ... (remaining 107 argument(s) skipped): com.google.devtools.build.lib.shell.BadExitStatusException: Process exited with status 4. 
gcc: internal compiler error: Killed (program cc1plus) 
Please submit a full bug report, 
with preprocessed source if appropriate. 
See <file:///usr/share/doc/gcc-5/README.Bugs> for instructions. 
Target //tensorflow/python/tools:strip_unused failed to build 
Use --verbose_failures to see the command lines of failed build steps. 
INFO: Elapsed time: 609.363s, Critical Path: 456.46s 

回答

0

我想當gcc被操作系統終止時會發生這個錯誤。你有足夠的內存/交換?

我不認爲這是Bazel或Tensorflow特定的。

+0

是的,這是正確的。我通過運行'''bazel build tensorflow/python/tools解決了它:strip_unused --local_resources 2048,.5,1.0''' – ajayjapan

0

這可能是因爲你用完了RAM。生成失敗後請立即張貼dmesg | tail的輸出。