Closed vymao closed 6 months ago
If I run the actual command itself:
/private/var/tmp/_bazel_victor/1cabe6594cc48c856544c639052f58cd/sandbox/darwin-sandbox/32/execroot/morris/external/cmake-3.26.4-macos-universal/bin/cmake
-DOCOS_ONNXRUNTIME_PKG_URI=./onnxruntime-win-x64-1.16.0.zip -DOCOS_ONNXRUNTIME_VERSION=1.16.2
-DCMAKE_TOOLCHAIN_FILE=/private/var/tmp/_bazel_victor/1cabe6594cc48c856544c639052f58cd/sandbox/darwin-sandbox/32/execroot/morris/bazel-out/darwin-fastbuild/bin/external/onnx_runtime_extensions/onnx_extensions.build_tmpdir/crosstool_bazel.cmake
-DCMAKE_BUILD_TYPE=Release
-DCMAKE_INSTALL_PREFIX=/private/var/tmp/_bazel_victor/1cabe6594cc48c856544c639052f58cd/sandbox/darwin-sandbox/32/execroot/morris/bazel-out/darwin-fastbuild/bin/external/onnx_runtime_extensions/onnx_extensions '
-DCMAKE_PREFIX_PATH=/private/var/tmp/_bazel_victor/1cabe6594cc48c856544c639052f58cd/sandbox/darwin-sandbox/32/execroot/morris/bazel-out/darwin-fastbuild/bin/external/onnx_runtime_extensions/onnx_extensions.ext_build_deps;external/onnx_runtime/include;bazel-out/darwin-fastbuild/bin/external/onnx_runtime/include' -DCMAKE_RANLIB= -G 'Unix Makefiles' /private/var/tmp/_bazel_victor/1cabe6594cc48c856544c639052f58cd/sandbox/darwin-sandbox/32/execroot/morris/external/onnx_runtime_extensions
In a separate directory, this proceeds without issue.
See the documentation for tags
here: https://bazel.build/reference/be/common-definitions#common-attributes.
You need to set the requires-network
tag on your BUILD
rule as Bazel's sandbox by default doesn't allow network access.
I am trying to build the following repo. I added it to my WORKSPACE as follows:
with the following BUILD file:
However, I get the following error:
I'm not sure why this is. I've verified that
https://github.com/microsoft/onnxruntime/releases/download/v1.16.2/onnxruntime-osx-universal2-1.16.2.tgz
can be downloaded simply viawget
orcurl
, and I also built this repo outside of Bazel without any issue uising cmake version 3.27.7. The only issue I can point to is somehow through Bazel, and more specifically, the cmake rule here. This is a pain point because now I cannot build using Bazel here.Wondering if this is the root cause?