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

Building manylinux2014 wheels: use custom vcpkg port to get zlib 1.2.5 #57

Merged
merged 4 commits into from
Mar 18, 2022

Conversation

jorisvandenbossche
Copy link
Member

Further experiment on top of #55 to fix the zlib manylinux compatibility. Doing it here as a separate PR to experiment more freely and to keep it a bit focused.
First commit is a squash of current #55, second commit adds the zlib vcpkg port as is, third commit is then the changes I made to the port, and the fourth commit tries to use this inside the docker to vcpkg install gdal

@jorisvandenbossche
Copy link
Member Author

Amazingly, this seems to have worked from the first try .. :)

Copy link
Member

@brendan-ward brendan-ward left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for working this out, @jorisvandenbossche ! Great to see that this solved the wheel zlib issue!

I'm wondering what the maintenance lifecycle will be for the custom port of zlib here, and associated patch files. What parts are copy-pasted from the zlib port, and what parts of those did you have to change to get things to work here?

Should we be planning to regularly refresh our custom port based on the original zlib port? If so, we might want to jot down a few notes about how to do that for future reference.

@brendan-ward
Copy link
Member

Installed and tested wheels from build artifacts successfully in local Ubuntu 20.04 container.

The only other outstanding thing here is how we should deal with CURL_CA_BUNDLE.

I wonder if we can do something like this in core.py (untested):

import os
import sys
import warnings

if sys.platform=='linux' and not os.environ.get('CURL_CA_BUNDLE'):
    if os.path.exists('/etc/ssl/certs/ca-certificates.crt'):
        os.environ.setdefault('CURL_CA_BUNDLE', '/etc/ssl/certs/ca-certificates.crt')
    else:
        warnings.warn("the CURL_CA_BUNDLE environment variable must be set in order to read or write datasets over the network")

@jorisvandenbossche
Copy link
Member Author

jorisvandenbossche commented Mar 18, 2022

I'm wondering what the maintenance lifecycle will be for the custom port of zlib here, and associated patch files. What parts are copy-pasted from the zlib port, and what parts of those did you have to change to get things to work here?

I first added the port as is, and then in a the next commit are my own changes, so you can check the third commit (f71a568): it is basically removing some stuff (and I can remove some more, as the patch files are no longer needed).

I think this will not require a lot of maintenance, since it is for an old version of zlib that will no longer change. And unless cmake would change some syntax so that it no longer supports something in the portfile.cmake (or if one of the helper functions of vcpkg would change), this code should keep working as is.

Copy link
Member

@brendan-ward brendan-ward left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the extra info. I think this is ready to go!

@jorisvandenbossche jorisvandenbossche changed the title Building Linux wheels with vcpkg: test custom port to get zlib 1.2.5 Building manylinux2014 wheels: use custom vcpkg port to get zlib 1.2.5 Mar 18, 2022
@jorisvandenbossche jorisvandenbossche merged commit 4f81e0c into geopandas:main Mar 18, 2022
@jorisvandenbossche jorisvandenbossche deleted the custom-zlib branch March 18, 2022 16:35
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.

2 participants