bazel - How to set //external:android/sdk when it is not bound to anything -


while trying build git repo uses bazel got error //external:android/sdk not bound , cannot find configuration found can fix it.

i have loaded new ubuntu 14.04 , i'm trying build github.com/google/shipshape source. have followed instructions given here install need build it.

basically installed golang, openjdk-8-jdk, openjdk-8-source, bazel , ran following:

mkdir -p github.com/google && cd github.com/google git clone https://github.com/google/shipshape.git cd shipshape ./configure        # run initial shipshape+bazel setup bazel build //...  # build shipshape source 

but when come building bazel build //... error:

____loading package: shipshape ____loading package: shipshape/util/rpc/client ____loading package: shipshape/analyzers/codealert ____loading package: shipshape/contrib/phabricator ____loading package: shipshape/javatests/com/google/shipshape/analyzers ____loading package: third_party/kythe/java/com/google/devtools/kythe/platform/shared ____loading package: third_party/go-glog ____loading package: third_party/guava ____loading package: third_party/gson ____loading package: shipshape/test/dind/docker ____loading package: third_party/bazel/tools/jdk ____loading package: tools/test ____loading... ____loading package: @bazel_tools//tools/cpp ____loading package: @local-jdk// ____loading package: @bazel_tools//tools/genrule ____loading package: @bazel_tools//tools/test ____loading package: @bazel_tools//third_party/java/jdk/langtools ____loading complete.  analyzing... error: /default.workspace:75:1: in bind rule //external:android/sdk: external label '//external:android/sdk' not bound anything. error: analysis of target '//tools/defaults:android_jar' failed; build aborted. ____elapsed time: 3.086s 

a google search gave me this link states

which doesn't tell @ need update information in workspace point android sdk. nice have friendlier error message.

i interpret there binding somewhere should update, existing line of code needs updated.

but workspace in folder in supposed execute build in empty, there should file has bind edit.

i found folder /home/alex/.bazel/base_workspace did not find workspace seem correct 1 edit.

i found these grep: ~/.cache/bazel/_bazel_root/hash/readme ~/.cache/bazel/_bazel_root/hash/external/local-jdk/workspace seeing in cache thats wrong.

so either default.workspace somewhere else , need bind thing there find android sdk, or defaul.workspace empty workspace inside shipshape folder filled during bazel build runtime , removed afterwards.

but in either case @ loss how should bind //external:android/sdk anything.

at moment, building //... doesn't work great because includes bazel might need build language or platform. (this has been fixed @ head, not yet in release). i'd recommend running bazel build //shipshape/... now.

(and if building android targets, want setup workspace file described here, you're not, don't bother.)


Comments

Popular posts from this blog

php - Wordpress website dashboard page or post editor content is not showing but front end data is showing properly -

How to get the ip address of VM and use it to configure SSH connection dynamically in Ansible -

javascript - Get parameter of GET request -