what-if-tool icon indicating copy to clipboard operation
what-if-tool copied to clipboard

Unable to build 'Error: Could not resolve import...'

Open kgizdov opened this issue 5 years ago • 5 comments

Cannot build version 1.7.0 with the following error:

ERROR: /build/python-tensorboard_plugin_wit/src/build-plugin/dc1744944b445923ba52f0a1ae122281/external/org_tensorflow_tensorboard/tensorboard/components/experimental/plugin_lib/BUILD:31:13: Bundling JavaScript ../org_tensorflow_tensorboard/tensorboard/components/experimental/plugin_lib/plugin_lib_polymer_interop_binary.es2015.js [rollup] failed (Exit 1): process-wrapper failed: error executing command
  (cd /build/python-tensorboard_plugin_wit/src/build-plugin/dc1744944b445923ba52f0a1ae122281/sandbox/processwrapper-sandbox/233/execroot/ai_google_pair_wit && \
  exec env - \
    TMPDIR=/tmp \
  /build/python-tensorboard_plugin_wit/src/build-plugin/install/4755db98940076dafaee47a6425c53cc/process-wrapper '--timeout=0' '--kill_delay=15' bazel-out/host/bin/external/build_bazel_rules_nodejs/internal/rollup/rollup --config bazel-out/k8-fastbuild/bin/external/org_tensorflow_tensorboard/tensorboard/components/experimental/plugin_lib/_plugin_lib_polymer_interop_binary.rollup.conf.js --output.file bazel-out/k8-fastbuild/bin/external/org_tensorflow_tensorboard/tensorboard/components/experimental/plugin_lib/plugin_lib_polymer_interop_binary.es2015.js --output.sourcemap --output.sourcemapFile bazel-out/k8-fastbuild/bin/external/org_tensorflow_tensorboard/tensorboard/components/experimental/plugin_lib/plugin_lib_polymer_interop_binary.es2015.js.map --silent) process-wrapper failed: error executing command
  (cd /build/python-tensorboard_plugin_wit/src/build-plugin/dc1744944b445923ba52f0a1ae122281/sandbox/processwrapper-sandbox/233/execroot/ai_google_pair_wit && \
  exec env - \
    TMPDIR=/tmp \
  /build/python-tensorboard_plugin_wit/src/build-plugin/install/4755db98940076dafaee47a6425c53cc/process-wrapper '--timeout=0' '--kill_delay=15' bazel-out/host/bin/external/build_bazel_rules_nodejs/internal/rollup/rollup --config bazel-out/k8-fastbuild/bin/external/org_tensorflow_tensorboard/tensorboard/components/experimental/plugin_lib/_plugin_lib_polymer_interop_binary.rollup.conf.js --output.file bazel-out/k8-fastbuild/bin/external/org_tensorflow_tensorboard/tensorboard/components/experimental/plugin_lib/plugin_lib_polymer_interop_binary.es2015.js --output.sourcemap --output.sourcemapFile bazel-out/k8-fastbuild/bin/external/org_tensorflow_tensorboard/tensorboard/components/experimental/plugin_lib/plugin_lib_polymer_interop_binary.es2015.js.map --silent)
[!] (commonjs plugin) Error: Could not resolve import 'ai_google_pair_wit/external/org_tensorflow_tensorboard/tensorboard/components/experimental/plugin_lib/polymer-interop' from 'undefined'
Error: Could not resolve import 'ai_google_pair_wit/external/org_tensorflow_tensorboard/tensorboard/components/experimental/plugin_lib/polymer-interop' from 'undefined'
    at Object.notResolved (/build/python-tensorboard_plugin_wit/src/build-plugin/dc1744944b445923ba52f0a1ae122281/execroot/ai_google_pair_wit/bazel-out/k8-fastbuild/bin/external/org_tensorflow_tensorboard/tensorboard/components/experimental/plugin_lib/_plugin_lib_polymer_interop_binary.rollup.conf.js:163:11)
    at /build/python-tensorboard_plugin_wit/src/build-plugin/dc1744944b445923ba52f0a1ae122281/sandbox/processwrapper-sandbox/233/execroot/ai_google_pair_wit/bazel-out/host/bin/external/build_bazel_rules_nodejs/internal/rollup/rollup.runfiles/build_bazel_rules_nodejs_rollup_deps/node_modules/rollup-plugin-commonjs/src/utils.js:20:68

Target //tensorboard_plugin_wit/pip_package:build_pip_package failed to build
ERROR: /build/python-tensorboard_plugin_wit/src/tensorboard_plugin_wit-1.7.0/tensorboard_plugin_wit/pip_package/BUILD:12:10 Bundling JavaScript ../org_tensorflow_tensorboard/tensorboard/components/experimental/plugin_lib/plugin_lib_polymer_interop_binary.es2015.js [rollup] failed (Exit 1): process-wrapper failed: error executing command
  (cd /build/python-tensorboard_plugin_wit/src/build-plugin/dc1744944b445923ba52f0a1ae122281/sandbox/processwrapper-sandbox/233/execroot/ai_google_pair_wit && \
  exec env - \
    TMPDIR=/tmp \
  /build/python-tensorboard_plugin_wit/src/build-plugin/install/4755db98940076dafaee47a6425c53cc/process-wrapper '--timeout=0' '--kill_delay=15' bazel-out/host/bin/external/build_bazel_rules_nodejs/internal/rollup/rollup --config bazel-out/k8-fastbuild/bin/external/org_tensorflow_tensorboard/tensorboard/components/experimental/plugin_lib/_plugin_lib_polymer_interop_binary.rollup.conf.js --output.file bazel-out/k8-fastbuild/bin/external/org_tensorflow_tensorboard/tensorboard/components/experimental/plugin_lib/plugin_lib_polymer_interop_binary.es2015.js --output.sourcemap --output.sourcemapFile bazel-out/k8-fastbuild/bin/external/org_tensorflow_tensorboard/tensorboard/components/experimental/plugin_lib/plugin_lib_polymer_interop_binary.es2015.js.map --silent) process-wrapper failed: error executing command
  (cd /build/python-tensorboard_plugin_wit/src/build-plugin/dc1744944b445923ba52f0a1ae122281/sandbox/processwrapper-sandbox/233/execroot/ai_google_pair_wit && \
  exec env - \
    TMPDIR=/tmp \
  /build/python-tensorboard_plugin_wit/src/build-plugin/install/4755db98940076dafaee47a6425c53cc/process-wrapper '--timeout=0' '--kill_delay=15' bazel-out/host/bin/external/build_bazel_rules_nodejs/internal/rollup/rollup --config bazel-out/k8-fastbuild/bin/external/org_tensorflow_tensorboard/tensorboard/components/experimental/plugin_lib/_plugin_lib_polymer_interop_binary.rollup.conf.js --output.file bazel-out/k8-fastbuild/bin/external/org_tensorflow_tensorboard/tensorboard/components/experimental/plugin_lib/plugin_lib_polymer_interop_binary.es2015.js --output.sourcemap --output.sourcemapFile bazel-out/k8-fastbuild/bin/external/org_tensorflow_tensorboard/tensorboard/components/experimental/plugin_lib/plugin_lib_polymer_interop_binary.es2015.js.map --silent)
INFO: Elapsed time: 115.468s, Critical Path: 14.71s
INFO: 879 processes: 653 internal, 217 processwrapper-sandbox, 9 worker.
FAILED: Build did NOT complete successfully
ERROR: Build failed. Not running target
FAILED: Build did NOT complete successfully

Environment is:

# OS: Arch Linux x86_64, GCC 10.2.0, Python 3.8.6
# Bazel: v3.7.0
# build commands:
srcdir="/build/python-tensorboard_plugin_wit/src"
cd "${srcdir}"
mkdir -p "${srcdir}/build-plugin" "${srcdir}/build-witwidget"
bazel --output_user_root "${srcdir}/build-plugin" run --verbose_failures --sandbox_debug tensorboard_plugin_wit/pip_package:build_pip_package
bazel --output_user_root "${srcdir}/build-witwidget" run --verbose_failures --sandbox_debug witwidget/pip_package:build_pip_package

kgizdov avatar Nov 18 '20 16:11 kgizdov

Thanks for the report. I realize I've been building with a much older version of bazel (0.27.0). Could you downgrade to that and try?

jameswex avatar Nov 20 '20 19:11 jameswex

Bazel 3.6.0 appears to be the most recent version that has worked for us. Bazel 3.7.0 (and 3.7.1rc3) fail with the log posted by @kgizdov.

foutrelis avatar Nov 21 '20 00:11 foutrelis

tensorboard 2.5.0 now requires Bazel 3.7.0+, and depends on tensorboard-plugin-wit. We really need to start supporting modern versions of Bazel.

adamjstewart avatar Jul 25 '21 23:07 adamjstewart

Just curious why you need to rebuild tensorboard-plugin-wit. Are you making changes to it? Thanks.

jameswex avatar Jul 26 '21 13:07 jameswex

No changes, but I'm updating our Spack build recipes for tensorboard and tensorboard-plugin-wit. Spack builds all software from source so we can get optimized binaries for supercomputers. We could theoretically install from wheels if we need to, but we would rather avoid it if possible.

adamjstewart avatar Jul 26 '21 14:07 adamjstewart