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

Upgrade googlebenchmark from 1.7.0 to 1.7.1 #18435

Closed
BetsyMcPhail opened this issue Dec 12, 2022 · 3 comments · Fixed by #18457
Closed

Upgrade googlebenchmark from 1.7.0 to 1.7.1 #18435

BetsyMcPhail opened this issue Dec 12, 2022 · 3 comments · Fixed by #18457
Assignees
Labels
component: build system Bazel, CMake, dependencies, memory checkers, linters

Comments

@BetsyMcPhail
Copy link
Contributor

Follow-up to #18379.

When attempting to update googlebenchmark, I get the following error:

~/develop/drake$ bazel-bin/tools/workspace/new_release --upgrade=googlebenchmark
Collecting bazel repository details...
INFO: All external dependencies fetched successfully.
Loading: 0 packages loaded
Upgrading googlebenchmark from v1.7.0 to v1.7.1
Downloading new archive...
Populating repository cache ...
ERROR: /home/local/KHQ/betsy.mcphail/.cache/bazel/_bazel_betsy.mcphail/4e753aaa1a8cee0cff3391e1459b0a22/external/googlebenchmark/BUILD.bazel:29:11: no such package '@libpfm//': The repository '@libpfm' could not be resolved: Repository '@libpfm' is not defined and referenced by '@googlebenchmark//:benchmark'
ERROR: Evaluation of query "deps(//...)" failed: errors were encountered while computing transitive closure
Loading: 8 packages loaded
Traceback (most recent call last):
  File "/home/local/KHQ/betsy.mcphail/develop/drake/bazel-bin/tools/workspace/new_release.runfiles/drake/tools/workspace/new_release.py", line 352, in <module>
    main()
  File "/home/local/KHQ/betsy.mcphail/develop/drake/bazel-bin/tools/workspace/new_release.runfiles/drake/tools/workspace/new_release.py", line 344, in main
    _do_upgrade(temp_dir, gh, args.upgrade, metadata)
  File "/home/local/KHQ/betsy.mcphail/develop/drake/bazel-bin/tools/workspace/new_release.runfiles/drake/tools/workspace/new_release.py", line 279, in _do_upgrade
    subprocess.check_call(["bazel", "fetch", "//...", f"--distdir={temp_dir}"])
  File "/usr/lib/python3.8/subprocess.py", line 364, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['bazel', 'fetch', '//...', '--distdir=/tmp/drake_new_release_uc1dfdub']' returned non-zero exit status 2.

I found a related google/benchmark issue: google/benchmark#1510

@jwnimmer-tri
Copy link
Collaborator

On Ubuntu at least, we can add https://packages.ubuntu.com/focal/libpfm4-dev as a from_source dependency, and locate it via pkg-config in our workspace macros.

On macOS, we should probably just set perfcounters to zero per the google/benchmark#1510. We might still need a stub repository rule in that case.

@jwnimmer-tri jwnimmer-tri added the component: build system Bazel, CMake, dependencies, memory checkers, linters label Dec 12, 2022
@jwnimmer-tri jwnimmer-tri changed the title Upgrade googlebenchmark from 1.7.0 to 1.71 Upgrade googlebenchmark from 1.7.0 to 1.7.1 Dec 12, 2022
@rpoyner-tri
Copy link
Contributor

I've looked into this, and have a working branch. It appears that I can just add libpfm4 as a drake dependency, and don't need to do any mac-specific magic, because of the way the google benchmark build works.

Tactical question: should I add libpfm4 in a commit by itself, then update benchmark in a separate commit? I suspect that flows more nicely for release notes.

@rpoyner-tri
Copy link
Contributor

See PR #18447.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: build system Bazel, CMake, dependencies, memory checkers, linters
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants