Skip to content

fix: bazel manpage compilation#10729

Merged
eder-matheus merged 2 commits into
The-OpenROAD-Project:masterfrom
luarss:fix-bazel-manpage
Jun 26, 2026
Merged

fix: bazel manpage compilation#10729
eder-matheus merged 2 commits into
The-OpenROAD-Project:masterfrom
luarss:fix-bazel-manpage

Conversation

@luarss

@luarss luarss commented Jun 21, 2026

Copy link
Copy Markdown
Contributor

Summary

  • src/OpenRoad.cc: Check BUILD_WORKSPACE_DIRECTORY in getDocsPath() for bazel run case
    (ifdef BAZEL_BUILD).
  • packaging/BUILD.bazel: Add //docs:man_pages to install data deps.
  • bazel/install.sh: Copy cat/ and html/ to $DEST_DIR/share/openroad/man/.

Type of Change

  • Bug fix

Impact

[How does this change the tool's behavior?]

Verification

  • I have verified that the local build succeeds (./etc/Build.sh).
  • I have run the relevant tests and they pass.
  • My code follows the repository's formatting guidelines.
  • I have included tests to prevent regressions.
  • I have signed my commits (DCO).

Related Issues

fixes #10640

Signed-off-by: Jack Luar <39641663+luarss@users.noreply.github.com>
@luarss luarss requested a review from a team as a code owner June 21, 2026 12:15
@luarss luarss requested a review from eder-matheus June 21, 2026 12:15

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request adds support for installing and locating generated man pages in Bazel builds. Specifically, it updates bazel/install.sh and packaging/BUILD.bazel to copy man pages to the installation directory, and modifies src/OpenRoad.cc to look for them in bazel-bin/docs when running via Bazel. The review feedback suggests dereferencing symlinks using cp -rfL and cleaning up stale directories during installation, as well as using the non-throwing overload of std::filesystem::is_directory to prevent potential exceptions.

Comment thread bazel/install.sh
Comment thread src/OpenRoad.cc
Comment on lines +739 to +741
if (std::filesystem::is_directory(docs_path)) {
return docs_path;
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

std::filesystem::is_directory can throw a std::filesystem::filesystem_error exception if the path is inaccessible, contains a loop of symlinks, or encounters other OS-level errors. To ensure robust error handling and prevent potential crashes, use the non-throwing overload that accepts an std::error_code parameter.

    std::error_code ec;
    if (std::filesystem::is_directory(docs_path, ec)) {
      return docs_path;
    }

Signed-off-by: Jack Luar <39641663+luarss@users.noreply.github.com>
@eder-matheus eder-matheus enabled auto-merge June 26, 2026 14:59
@eder-matheus eder-matheus merged commit ec01439 into The-OpenROAD-Project:master Jun 26, 2026
16 checks passed
@luarss luarss deleted the fix-bazel-manpage branch June 26, 2026 15:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

man: bazel build not working

2 participants