Skip to content

Commit 9208e41

Browse files
author
Release Manager
committed
gh-37161: Fix cvxopt build with suitesparse homebrew; fixes #37149. <!-- ^^^^^ Please provide a concise, informative and self-explanatory title. Don't put issue numbers in there, do this in the PR body below. For example, instead of "Fixes #1234" use "Introduce new method to calculate 1+1" --> <!-- Describe your changes here in detail --> <!-- Why is this change required? What problem does it solve? --> <!-- If this PR resolves an open issue, please link to it here. For example "Fixes #12345". --> <!-- If your change requires a documentation PR, please link it appropriately. --> This PR tries to fix issue #37149. The problem is that cvxopt doesn't build correctly when using the homebrew-provided version of SuiteSparse. As suggested in the discussion of the issue, I added the `CVXOPT_SUITESPARSE_INC_DIR` environment variable in the `.homebrew- build-env` file. This is an ugly workaround, and should probably be reported/discussed also on the cvxopt repo, since the issue seems to be that they do `#include "umfpack.h"` instead of a more proper `#include "suitesparse/umfpack.h"`. Indeed, for Linux system, their `setup.py` script then has to set the include folder to be `whatever/include/suitesparse` instead of the default system one. Also, I don't have a way to check if this breaks other installations. ### 📝 Checklist <!-- Put an `x` in all the boxes that apply. --> <!-- If your change requires a documentation PR, please link it appropriately --> <!-- If you're unsure about any of these, don't hesitate to ask. We're here to help! --> <!-- Feel free to remove irrelevant items. --> - [x] The title is concise, informative, and self-explanatory. - [x] The description explains in detail what this PR is about. - [x] I have linked a relevant issue or discussion. - [ ] I have created tests covering the changes. - [ ] I have updated the documentation accordingly. ### ⌛ Dependencies <!-- List all open PRs that this PR logically depends on - #12345: short description why this is a dependency - #34567: ... --> <!-- If you're unsure about any of these, don't hesitate to ask. We're here to help! --> URL: #37161 Reported by: Riccardo Zanotto Reviewer(s): John H. Palmieri
2 parents 02fbbdd + d19ba6f commit 9208e41

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

.homebrew-build-env

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,3 +45,9 @@ for l in ; do
4545
fi
4646
done
4747
export ACLOCAL_PATH
48+
49+
# Add cvxopt library path
50+
if [ -d "$HOMEBREW/include/suitesparse" ]; then
51+
export CVXOPT_SUITESPARSE_INC_DIR="$HOMEBREW/include/suitesparse"
52+
export CVXOPT_SUITESPARSE_LIB_DIR="$HOMEBREW/lib"
53+
fi

0 commit comments

Comments
 (0)