Skip to content

no such package '@curl//' when installing through bazel #3367

@milton0825

Description

@milton0825

Describe your environment Describe any aspect of your environment relevant to the problem, including your platform, build system, version numbers of installed dependencies, etc. If you're reporting a problem with a specific version of a library in this repo, please check whether the problem has been fixed on main branch.

opentelemetry-cpp version: v1.16.1
MacOS: 15.3.2

I am installing opentelemetry-cpp as part of a project through bazel. I am seeing:

no such package '@curl//': The repository '@curl' could not be resolved: '@curl' is not a repository rule and 
referenced by '@io_opentelemetry_cpp//ext/src/http/client/curl:http_client_curl'

Steps to reproduce
Describe exactly how to reproduce the error. Include a code sample if applicable.

Following https://github.com/open-telemetry/opentelemetry-cpp/blob/main/INSTALL.md#incorporating-into-an-existing-bazel-project and added the following to my WORKSPACE:

http_archive(
    name = "io_opentelemetry_cpp",
    sha256 = "b8a78bb2a3a78133dbb08bcd04342f4b1e03cb4a19079b8416d408d905fffc37",
    strip_prefix = "opentelemetry-cpp-1.16.1",
    urls = [
        "https://github.com/open-telemetry/opentelemetry-cpp/archive/refs/tags/v1.16.1.tar.gz",
    ],
)

# Load OpenTelemetry dependencies after the archive is downloaded
load("@io_opentelemetry_cpp//bazel:repository.bzl", "opentelemetry_cpp_deps")
opentelemetry_cpp_deps()

Component level bazel file:

envoy_cc_library(
...
    deps = [
        "@io_opentelemetry_cpp//api",
        "@io_opentelemetry_cpp//exporters/ostream:ostream_span_exporter",
        "@io_opentelemetry_cpp//exporters/otlp:otlp_http_exporter",

What is the expected behavior?
What did you expect to see?

What is the actual behavior?
What did you see instead?

Additional context
Add any other context about the problem here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    StalebugSomething isn't workingtriage/acceptedIndicates an issue or PR is ready to be actively worked on.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions