Skip to content

etc: fix macOS dependency installer for googletest and pyqt#9867

Open
Divinesoumyadip wants to merge 2 commits intoThe-OpenROAD-Project:masterfrom
Divinesoumyadip:fix/macos-dependency-installer
Open

etc: fix macOS dependency installer for googletest and pyqt#9867
Divinesoumyadip wants to merge 2 commits intoThe-OpenROAD-Project:masterfrom
Divinesoumyadip:fix/macos-dependency-installer

Conversation

@Divinesoumyadip
Copy link
Contributor

@Divinesoumyadip Divinesoumyadip commented Mar 21, 2026

Fixes three bugs in the macOS dependency installer that caused build failures for new contributors on macOS.
googletest was missing from the Homebrew package list which caused CMake to fail with Could NOT find GTest during the build. Adding googletest to the brew install line fixes this directly. The pyqt5 formula name is also incorrect ,the valid Homebrew formula is pyqt and using the wrong name causes a silent failure during dependency installation leaving GUI support broken on macOS. Finally --break-system-packages has been added to the pip3 install click command which is required on macOS with Python 3.12+ where pip enforces system package protection by default and fails without this flag.
Related Issues: Addresses macOS build failures reported by contributors building locally on Apple Silicon.

Copy link
Contributor

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

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 fixes several issues with the macOS dependency installer, specifically adding the missing googletest package, correcting the pyqt package name, and adding the --break-system-packages flag for pip on newer Python versions. The changes are correct and address the reported build failures. I have added one suggestion to improve the readability of the Homebrew package list, which has become quite long.

log "Install darwin base packages using homebrew (-base or -all)"
_execute "Installing Homebrew packages..." brew install bison boost bzip2 cmake eigen flex fmt groff libomp or-tools pandoc pkg-config pyqt5 python spdlog tcl-tk zlib swig yaml-cpp
_execute "Installing Python click..." pip3 install click
_execute "Installing Homebrew packages..." brew install bison boost bzip2 cmake eigen flex fmt groff googletest libomp or-tools pandoc pkg-config pyqt python spdlog tcl-tk zlib swig yaml-cpp
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

For better readability and easier maintenance, consider breaking this long list of Homebrew packages into multiple lines and sorting them alphabetically. This makes it much easier to see which packages are being installed and to add or remove packages in the future.

    _execute "Installing Homebrew packages..." brew install \
        bison \
        boost \
        bzip2 \
        cmake \
        eigen \
        flex \
        fmt \
        googletest \
        groff \
        libomp \
        or-tools \
        pandoc \
        pkg-config \
        pyqt \
        python \
        spdlog \
        swig \
        tcl-tk \
        yaml-cpp \
        zlib

@github-actions
Copy link
Contributor

clang-tidy review says "All clean, LGTM! 👍"

1 similar comment
@github-actions
Copy link
Contributor

clang-tidy review says "All clean, LGTM! 👍"

tcl-tk \
yaml-cpp \
zlib
_execute "Installing Python click..." pip3 install click --break-system-packages
Copy link
Contributor

Choose a reason for hiding this comment

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

Not sure about --break-system-packages, seems risky. Any alternatives?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not sure about --break-system-packages, seems risky. Any alternatives?

Thanks for the feedback! You're right, --break-system-packages is a blunt approach. I can replace it with pipx install click instead , that's cleaner for Homebrew environments. Will update the PR.

@Divinesoumyadip Divinesoumyadip force-pushed the fix/macos-dependency-installer branch from 8be9489 to 5ee875c Compare March 21, 2026 12:45
@github-actions
Copy link
Contributor

clang-tidy review says "All clean, LGTM! 👍"

2 similar comments
@github-actions
Copy link
Contributor

clang-tidy review says "All clean, LGTM! 👍"

@github-actions
Copy link
Contributor

clang-tidy review says "All clean, LGTM! 👍"

@Divinesoumyadip
Copy link
Contributor Author

clang-tidy review says "All clean, LGTM! 👍"

Replaced pip3 install click --break-system-packages with pipx install click cleaner for Homebrew environments. Also added a macOS fallback for nproc using sysctl -n hw.logicalcpu.

@luarss Kindly check and give me review .

tcl-tk \
yaml-cpp \
zlib
_execute "Installing Python click..." pipx install click
Copy link
Contributor

Choose a reason for hiding this comment

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

whats pipx? does it come installed with system python?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

whats pipx? does it come installed with system python?

pipx is not always pre-installed. I can use pip3 install click inside a venv instead, or add brew install pipx before the pip call. Which do you prefer?

Copy link
Contributor

Choose a reason for hiding this comment

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

Not sure which one will have the same global python3-click effect. Can you investigate?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not sure which one will have the same global python3-click effect. Can you investigate?

I investigated so brew install click installs a Kubernetes CLI tool, not Python's click library. It's not available as a Homebrew formula. The cleanest global solution is brew install pipx && pipx install click also, pipx is available via Homebrew and installs click in an isolated but globally accessible environment. Want me to update with this?

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes please.

log "Install darwin base packages using homebrew (-base or -all)"
_execute "Installing Homebrew packages..." brew install bison boost bzip2 cmake eigen flex fmt groff libomp or-tools pandoc pkg-config pyqt5 python spdlog tcl-tk zlib swig yaml-cpp
_execute "Installing Python click..." pip3 install click
_execute "Installing Homebrew packages..." brew install \
Copy link
Contributor

@luarss luarss Mar 21, 2026

Choose a reason for hiding this comment

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

you can revert this. I think gemini's suggestion need not be followed for this line. Packages can be on a single line

CI="no"
SAVE_DEPS_PREFIXES=""
NUM_THREADS=$(nproc)
if [[ "$OSTYPE" == "darwin"* ]]; then
Copy link
Contributor

Choose a reason for hiding this comment

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

revert this as well please. Keep the PR clean, focused on one objective

Copy link
Contributor Author

Choose a reason for hiding this comment

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

revert this as well please. Keep the PR clean, focused on one objective

Reverted the multiline formatting and nproc changes . PR is now focused only on the googletest and pyqt fixes. Also updated click installation to use brew install pipx && pipx install click since python-click is not available as a Homebrew formula (brew install click installs a Kubernetes tool, not Python's click).

@Divinesoumyadip Divinesoumyadip force-pushed the fix/macos-dependency-installer branch from f564def to 5a31107 Compare March 21, 2026 13:51
@github-actions
Copy link
Contributor

clang-tidy review says "All clean, LGTM! 👍"

1 similar comment
@github-actions
Copy link
Contributor

clang-tidy review says "All clean, LGTM! 👍"

maze_route.run();
std::shared_ptr<SteinerTreeNode> tree = maze_route.getSteinerTree();
assert(tree != nullptr);
if (tree == nullptr) {
Copy link
Contributor

Choose a reason for hiding this comment

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

why is this diff here?

Signed-off-by: Divinesoumyadip <soumyacode7@gmail.com>
@Divinesoumyadip Divinesoumyadip force-pushed the fix/macos-dependency-installer branch from 68ad55f to d5c8a60 Compare March 21, 2026 15:19
@github-actions
Copy link
Contributor

clang-tidy review says "All clean, LGTM! 👍"

Signed-off-by: Divinesoumyadip <soumyacode7@gmail.com>
@github-actions
Copy link
Contributor

clang-tidy review says "All clean, LGTM! 👍"

@luarss luarss requested a review from maliberty March 21, 2026 15:44
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

Successfully merging this pull request may close these issues.

2 participants