google / google/genc

The error no such package ‘google/protobuf’ occurs in bazel test genc/

Open
#323 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
65
Forks
9
PR merge metrics
No merged PRs in 30d

Description

I could not do bazel test for genc and got an error.

I did the following steps as https://github.com/google/genc/blob/master/SETUP.md

```
git clone https://github.com/google/genc
cd genc
docker build -t genc .
docker run -it -v $PWD:/genc genc:latest /bin/bash -c "cd genc; /bin/bash"
```
Inside the running docker container instance, at the root of the repo, run:

```
bazel test genc/...
```
The error is:
```
ERROR: /genc/genc/python/base/BUILD:72:11: no such package 'google/protobuf': BUILD file not found in any of the following directories. Add a BUILD file to a directory to mark it as a package.
- /genc/google/protobuf and referenced by '//genc/python/base:to_from_value_proto'
ERROR: Analysis of target '//genc/python/interop/langchain:create_computation' failed; build aborted:
INFO: Elapsed time: 109.630s
INFO: 0 processes.
ERROR: Couldn't start the build. Unable to run tests
FAILED: Build did NOT complete successfully (77 packages loaded, 52 targets configured)
currently loading: @rules_foreign_cc//toolchains ... (5 packages)
Fetching repository @go_sdk; starting
Fetching repository @rules_pkg; Cloning tags/0.10.1 of https://github.com/bazelbuild/rules_pkg.git
Fetching repository @rust_darwin_x86_64__wasm32-unknown-unknown__stable; starting
Fetching repository @rust_freebsd_x86_64__wasm32-wasi__stable; starting
Fetching repository @remotejdk17_macos_toolchain_config_repo; starting
Fetching repository @rust_freebsd_x86_64__wasm32-wasi__nightly; starting
Fetching repository @local_jdk; starting
Fetching repository @remotejdk17_linux_toolchain_config_repo; starting ... (38 fetches)
Protobuf, an external dependency library of genc, seems to be missing.
```

```/genc/google/protobuf``` directory is still not created after running the bazel test

But there is ```/root/.cache/bazel/_bazel_root/715d91338ce19255fccde512098e4d79/external/com_google_protobuf```

How can I make it work?

My environment is OS : Ubuntu 22.04.5 LTS Docker : 26.1.3

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.