Search code examples
ubuntubuildtensorflowbazelsyntaxnet

Error while build SyntaxNet with Bazel


I am trying to run Syntaxnet on Ubuntu in my VirtualBox following instructions on SyntaxNet Github page

When i ran "bazel test syntaxnet/... util/utf8/...", all test targets were skipped. The error codes are as below.Error codes while building SyntaxNet


Solution

  • The problem you are seeing:

    gcc: internal compiler error: Killed (program cc1plus)
    

    ...is usually caused by GCC running out of memory. There are two main options for fixing this:

    1. Limit the number of parallel jobs using Bazel's --jobs flag.
    2. Limit the resources used with Bazel's --local_resources flag.

    The best configuration will depend on your particular machine, but something like the following has been known to work in the past (for building TensorFlow):

    bazel test syntaxnet/... util/utf8/... --local_resources 2048,2.0,1.0 --jobs 1