Fix Apple Silicon install: update build deps, guard volesti intrinsics, fix setup.py flags#125
Closed
Mohit-Lakra wants to merge 0 commit intoGeomScale:developfrom
Closed
Fix Apple Silicon install: update build deps, guard volesti intrinsics, fix setup.py flags#125Mohit-Lakra wants to merge 0 commit intoGeomScale:developfrom
Mohit-Lakra wants to merge 0 commit intoGeomScale:developfrom
Conversation
Author
|
@vissarion, @TolisChal |
Author
|
Note for Reviewers: I have verified this builds successfully on macOS (M2) locally. This PR currently focuses on the Python build system (setup.py, poetry). To fully compile the C++ extensions on macOS, a few patches are needed in the volesti submodule (guarding intrinsics for ARM64). I can submit those C++ fixes as a separate upstream PR to volesti and update the submodule here once merged. Let me know if you prefer that workflow! |
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Fixes #124
This PR removes the blockers I described above:
3.11. The lockfile is updated so sparseqr points to commit 535df76 (v1.4.1), which builds on arm64.
macros, and the .template qualifiers in volesti/include/sampling/mmcs.hpp and parallel_mmcs.hpp are removed so clang
accepts the code.
legal flags.
To reproduce the working setup on macOS 14.6 (M2), you need Homebrew’s GLPK/GMP/SWIG for swiglpk. Then:
one-time: install native deps
brew install glpk gmp swig
use Python 3.11 for the Poetry environment and point swiglpk at Homebrew’s include/lib
env -u CONDA_PREFIX -u CONDA_DEFAULT_ENV -u CONDA_SHLVL -u CONDA_PROMPT_MODIFIER
-u CONDA_EXE -u _CONDA_EXE -u _CONDA_ROOT -u CONDA_PYTHON_EXE -u _CE_CONDA -u _CE_M
GLPK_HEADER_PATH=/opt/homebrew/include
LDFLAGS="-L/opt/homebrew/lib"
CPPFLAGS="-I/opt/homebrew/include"
PATH="$HOME/.local/bin:$PATH"
poetry env use $(which python3.11)
env …same… poetry install
env …same… poetry run python tests/fba.py
Those commands now complete successfully. I also ran the other test scripts in tests/ (full_dimensional.py,
max_ball.py, scaling.py, rounding.py, sampling.py) under the same environment and they pass.