Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to use local Protobuf #21

Closed
ShabnamSheikhha opened this issue Apr 1, 2024 · 1 comment
Closed

How to use local Protobuf #21

ShabnamSheikhha opened this issue Apr 1, 2024 · 1 comment

Comments

@ShabnamSheikhha
Copy link

Hello,

I am trying to use Fleetbench with my own local Protobuf repo (i.e., build from source). My understanding is that currently Protobuf is loaded from online using Bazel's http_archive. Is it possible to change the Bazel build files to use a local Protobuf version? Is this supported?

@rjogrady
Copy link
Contributor

rjogrady commented Apr 1, 2024

Hi,
There are a couple of ways to do this.

  1. Use bazel's --override_repository command line flag:

bazel build --override_repository=com_google_protobuf=/path/to/protobuf fleetbench/proto/...

  1. Modify the WORKSPACE to use a local_repository rule for protobuf. Replace the http_archive rule for com_google_protobuf with
local_repository(
    name = "com_google_protobuf",
    path = "/path/to/protobuf"
 )

Note that we have only tested that version 24.4 builds and runs, though I assume more recent versions should work.

@rjogrady rjogrady closed this as completed Apr 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants