Skip to content

[Bug] CBC solver installation via Homebrew slow on Intel macOS #484

@utsinboots

Description

@utsinboots

Summary

On all Intel macOS except Intel macOS Sonoma, the Step 5 of 5: Platform setup of scripts/setup_dev.py (solver installation) takes a very long time to load and starts compiling cmake + CBC from source.

Root cause: setup_dev.py uses brew install cbc, where Homebrew only has a prebuilt bottle for CBC on: Apple Silicon: Tahoe/Sequioa/Sonoma and Intel: Sonoma https://formulae.brew.sh/formula/cbc

The fix I found:
Replace brew install cbc with pip install cbcbox (prebuilt binary wheel, no compilation required, works on all macOS versions).
cbcbox ships the cbc binary inside the package and exposes its path via cbcbox.cbc_bin_path(). Since the binary lands inside the venv (at .venv/lib/pythonX.Y/site-packages/cbcbox/cbc_dist/bin/cbc) and not on system PATH or standard Homebrew paths (/opt/homebrew/bin, /usr/local/bin), setup_dev.py would write SOLVER_CBC_PATH to .env after install, the same mechanism already used for MUIOGO_SECRET_KEY and Windows CBC.

CBC -> change the macOS section of setup_dev.py to use pip install cbc
GLPK -> will keep using brew install glpk (prebuilt bottles available, fast and reliable, no change needed)
Windows -> unaffected (uses manual zip download already)

What did you expect? (optional)

No response

How can we reproduce it?

Run the MUIOGO macOS installer on all Intel macOS version except Intel macOS Sonoma

Environment (optional)

No response

Logs or screenshots (optional)

No response

Related issue, PR, or discussion (optional)

Related to #482 cc @SeaCelo @autibet

Proposed track

None

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No fields configured for Bug.

Projects

Status
To-Do

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions