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

scipy: Fix build on macOS with Xcode CLT 15.0 #36523

Closed
wants to merge 1 commit into from

Conversation

mkoeppe
Copy link
Contributor

@mkoeppe mkoeppe commented Oct 23, 2023

📝 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

@github-actions
Copy link

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

@jhpalmieri
Copy link
Member

This works for me on three machines:

  • an Intel mac
  • an M2 mac laptop
  • an M1 mac (on which, for reasons I do not understand, scipy was building without any problems before this branch, even though it is running the latest OS, the latest version of CLT, fully updated homebrew, just like the laptop)

With the first two I had been forced to do ./configure --with-system-gfortran=no to build successfully, but with this branch I did not need to do that. I should double-check that everything still works with Sage's gfortran, but I don't see why it wouldn't. If that works, then I'll set to positive review.

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Oct 27, 2023

Thanks a lot for testing!

vbraun pushed a commit to vbraun/sage that referenced this pull request Oct 28, 2023
    
<!-- ^^^^^
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 sagemath#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 sagemath#12345". -->
- Fixes sagemath#36342
- using the fix discussed at
mesonbuild/meson#12282
<!-- If your change requires a documentation PR, please link it
appropriately. -->

### 📝 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.
- [ ] 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
- sagemath#12345: short description why this is a dependency
- sagemath#34567: ...
-->

<!-- If you're unsure about any of these, don't hesitate to ask. We're
here to help! -->
    
URL: sagemath#36523
Reported by: Matthias Köppe
Reviewer(s): John H. Palmieri
vbraun pushed a commit to vbraun/sage that referenced this pull request Oct 29, 2023
    
<!-- ^^^^^
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 sagemath#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 sagemath#12345". -->
- Fixes sagemath#36342
- using the fix discussed at
mesonbuild/meson#12282
<!-- If your change requires a documentation PR, please link it
appropriately. -->

### 📝 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.
- [ ] 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
- sagemath#12345: short description why this is a dependency
- sagemath#34567: ...
-->

<!-- If you're unsure about any of these, don't hesitate to ask. We're
here to help! -->
    
URL: sagemath#36523
Reported by: Matthias Köppe
Reviewer(s): John H. Palmieri
@vbraun
Copy link
Member

vbraun commented Oct 29, 2023

This breaks CLT 13, probably others too:

****************************************************
C compiler: gcc
C compiler version:
Apple clang version 13.1.6 (clang-1316.0.21.2.5)
Target: x86_64-apple-darwin21.4.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
****************************************************
Package 'scipy' is currently not installed
No legacy uninstaller found for 'scipy'; nothing to do
Installing scipy-1.11.3
Processing /Users/buildbot-sage/worker/sage_git/build/local/var/lib/sage/venv-python3.11.1/var/tmp/sage/build/scipy-1.11.3/src
  Preparing metadata (pyproject.toml): started
  Running command Preparing metadata (pyproject.toml)
  + meson setup /Users/buildbot-sage/worker/sage_git/build/local/var/lib/sage/venv-python3.11.1/var/tmp/sage/build/scipy-1.11.3/src /Users/buildbot-sage/worker/sage_git/build/local/var/lib/sage/venv-python3.11.1/var/tmp/sage/build/scipy-1.11.3/src/.mesonpy-dkvkbd9g -Dbuildtype=release -Db_ndebug=if-release -Db_vscrt=md --native-file=/Users/buildbot-sage/worker/sage_git/build/local/var/lib/sage/venv-python3.11.1/var/tmp/sage/build/scipy-1.11.3/src/.mesonpy-dkvkbd9g/meson-python-native-file.ini
  The Meson build system
  Version: 1.2.3
  Source dir: /Users/buildbot-sage/worker/sage_git/build/local/var/lib/sage/venv-python3.11.1/var/tmp/sage/build/scipy-1.11.3/src
  Build dir: /Users/buildbot-sage/worker/sage_git/build/local/var/lib/sage/venv-python3.11.1/var/tmp/sage/build/scipy-1.11.3/src/.mesonpy-dkvkbd9g
  Build type: native build
  Project name: SciPy
  Project version: 1.11.3
  ../meson.build:1:0: ERROR: Compiler gcc cannot compile programs.
  A full log can be found at /Users/buildbot-sage/worker/sage_git/build/local/var/lib/sage/venv-python3.11.1/var/tmp/sage/build/scipy-1.11.3/src/.mesonpy-dkvkbd9g/meson-logs/meson-log.txt
  error: subprocess-exited-with-error
  
  × Preparing metadata (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> See above for output.
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  full command: /Users/buildbot-sage/worker/sage_git/build/local/var/lib/sage/venv-python3.11.1/bin/python3 /Users/buildbot-sage/worker/sage_git/build/local/var/lib/sage/venv-python3.11.1/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py prepare_metadata_for_build_wheel /var/folders/06/0yb8f59j2ks8f0cph9fvkyp40000gp/T/tmpmagwwn48
  cwd: /Users/buildbot-sage/worker/sage_git/build/local/var/lib/sage/venv-python3.11.1/var/tmp/sage/build/scipy-1.11.3/src
  Preparing metadata (pyproject.toml): finished with status 'error'
error: metadata-generation-failed
× Encountered error while generating package metadata.
╰─> See above for output.
note: This is an issue with the package mentioned above, not pip.
hint: See above for details.
********************************************************************************

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Oct 29, 2023

Thanks for catching this

@jhpalmieri
Copy link
Member

Check the version of the command-line tools, as in #36337 (comment)?

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Oct 30, 2023

To put in src/bin/sage-env? Probably a good idea, let's try that; could you open a PR with this change please?

@jhpalmieri
Copy link
Member

To put in src/bin/sage-env? Probably a good idea, let's try that; could you open a PR with this change please?

Done in #36599.

@jhpalmieri
Copy link
Member

With the branch at #36599, scipy builds for me.

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Nov 4, 2023

Closing in favor of #36599

vbraun pushed a commit to vbraun/sage that referenced this pull request Nov 6, 2023
…s (OS X) and set LDFLAGS accordingly

    
Identify the version of command-line tools in use (OS X), and use the
version to set LDFLAGS.

<!-- ^^^^^
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 sagemath#1234" use "Introduce new method to
calculate 1+1"
-->
<!-- Describe your changes here in detail -->

In sage-env, save the version of command-line tools being used in
XCLT_VERSION. If it's too recent, we set LDFLAGS to solve some problems:
- Fixes sagemath#36337 (doctest failures)
- Fixes sagemath#36342 (scipy building,
replacing sagemath#36523).

<!-- 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 sagemath#12345". -->
<!-- If your change requires a documentation PR, please link it
appropriately. -->

### 📝 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
- sagemath#12345: short description why this is a dependency
- sagemath#34567: ...
-->

<!-- If you're unsure about any of these, don't hesitate to ask. We're
here to help! -->
    
URL: sagemath#36599
Reported by: John H. Palmieri
Reviewer(s): Matthias Köppe
vbraun pushed a commit to vbraun/sage that referenced this pull request Nov 7, 2023
…s (OS X) and set LDFLAGS accordingly

    
Identify the version of command-line tools in use (OS X), and use the
version to set LDFLAGS.

<!-- ^^^^^
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 sagemath#1234" use "Introduce new method to
calculate 1+1"
-->
<!-- Describe your changes here in detail -->

In sage-env, save the version of command-line tools being used in
XCLT_VERSION. If it's too recent, we set LDFLAGS to solve some problems:
- Fixes sagemath#36337 (doctest failures)
- Fixes sagemath#36342 (scipy building,
replacing sagemath#36523).

<!-- 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 sagemath#12345". -->
<!-- If your change requires a documentation PR, please link it
appropriately. -->

### 📝 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
- sagemath#12345: short description why this is a dependency
- sagemath#34567: ...
-->

<!-- If you're unsure about any of these, don't hesitate to ask. We're
here to help! -->
    
URL: sagemath#36599
Reported by: John H. Palmieri
Reviewer(s): Matthias Köppe
vbraun pushed a commit to vbraun/sage that referenced this pull request Nov 9, 2023
…s (OS X) and set LDFLAGS accordingly

    
Identify the version of command-line tools in use (OS X), and use the
version to set LDFLAGS.

<!-- ^^^^^
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 sagemath#1234" use "Introduce new method to
calculate 1+1"
-->
<!-- Describe your changes here in detail -->

In sage-env, save the version of command-line tools being used in
XCLT_VERSION. If it's too recent, we set LDFLAGS to solve some problems:
- Fixes sagemath#36337 (doctest failures)
- Fixes sagemath#36342 (scipy building,
replacing sagemath#36523).

<!-- 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 sagemath#12345". -->
<!-- If your change requires a documentation PR, please link it
appropriately. -->

### 📝 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
- sagemath#12345: short description why this is a dependency
- sagemath#34567: ...
-->

<!-- If you're unsure about any of these, don't hesitate to ask. We're
here to help! -->
    
URL: sagemath#36599
Reported by: John H. Palmieri
Reviewer(s): Matthias Köppe
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Build failures with Xcode CLT 15.0: scipy (via meson), ecm
3 participants