Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix cvxopt build with suitesparse homebrew; fixes #37149. #37161

Merged
merged 1 commit into from
Feb 2, 2024

Conversation

drago-96
Copy link
Contributor

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

  • The title is concise, informative, and self-explanatory.
  • The description explains in detail what this PR is about.
  • I have linked a relevant issue or discussion.
  • I have created tests covering the changes.
  • I have updated the documentation accordingly.

⌛ Dependencies

@drago-96
Copy link
Contributor Author

Another option could be making cvxopt a pip package, if that doesn't break on some systems.

I tried that on mine (macOS ARM), and it works.

Copy link

Documentation preview for this PR (built with commit d19ba6f; changes) is ready! 🎉

@jhpalmieri
Copy link
Member

This looks okay to me, although I want to do a bit more testing. If you can figure out how to report it to the cvxopt people (the cvxopt Google group?), I encourage you to do so.

@jhpalmieri
Copy link
Member

Another option could be making cvxopt a pip package, if that doesn't break on some systems.

I tried that on mine (macOS ARM), and it works.

That could be done on another PR independently of this one.

@dimpase
Copy link
Member

dimpase commented Jan 30, 2024

Another option could be making cvxopt a pip package, if that doesn't break on some systems.

I tried that on mine (macOS ARM), and it works.

indeed, cvxopt is on PyPI already
https://pypi.org/project/cvxopt/
and there is a month-old binary install for arm64 macOS. So this should work.

You can install cvxopt into the Python you're using, and then
./configure --enable-system-site-packages should pick up cvxopt from the "system".

@jhpalmieri
Copy link
Member

Since this works, I think we should merge it at least as a stopgap. Switching to a pip-installable cvxopt sounds good, and maybe somehow upgrading SuiteSparse will also fix this problem, but both of those may take longer to implement. Once other solutions are in place, maybe we undo this.

@vbraun vbraun merged commit 9208e41 into sagemath:develop Feb 2, 2024
16 of 17 checks passed
@mkoeppe mkoeppe added this to the sage-10.3 milestone Mar 7, 2024
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.

None yet

5 participants