Models: SyntaxNet and Bazel Tests Error [Linux]

Created on 13 May 2016  路  11Comments  路  Source: tensorflow/models

Description

After installing the correct deps (protobuf, swig, bazel, asciitree), tried running bazel test syntaxnet/... util/utf8/..., but after a lote of notes and warnings, the final output I got this:

ERROR: /home/lerax/.cache/bazel/_bazel_lerax/cae2b1799296ff1923cddf0854a31846/external/tf/tensorflow/core/kernels/BUILD:856:1: C++ compilation of rule '@tf//tensorflow/core/kernels:argmax_op' failed: gcc failed: error executing command /usr/bin/gcc -U_FORTIFY_SOURCE '-D_FORTIFY_SOURCE=1' -fstack-protector -Wall -Wl,-z,-relro,-z,now -Wunused-but-set-parameter -Wno-free-nonheap-object -fno-omit-frame-pointer -g0 -O2 -DNDEBUG ... (remaining 72 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-4.8/README.Bugs> for instructions.
INFO: Elapsed time: 552.118s, Critical Path: 428.91s
//syntaxnet:arc_standard_transitions_test                             NO STATUS
//syntaxnet:beam_reader_ops_test                                      NO STATUS
//syntaxnet:graph_builder_test                                        NO STATUS
//syntaxnet:lexicon_builder_test                                      NO STATUS
//syntaxnet:parser_features_test                                      NO STATUS
//syntaxnet:parser_trainer_test                                       NO STATUS
//syntaxnet:reader_ops_test                                           NO STATUS
//syntaxnet:sentence_features_test                                    NO STATUS
//syntaxnet:shared_store_test                                         NO STATUS
//syntaxnet:tagger_transitions_test                                   NO STATUS
//syntaxnet:text_formats_test                                         NO STATUS
//util/utf8:unicodetext_unittest                                      NO STATUS

Executed 0 out of 12 tests: 12 were skipped.

Any ideas?

Environment

| feature | version |
| --- | --- |
| gcc | 4.8.4 |
| python | 3.4.3 |
| bazel | 0.22 |
| swig | 2.0.11 |
| protobuf | 3.0.0b2 |
| asciitree | 0.3.1 |
| OS | GNU/Linux, Distro Ubuntu 14.0 |

Most helpful comment

Searching for the error message "gcc: internal compiler error: Killed program cc1plus" gives solutions to this, eg. https://bitcointalk.org/index.php?topic=304389.0
The compiler is out of memory and one solution is to add more swap space.

All 11 comments

I suspect the problem is your Python version. You need to use 2.X.

I have the same problem and my Python version is 2.7.3. I get this output:

`/home/iago/.cache/bazel/_bazel_iago/600cdfc23c4fd2fcdd44ade222f27561/syntaxnet/external/farmhash_archive/farmhash-34c13ddfab0e35422f4c3979f360635a8c050260 /home/iago/.cache/bazel/_bazel_iago/600cdfc23c4fd2fcdd44ade222f27561/syntaxnet
/home/iago/.cache/bazel/_bazel_iago/600cdfc23c4fd2fcdd44ade222f27561/syntaxnet
/tmp/tmp.05N7hlyvuh/missing: Unknown '--is-lightweight' option
Try '/tmp/tmp.05N7hlyvuh/missing --help' for more information
configure: WARNING: 'missing' script is too old or missing
ERROR: /home/iago/.cache/bazel/_bazel_iago/600cdfc23c4fd2fcdd44ade222f27561/external/tf/tensorflow/tools/proto_text/BUILD:31:1: C++ compilation of rule '@tf//tensorflow/tools/proto_text:gen_proto_text_functions' 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-omit-frame-pointer -g0 ... (remaining 77 argument(s) skipped): com.google.devtools.build.lib.shell.BadExitStatusException: Process exited with status 1.
external/tf/tensorflow/tools/proto_text/gen_proto_text_functions.cc:31:26: error: expected ';' at end of member declaration
external/tf/tensorflow/tools/proto_text/gen_proto_text_functions.cc:31:28: error: 'override' does not name a type
external/tf/tensorflow/tools/proto_text/gen_proto_text_functions.cc:34:38: error: expected ';' at end of member declaration
external/tf/tensorflow/tools/proto_text/gen_proto_text_functions.cc:34:40: error: 'override' does not name a type
cc1plus: warning: unrecognized command line option "-Wno-free-nonheap-object" [enabled by default]
INFO: Elapsed time: 171.234s, Critical Path: 5.42s
//syntaxnet:arc_standard_transitions_test NO STATUS
//syntaxnet:beam_reader_ops_test NO STATUS
//syntaxnet:graph_builder_test NO STATUS
//syntaxnet:lexicon_builder_test NO STATUS
//syntaxnet:parser_features_test NO STATUS
//syntaxnet:parser_trainer_test NO STATUS
//syntaxnet:reader_ops_test NO STATUS
//syntaxnet:sentence_features_test NO STATUS
//syntaxnet:shared_store_test NO STATUS
//syntaxnet:tagger_transitions_test NO STATUS
//syntaxnet:text_formats_test NO STATUS

Executed 0 out of 12 tests: 1 fails to build and 11 were skipped.
`
I get " 1 fails" because I added (searching on Bazel issues) this option "--local_resources 2048,2.0,1.0 -j 1" but if I use the command provided on the Installation Guide I get "Executed 0 out of 12 tests: 12 were skipped."

I have the same issue both on Ubuntu and on MacOS.

Similar build issue here... maybe... (using MacPorts 2.3.4, not Brew)

Versions:
MacOSX El Capitan 10.11.5
Xcode: 7.3.1
swig: 3.0.8
protobuf: 3.0.0b2
numpy: 1.11.0
python: 2.7.10
asciitree: 0.3.1
bazel: 0.2.2b

$ which swig # avail on cmd-line, not sure why build is looking for it where it is
/opt/local/bin/swig

Output of bazel test --linkopt=-headerpad_max_install_names syntaxnet/... util/utf8/...:
ERROR: /private/var/tmp/_bazel_schang/3e908dae0122d24722c501694bc155ef/external/tf/tensorflow/python/BUILD:972:1: SWIGing external/tf/tensorflow/python/tensorflow.i failed: swig failed: error executing command bazel-out/host/bin/external/tf/tensorflow/swig -c++ -python -module pywrap_tensorflow -lexternal/tf/tensorflow/python/client/device_lib.i -lexternal/tf/tensorflow/python/client/events_writer.i ... (remaining 194 argument(s) skipped): com.google.devtools.build.lib.shell.BadExitStatusException: Process exited with status 127.
bazel-out/host/bin/external/tf/tensorflow/swig: line 25: swig: command not found
INFO: Elapsed time: 16.168s, Critical Path: 15.41s
//syntaxnet:arc_standard_transitions_test NO STATUS
//syntaxnet:beam_reader_ops_test NO STATUS
//syntaxnet:graph_builder_test NO STATUS
//syntaxnet:lexicon_builder_test NO STATUS
//syntaxnet:parser_features_test NO STATUS
//syntaxnet:parser_trainer_test NO STATUS
//syntaxnet:reader_ops_test NO STATUS
//syntaxnet:sentence_features_test NO STATUS
//syntaxnet:shared_store_test NO STATUS
//syntaxnet:tagger_transitions_test NO STATUS
//syntaxnet:text_formats_test NO STATUS
//util/utf8:unicodetext_unittest NO STATUS

Executed 0 out of 12 tests: 12 were skipped.

Maybe the same issue, not sure, looks alike...
ERROR: /home/wangye/.cache/bazel/_bazel_root/e1838146ffd4619d95a48f03c6ab1d88/external/tf/google/protobuf/BUILD:505:1: Executing genrule @tf//google/protobuf:python_srcs_genrule failed: namespace-sandbox failed: error executing command /home/wangye/.cache/bazel/_bazel_root/e1838146ffd4619d95a48f03c6ab1d88/syntaxnet/_bin/namespace-sandbox ... (remaining 5 argument(s) skipped).
src/main/tools/namespace-sandbox.c:507: mount(opt->sandbox_root, opt->sandbox_root, NULL, MS_BIND | MS_NOSUID, NULL): Permission denied
INFO: Elapsed time: 14.859s, Critical Path: 0.63s
//syntaxnet:arc_standard_transitions_test NO STATUS
//syntaxnet:beam_reader_ops_test NO STATUS
//syntaxnet:graph_builder_test NO STATUS
//syntaxnet:lexicon_builder_test NO STATUS
//syntaxnet:parser_features_test NO STATUS
//syntaxnet:parser_trainer_test NO STATUS
//syntaxnet:reader_ops_test NO STATUS
//syntaxnet:sentence_features_test NO STATUS
//syntaxnet:shared_store_test NO STATUS
//syntaxnet:tagger_transitions_test NO STATUS
//syntaxnet:text_formats_test NO STATUS
//util/utf8:unicodetext_unittest NO STATUS

Executed 0 out of 12 tests: 12 were skipped.

Versions:
OS: Ubuntu 14.04.4
swig: 2.0.11
protobuf: 3.0.0b2
numpy: 1.8.2
python: 2.7.6
asciitree:
bazel: 0.2.2b


Latest Update:
I switched to Ubuntu 16.04, and installed python-dev, and it works just fine now.

I'm getting the same kind of error:
Versions:
OS: MacOS 10.11.2
swig: 3.0.8
protobuf: 3.0.0b2
numpy: 1.8.0rc1
python: 2.7.10
asciitree: 0.3.1
bazel: 0.2.3 (JDK 7)


/private/var/tmp/_bazel_username/42de5e1a8f3834bc4fa29ce7b23a99ae/external/tf/tensorflow/python/BUILD:972:1: SWIGing external/tf/tensorflow/python/tensorflow.i failed: swig failed: error executing command bazel-out/host/bin/external/tf/tensorflow/swig -c++ -python -module pywrap_tensorflow -lexternal/tf/tensorflow/python/client/device_lib.i -lexternal/tf/tensorflow/python/client/events_writer.i ... (remaining 197 argument(s) skipped): com.google.devtools.build.lib.shell.BadExitStatusException: Process exited with status 127.
bazel-out/host/bin/external/tf/tensorflow/swig: line 25: swig: command not found
INFO: Elapsed time: 449.442s, Critical Path: 201.15s
//syntaxnet:arc_standard_transitions_test NO STATUS
//syntaxnet:beam_reader_ops_test NO STATUS
//syntaxnet:graph_builder_test NO STATUS
//syntaxnet:lexicon_builder_test NO STATUS
//syntaxnet:parser_features_test NO STATUS
//syntaxnet:parser_trainer_test NO STATUS
//syntaxnet:reader_ops_test NO STATUS
//syntaxnet:sentence_features_test NO STATUS
//syntaxnet:shared_store_test NO STATUS
//syntaxnet:tagger_transitions_test NO STATUS
//syntaxnet:text_formats_test NO STATUS
//util/utf8:unicodetext_unittest NO STATUS

Executed 0 out of 12 tests: 12 were skipped.

I have solved the problem!! I updated ubuntu from 12.04 to 14.04. Opened a terminal and type "ldd --version". You must see something like that:

ldd (Ubuntu EGLIBC 2.19-0ubuntu6.9) 2.19

You need have a version > 2.15 and only it's possible in a ubuntu version > 12.04.

Moreover update your gcc version to 4.9.x or newer.

Regards!

HMMMMMMMMMMMMMMMMMMMMMMMMMMMM, thanks for report @MinionAttack, I'll try that in soon.

Hello,

The same kind of error on my installation:
Ubuntu 14.04
gcc 4.9

ERROR: /home/mladen/.cache/bazel/_bazel_root/fb66bc6a9788015ed6c59545dcfa45a5/external/farmhash_archive/BUILD:5:1: Executing genrule @farmhash_archive//:configure failed: namespace-sandbox failed: error executing command /home/mladen/.cache/bazel/_bazel_root/fb66bc6a9788015ed6c59545dcfa45a5/execroot/syntaxnet/_bin/namespace-sandbox ... (remaining 5 argument(s) skipped).
src/main/tools/namespace-sandbox.c:507: mount(opt->sandbox_root, opt->sandbox_root, NULL, MS_BIND | MS_NOSUID, NULL): Permission denied

when executing:
sudo bazel test syntaxnet/... util/utf8/...

Searching for the error message "gcc: internal compiler error: Killed program cc1plus" gives solutions to this, eg. https://bitcointalk.org/index.php?topic=304389.0
The compiler is out of memory and one solution is to add more swap space.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

kamal4493 picture kamal4493  路  3Comments

jacknlliu picture jacknlliu  路  3Comments

frankkloster picture frankkloster  路  3Comments

mbenami picture mbenami  路  3Comments

trungdn picture trungdn  路  3Comments