在OS X上编译SyntaxNet失败,出现“错误加载包'@ jpeg //':未找到扩展文件”

时间:2017-01-19 15:33:48

标签: macos tensorflow bazel syntaxnet

我无法在MacBook Pro上编译SyntaxNet。

我在这里遵循了SyntaxNet安装步骤:https://github.com/tensorflow/models/tree/master/syntaxnet#installation

bazel test --linkopt=-headerpad_max_install_names syntaxnet/... util/utf8/...行因此输出失败:

Joachims-MacBook-Pro:syntaxnet joachim$ bazel test --linkopt=-headerpad_max_install_names syntaxnet/... util/utf8/... ERROR: /private/var/tmp/_bazel_joachim/2d6c6b79fd5d2f10f2fd8d8e3457de30/external/org_tensorflow/tensorflow/core/platform/default/build_config/BUILD:108:1: error loading package '@jpeg//': Extension file not found. Unable to load package for '//third_party:common.bzl': BUILD file not found on package path and referenced by '@org_tensorflow//tensorflow/core/platform/default/build_config:jpeg'. ERROR: Analysis of target '//syntaxnet:test_main' failed; build aborted. INFO: Elapsed time: 4.823s ERROR: Couldn't start the build. Unable to run tests.

以下是一些系统信息:

Joachims-MacBook-Pro:syntaxnet joachim$ bazel version Build label: 0.4.3-homebrew Build target: bazel-out/local-opt/bin/src/main/java/com/google/devtools/build/lib/bazel/BazelServer_deploy.jar Build time: Thu Dec 22 15:20:22 2016 (1482420022) Build timestamp: 1482420022 Build timestamp as int: 1482420022

Joachims-MacBook-Pro:syntaxnet joachim$ python --version Python 2.7.11

我把消息来源如下:

Joachims-MacBook-Pro:workspace joachim$ git clone --recurse-submodules https://github.com/tensorflow/models.git Cloning into 'models' ... 'aab099711d7e04034cf742ddb9b00dd15edbe99c'

1 个答案:

答案 0 :(得分:2)

在Ubuntu上编译时遇到了类似的问题。

找到文件tensorflow/third_party/jpeg/jpeg.BUILD

然后,更改代码load("@//third_party:common.bzl", "template_rule")

load("@org_tensorflow//third_party:common.bzl", "template_rule")