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

Add boost.cobalt library #533

Open
hgad opened this issue Dec 24, 2023 · 0 comments
Open

Add boost.cobalt library #533

hgad opened this issue Dec 24, 2023 · 0 comments

Comments

@hgad
Copy link

hgad commented Dec 24, 2023

boost.cobalt was recently added to Boost 1.84.0. Even though rules_boost has updated the underlying boost dependency to 1.84.0, I still cannot depend on the boost.cobalt library.

I updated the http_archive rule to depend on the latest rules_boost commit:

http_archive(
    name = "com_github_nelhage_rules_boost",
    strip_prefix = "rules_boost-e72eb259976357f6e82f4d74d74a7c12d1c3776d",
    url = "https://github.com/nelhage/rules_boost/archive/e72eb259976357f6e82f4d74d74a7c12d1c3776d.tar.gz",
)

and updated my binary's rule to depend on @boost//:cobalt:

cc_binary(
    name = "main_bin",
    srcs = ["main.cpp"],
    features = ["fully_static_link"],
    visibility = ["//visibility:public"],
    deps = [
        "@boost//:cobalt",
        ...
    ],
)

but I get the following errors:

DEBUG: Rule 'com_github_nelhage_rules_boost' indicated that a canonical reproducible form can be obtained by modifying arguments sha256 = "1ef96e5c4c7c05024e60dc5927f7c1f39c692530d1a396f0968ce1715cd00df4"
DEBUG: Repository com_github_nelhage_rules_boost instantiated at:
  /workspaces/workspace/WORKSPACE.bazel:9:13: in <toplevel>
Repository rule http_archive defined at:
  /home/vscode/.cache/bazel/_bazel_vscode/6516b5a3aaa4066f3b18ab2a8c6133fe/external/bazel_tools/tools/build_defs/repo/http.bzl:372:31: in <toplevel>
ERROR: /workspaces/workspace/BUILD.bazel:5:10: no such target '@boost//:cobalt': target 'cobalt' not declared in package '' defined by /home/vscode/.cache/bazel/_bazel_vscode/6516b5a3aaa4066f3b18ab2a8c6133fe/external/boost/BUILD.bazel (Tip: use `query "@boost//:*"` to see all the targets in that package) and referenced by '//services/main:main_bin'
ERROR: Analysis of target '//services/main:main' failed; build aborted: 
INFO: Elapsed time: 15.822s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (203 packages loaded, 9766 targets configured)

Also, not sure what this "canonical reproducible form" means.

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

1 participant