Skip to content

Instantly share code, notes, and snippets.

@bmzhao
Created November 25, 2019 23:11
Show Gist options
  • Save bmzhao/311efdfd4306dca02af21b4110ae14bd to your computer and use it in GitHub Desktop.
Save bmzhao/311efdfd4306dca02af21b4110ae14bd to your computer and use it in GitHub Desktop.
Bazel cc_shared_library error
➜ /tmp git clone https://github.com/bmzhao/experimental.git
Cloning into 'experimental'...
remote: Enumerating objects: 6, done.
remote: Counting objects: 100% (6/6), done.
remote: Compressing objects: 100% (4/4), done.
Receiving objects: 100% (6/6), 767 bytes | 767.00 KiB/s, done.
remote: Total 6 (delta 0), reused 6 (delta 0), pack-reused 0
➜ /tmp cd experimental
➜ experimental git:(master) bazel version
Starting local Bazel server and connecting to it...
Build label: 1.2.0
Build target: bazel-out/k8-opt/bin/src/main/java/com/google/devtools/build/lib/bazel/BazelServer_deploy.jar
Build time: Wed Nov 20 15:04:55 2019 (1574262295)
Build timestamp: 1574262295
Build timestamp as int: 1574262295
➜ experimental git:(master) bazel build --experimental_cc_shared_library :a_so
ERROR: While resolving toolchains for target //:a_so: com.google.devtools.build.lib.packages.BuildFileNotFoundException: no such package 'cc': BUILD file not found in any of the following directories. Add a BUILD file to a directory to mark it as a package.
- /tmp/experimental/cc
ERROR: Analysis of target '//:a_so' failed; build aborted: com.google.devtools.build.lib.packages.BuildFileNotFoundException: no such package 'cc': BUILD file not found in any of the following directories. Add a BUILD file to a directory to mark it as a package.
- /tmp/experimental/cc
INFO: Elapsed time: 1.010s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (1 packages loaded, 0 targets configured)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment