Fail to build protobuf

139 views
Skip to first unread message

Rick Genter

unread,
Mar 4, 2024, 10:47:25 AMMar 4
to Protocol Buffers
I'm following the directions at https://github.com/protocolbuffers/protobuf/blob/main/src/README.md to try to build protobuf 25.3.

I have bazel 7.0.2 installed.

I downloaded protobuf-25.3.tar.gz, then gunzip'd and untar'd it.
I then cd'd to protobuf-25.3 and did

$ bazel build :protoc

That worked.

I then tried

$ bazel build :protobuf

and get

ERROR: no such package '@@com_google_protobuf//': The repository '@@com_google_protobuf' could not be resolved: Repository '@@com_google_protobuf' is not defined

How do I fix this?

Tricia Decker

unread,
Mar 4, 2024, 11:43:24 PMMar 4
to Protocol Buffers
Hi Rick,

There's an open issue for the same https://github.com/protocolbuffers/protobuf/issues/15615 in case you haven't seen it.

Tricia

Rick Genter

unread,
Mar 5, 2024, 8:39:28 AMMar 5
to Tricia Decker, Protocol Buffers
Thank you, Tricia. As a workaround I added the following to bottom of the WORKSPACE file at the root of the protobuf-25.3 directory:

local_repository(name = "com_google_protobuf", path = ".")

Everything then built fine and seems to be functional.

--
You received this message because you are subscribed to the Google Groups "Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to protobuf+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/protobuf/2cdb9d4f-2f4e-438b-a128-561328a33506n%40googlegroups.com.


--
Reply all
Reply to author
Forward
0 new messages