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

MacOS wheel does not work on MacOS 10.15 #839

Open
jhominal opened this issue May 1, 2024 · 2 comments
Open

MacOS wheel does not work on MacOS 10.15 #839

jhominal opened this issue May 1, 2024 · 2 comments

Comments

@jhominal
Copy link
Contributor

jhominal commented May 1, 2024

What did you try to do?

I wanted to use pycurl on my old MacBook, for which the most recent version of MacOS is 10.15

What happened?

I ran the following commands:

python3.12 -mvenv venv-test-pycurl
. venv-test-pycurl/bin/activate
pip install pycurl
python3.12 -c 'import pycurl'

Which resulted in this error:

ImportError: pycurl: libcurl link-time version (7.64.1) is older than compile-time version (8.4.0)

What did you expect to happen?

I was expecting pip install pycurl to install a working version of pycurl (or at least fail installation cleanly).

What is the PycURL version?

pip freeze tells me that I installed pycurl==7.45.3 (using pycurl-7.45.3-cp312-cp312-macosx_10_9_x86_64.whl)

What is your Python version?

Python 3.12.3

What is your operating system and its version?

I am using MacOS 10.15.7.

Is this the most recent PycURL release?

Yes

Did you check libcurl behavior?

N/A

Notes

  1. I suspect that the cause of this issue is that, as cibuildwheel (in .github/workflows/ci-macos.yml) runs on MacOS 12, it simply picks up the libcurl that is present on that system, which is more recent than the version of libcurl that is present on MacOS 10.15.
  2. My first attempt at installing a re-compiled version of pycurl (pip install --no-binary=pycurl pycurl) failed - an import pycurl produced the following error: ImportError: pycurl: libcurl link-time ssl backends (secure-transport, openssl) do not include compile-time ssl backend (none/other). In order to fix that, I had to set export PYCURL_SSL_LIBRARY=sectransp before running the aforementioned pip install command. (I wonder if the fact that MacOS's curl-config --ssl-backends shows a nonsensical @SSL_BACKENDS@ as a result has something to do with that compilation issue.)

In order to fix the issue, I would propose the following actions:

  1. Mark the wheel produced by ci-macos.yml as being only compatible with MacOS 12 and up (as it depends on its version of libcurl being present);
  2. Have some bit of logic that will automatically set sectransp as the SSL library when using pip install to retrieve and compile the library from source on MacOS, in order to facilitate the library installation experience on older MacOS installations;
  3. Yank the previous binary wheel in order to prevent other people from installing it and having a non-functional install on old MacOS;
@swt2c
Copy link
Contributor

swt2c commented May 1, 2024

Yes, I suppose the other option is that we could build our own version of curl (+ dependencies) and bundle it with the wheel on macOS. I really kind of liked the idea of using the curl shipped by Apple, though, as it made the wheels super-small and Apple would supply the updates. Using the shipped curl is painful in other ways, as you can see (e.g., the broken curl-config they shipped).

@jhominal
Copy link
Contributor Author

I think that, as macOS < 12 do not receive security updates anymore, it would be fine for pycurl not to provide wheels for them - if the user is able to install from the source distribution with a minimum of fuss, I think that would be good enough. (That would certainly be good enough for me!)

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

No branches or pull requests

2 participants