-
-
Notifications
You must be signed in to change notification settings - Fork 491
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
homebrew: Unused packages (singular, pari, ...) in /usr/local leak into build when using homebrew's python3 #31132
Comments
comment:1
I discovered another annoying leak while testing. I have octave installed via homebrew and one of its dependencies is qhull. With qhull installed via homebrew if I build sage and run
then it crashes with
I was able to track the problem down to matplotlib. If I do: make matplotlib-clean brew unlink qhull make matplotlib brew link qhull then the tests pass without any issues. |
comment:2
I think I'll open an issue with matplotlib since it's not really a sage problem. |
comment:3
I created #31148 to use system qhull when building matplotlib if it is present. This should fix these issues. |
comment:4
In #31180, @NathanDunfield pointed out that if we use
|
comment:5
Happening in |
comment:6
By setting environment variables, one cannot override these flags, only append. |
comment:7
I think this is really a packaging bug in homebrew's python3. |
comment:8
I agree that this is a packaging bug in homebrew. I checked four other Python 3 .* packages (Ubuntu 20.04, CentOS 7, Python.org's macOS installer, Conda) and none of them have |
comment:9
homebrew issue: Homebrew/homebrew-core#68352 |
Upstream: Reported upstream. No feedback yet. |
Commit: |
Author: Matthias Koeppe |
comment:13
Let's see what the homebrew maintainers do with this. For now the best thing we can do is detect the issue and print a warning (or we could reject the homebrew python with this issue entirely.) New commits:
|
This comment has been minimized.
This comment has been minimized.
comment:16
This warning is buried in |
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:18
Here's a different approach. Now actually rejecting the broken homebrew python3. For any package, to see the reasons why a system package is rejected, one needs to scroll up in the configure output (or look into config.log) |
This comment has been minimized.
This comment has been minimized.
comment:20
Looks okay to me. It took one machine about 30 seconds longer to build Sage when it had to build its own Python (just one iteration, so not very scientific), so avoiding homebrew's Python for now is not placing a huge burden on developers. |
comment:21
On my machine (I'm still running Catalina), it accepts |
comment:22
Let's get this in please |
comment:23
looks good to me on Mac. Big Sur also has /usr/bin/python3 which gets picked up and accepted. |
comment:53
Replying to @zlscherr:
That's right, this mechanism deactivates the old code in |
comment:54
Thanks! |
comment:55
The Homebrew python maintainers are still struggling to fix up their python builds. I have added some links to the ticket description to track these efforts. |
This comment has been minimized.
This comment has been minimized.
comment:56
Replying to @mkoeppe:
See also #30725. |
Changed commit from |
comment:58
A fix has just been merged into homebrew master Homebrew/homebrew-core@784d292 |
comment:59
And indeed the upgrade of |
comment:60
|
comment:61
very bizarre. I had to do: brew reinstall python@3.9 --build-from-source and that fixed it for me. Maybe the bottle hasn't been updated yet? |
comment:62
Although I'm not sure if I needed the --build-from-source. Maybe just try brew reinstall first? |
comment:63
I tried |
comment:64
I mentioned this on the thread and it’s because they forgot to bump the version number I guess from 7 to 8. The next time it upgrades everything should be good without needing to reinstall. |
comment:65
Has anyone else tried building sage with the newest homebrew python? Configure now accepts it, but I still have issues with /usr/local leaking into the builds. Not sure why that happens now that python3-config no longer remembers /usr/local. |
comment:66
Although I should add that cypari build fine even with homebrew's pari was installed. The problem was that singular and pari were leaking into building sagelib, and then ecl leaked into building the manifolds documentation. |
comment:67
Follow up in #31335. |
comment:68
Replying to @jhpalmieri:
This worked on one machine (Big Sur) but not another (Catalina). I deleted the cached download and it still didn't work, and neither did |
comment:69
I think I had to do |
comment:70
Doing |
comment:71
This is now rejecting the system python on Gentoo, I guess because of the
That is added to our python build for obsolete reasons (there is no Gentoo/FreeBSD anymore):
Can someone briefly summarize the problem that this |
comment:73
Replying to @orlitzky:
When building a C/C++ extension module for Python in the standard way (distutils/setuptools), compiler and linker flags are pulled from |
comment:74
Great, thanks. Fix is in progress. |
comment:75
Exception for |
comment:76
Can't this be fixed by stripping |
comment:77
|
comment:78
Let's discuss this in #31539 |
As previously discussed in #30745,
/usr/local
is leaking into our build, through wrong orders of include and/or library directives.In #30745, this problem was not fixed but rather some more packages were found to be usable on homebrew, so distro information was added.
The problem has been reported again with
pari
(buildingcypari2
) in #31029/#30589.This is caused by a misconfigured
python3
. In this ticket, we add code to detect this problem when looking for the system python at configure time.When
--with-python=...
is used, only a warning is issued.See also:
Related homebrew issues and pull requests:
Depends on #30589
Upstream: Reported upstream. No feedback yet.
CC: @orlitzky @jhpalmieri @zlscherr @kiwifb @NathanDunfield @kliem
Component: build
Author: Matthias Koeppe
Branch:
76d5fd1
Reviewer: Zachary Scherr
Issue created by migration from https://trac.sagemath.org/ticket/31132
The text was updated successfully, but these errors were encountered: