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

Fix macOS binary compatibility by adding the MACOSX_DEPLOYMENT_TARGET environment variable #3786

Merged

Conversation

agriyakhetarpal
Copy link
Contributor

Description

This is a fix for an earlier issue I had opened, which is #3698 – the issue description goes into detail about why this environment variable is needed, but the TLDR is that the CasADi binaries for macOS on PyPI are slightly broken in terms of compatibility since they won't work on macOS 11.0. 11.1 is needed because this target was not set, and pip can't install binaries with that deployment target yet (pypa/packaging#578). This isn't fully required, and it isn't a critical issue either – since 11.0 is an old macOS version that the majority of people aren't using, but it is valid in the sense that this bears collision with the Python packaging world.

I am not sure if these additions are going to work for the release binaries or whether I have added this in the right location (please let me know where it would be best to add!), however, since I don't know where the CasADi releases are built and then pushed to PyPI from, it would be nice to test this. It is to be noted that tools such as cibuildwheel set this environment variable automatically for Python wheels to achieve maximum compatibility, but integrating that in CasADi's release infrastructure is a larger ask (and task), and cross-compiling binaries with it through Dockcross images is not fully ready, AFAIK.

Fixes #3698

Additional information

I added this to the release-3.6.6 branch based on my recent contribution, but I can change the base branch to main if needed. It would be great if a workflow that emulates the releases could be triggered for testing. A way to verify the binaries would be to run the delocate tool on the wheel artifact to validate that all of the dynamic libraries are built against this deployment target; this can be done manually, or I can add a sanity check as a step in an appropriate location in the workflows where delocate will be able to check it on every build.

@jgillis jgillis merged commit d6abd3a into casadi:release-3.6.6 Aug 2, 2024
1 check passed
@jgillis jgillis added this to the Version 3.6.6 milestone Aug 2, 2024
@agriyakhetarpal agriyakhetarpal deleted the fix/macosx-deployment-target branch August 2, 2024 22:12
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