models icon indicating copy to clipboard operation
models copied to clipboard

Missing dependency declaration issues when building Syntaxnet

Open kskp opened this issue 10 years ago • 6 comments

@calberti @andorardo

I am trying to run Syntaxnet on Centos 7 as Root in the /opt directory.

I have installed all the prerequisites (JDK 1.8, Bazel 0.2.2b, swig, ascitree, numpy, protobuf=3.0.0b2). After git cloning models directory (git clone --recursive --recurse-submodules https://github.com/tensorflow/models.git) and going into models/syntaxnet/tensorflow and doing the ./configre, I am running the tests using bazel test syntaxnet/... util/utf8/...

At this step, I get all kinds of missing dependency issues. For that, I looked at other issues and edited the tensorflow/third_party/gpus/crosstool/CROSSTOOL file. Now the ........./CROSTOOL file looks like this:

# TODO(bazel-team): In theory, the path here ought to exactly match the path
  # used by gcc. That works because bazel currently doesn't track files at
  # absolute locations and has no remote execution, yet. However, this will need
  # to be fixed, maybe with auto-detection?
  cxx_builtin_include_directory: "/usr/lib/gcc/"
  cxx_builtin_include_directory: "/usr/local/include"
  cxx_builtin_include_directory: "/usr/include"
  cxx_builtin_include_directory: "/usr/lib/gcc/x86_64-redhat-linux/4.8.5/include/"
  cxx_builtin_include_directory: "/usr/lib/gcc/x86_64-redhat-linux/4.8.5/finclude/"
  tool_path { name: "gcov" path: "/usr/bin/gcov" }

But I still get these dependency issues. Should I update the same paths anywhere else? I did not get any of these issues on Ubuntu 15 machine where I first experimented.

Thanks.

kskp avatar Sep 06 '16 14:09 kskp

Please provide the full output of the bazel test ... showing the failed dependencies, before your modifications to the CROSSTOOL file. In addition please provide the following version information:

If installed from binary pip package, provide:

1. A link to the pip package you installed:
2. The output from `python -c "import tensorflow; print(tensorflow.__version__)"`.

If installed from source, provide 

1. The commit hash (`git rev-parse HEAD`)
2. The output of `bazel version`

Also, this post looks related, although I'm not sure if it will help: http://hoolihan.net/blog-tim/2016/03/02/installing-tensorflow-on-centos/

tatatodd avatar Sep 07 '16 06:09 tatatodd

The entire output after bazel test is

[sree@newyorknn syntaxnet]$ bazel test syntaxnet/... util/utf8/...
..........
WARNING: Sandboxed execution is not supported on your system and thus hermeticity of actions cannot be guaranteed. See http://bazel.io/docs/bazel-user-manual.html#sandboxing for more information. You can turn off this warning via --ignore_unsupported_sandboxing.
INFO: Found 68 targets and 17 test targets...
ERROR: /home/sree/.cache/bazel/_bazel_sree/099a0ac170d26d787b0f9e5af193deee/external/protobuf/BUILD:574:1: undeclared inclusion(s) in rule '@protobuf//:internal/_api_implementation.so':
this rule is missing dependency declarations for the following files included by 'external/protobuf/python/google/protobuf/internal/api_implementation.cc':
  '/lib/gcc/x86_64-redhat-linux/4.8.5/include/limits.h'
  '/lib/gcc/x86_64-redhat-linux/4.8.5/include/syslimits.h'
  '/lib/gcc/x86_64-redhat-linux/4.8.5/include/stddef.h'
  '/lib/gcc/x86_64-redhat-linux/4.8.5/include/stdarg.h'
  '/lib/gcc/x86_64-redhat-linux/4.8.5/include/stdint.h'.
INFO: Elapsed time: 9.536s, Critical Path: 0.69s
//syntaxnet:arc_standard_transitions_test                             NO STATUS
//syntaxnet:beam_reader_ops_test                                      NO STATUS
//syntaxnet:binary_segment_state_test                                 NO STATUS
//syntaxnet:binary_segment_transitions_test                           NO STATUS
//syntaxnet:char_properties_test                                      NO STATUS
//syntaxnet:graph_builder_test                                        NO STATUS
//syntaxnet:lexicon_builder_test                                      NO STATUS
//syntaxnet:morphology_label_set_test                                 NO STATUS
//syntaxnet:parser_features_test                                      NO STATUS
//syntaxnet:parser_trainer_test                                       NO STATUS
//syntaxnet:reader_ops_test                                           NO STATUS
//syntaxnet:segmenter_utils_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 17 tests: 17 were skipped.

I installed from source. i did git clone --recursive https://github.com/tensorflow/models.git . Not sure what you mean by commit hash.

Output of bazel version is

Build label: 0.2.2b
Build target: bazel-out/local-fastbuild/bin/src/main/java/com/google/devtools/build/lib/bazel/BazelServer_deploy.jar
Build time: Mon Apr 25 08:08:53 2016 (1461571733)
Build timestamp: 1461571733
Build timestamp as int: 1461571733

kskp avatar Sep 07 '16 15:09 kskp

For the git commit hash, just run the following on the command line (from a directory in the models repository that you cloned), and paste the results here. This command queries your local git repository for the "version" of the source code that you cloned. Thanks!

git rev-parse HEAD

tatatodd avatar Sep 07 '16 17:09 tatatodd

[sree@newyorkdn3 syntaxnet]$ git rev-parse HEAD
fb41088f854abfdb3824adf9cd3d3569f9ebaabe

I dont know why the issues should even arise. I did exactly the same things (Centos 7 installation and syntaxnetnet installation) on all the 6 nodes of my cluster- Only difference being the node types. Everything seems perfect on the data nodes. Only the name node and secondary name node have these problems. Is it because of them being the "NAME NODE" and "SECONDARY NAME NODE"?

Thanks!

kskp avatar Sep 07 '16 17:09 kskp

Yeah, that sounds mysterious.

I haven't been able to reproduce (I don't have a Centos system handy), but the logs say the failure is coming from missing deps on standard C headers:

ERROR: /home/sree/.cache/bazel/_bazel_sree/099a0ac170d26d787b0f9e5af193deee/external/protobuf/BUILD:574:1: undeclared inclusion(s) in rule '@protobuf//:internal/_api_implementation.so':

A couple of things pop to mind:

  1. Is it possible that you're using the same networked fs across all your nodes, and building them all at the same time? I.e. is /home/sree/... a local directory, or is it accessible by all your nodes? If it's shared across all your nodes I'd suspect concurrent builds on the different nodes might stomp on each other's outputs.
  2. It says something about a bazel cache, so you might try this:
$ bazel clean --expunge
$ bazel test syntaxnet/... util/utf8/...

Here are some links that might be useful: https://www.bazel.io/versions/master/docs/bazel-user-manual.html#the-clean-command https://github.com/bazelbuild/bazel/issues/623

tatatodd avatar Sep 08 '16 00:09 tatatodd

Closing automatically due to lack of recent activity. Please reopen when further information becomes available. Thank you.

aselle avatar Oct 03 '16 18:10 aselle