-
-
Notifications
You must be signed in to change notification settings - Fork 12.6k
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
Python CFLAGS are causing collisions when building native Python modules #68352
Comments
We can't support every possible combination of different software installed, sadly, especially old versions. And things installed in |
Thanks lead |
Hmm, I think that that makes sense to avoid sinking maintenance time into esoteric use cases. If you'd accept a patch from the community [i.e.: me], then I think I've got a solution: Done step by step:
This adds an additional brew-y patch to Python's behaviour, but hey, there's already a couple of those. |
@mitchhentges bruh, how cool you are. |
We have come across the same critical defect in homebrew's python configuration in SageMath - https://trac.sagemath.org/ticket/31132 |
@mitchhentges hard to comment on a suggestion without seeing the code... Why don't you open a PR implementing your suggestion? |
A simple solution would be to change the python3 homebrew recipe to set |
Looks like setting
This seems to be working well with the
I'm going to test with Python 3.7 and 3.8 as well, then I'll submit a patch. |
It is on purpose that we use There is workaround available with |
Sorry, but this makes homebrew's python fundamentally broken. No user package can reliably build with it because these |
Moreover, there is no mechanism for a user package to override it in any way. |
If you want it in CFLAGS, at least use |
There are 853,459 installs of this formula per month, and only two people apparently affected. So it certainly affects a very limited use case. One thing I would like to understand, however, is this: isn't |
Yes, this is automatically added when building Python itself, but this does not leak onto the |
Closes #67892. Signed-off-by: FX Coudert <fxcoudert@gmail.com>
Looks like for Python 3.8 you only introduced the bug in #67892, a few days ago. |
Good point: fortunately, for the case of ensuring that future python package installs find our libraries - that's why you have
My interpretation of that code is that Also note: this problem could not be reproduced with Python 3.7 (which makes sense) and it looks like #67892 would've regressed and allowed it to be reproduced with Python 3.8, as mentioned by mkoeppe. Thanks for continuing the investigation here. I'll submit a patch shortly :) |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. |
What's the status here? |
I need this |
You don't need it merged to use it in the formula. Here's the URL you can use: |
Right, but once it's merged, we'd need to change the URL again, right? |
No, that URL is stable. |
True, but the PR hasn't been reviewed/landed yet, so it might still change, in which case the patch link would be obsolete, right? |
Yes. However, it's also hard to say anything about the patch without running it through CI too. |
Bug report
brew update
and can still reproduce the problem?brew doctor
, fixed all issues and can still reproduce the problem?brew gist-logs <formula>
(where<formula>
is the name of the formula that failed) and included the output link?brew gist-logs
didn't work: ranbrew config
andbrew doctor
and included their output with your issue?What you were trying to do (and why)
I want to install an older version of the Python
zstandard
package on a machine that doesn't have azstandard
wheel available, and that may have thezstd
brew package already installed.What happened (include command output)
The compile fails, because it'll use some files from
brew
'szstd
package (located in/usr/local/include
) and some files from thepip
package. See the (prettified)clang
invocation:Note that moving the
-l/usr/local/include
line to after thecc_args
section allowed the build to complete successfully.Command output
What you expected to happen
I wanted
zstandard
to be compiled, then have it packaged and installed with the wrapping Python code.Step-by-step reproduction instructions (by running
brew install
commands)brew install python
, restart shellbrew install zstd
pip
to installcffi
sozstandard
reproduces the specific failure I'm reporting:pip install --user cffi
pip
to install and build a version ofzstandard
that is incompatible withzstd
inbrew
, e.g.:pip3 install 'zstandard==0.14.0' --no-binary :all: --user
The text was updated successfully, but these errors were encountered: