You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi there! Thanks for CasADi. We use CasADi as a dependency for our macOS wheels and we've been seeing failures related to libcasadi.3.7.dylib requiring a macOS version of 11.1, which is not supported by Python packaging standards, i.e., wheels that link to CasADi cannot be installed by pip:
Tap to expand
pip3.9 debug --verbose | grep -E -o 'macosx_\d+_\d+' | sort | uniq
WARNING: This command is only meant for debugging. Do not use this with automation for parsing and getting these details, since the output and options of this command may change without notice.
macosx_10_10
macosx_10_11
macosx_10_12
macosx_10_13
macosx_10_14
macosx_10_15
macosx_10_16
macosx_10_4
macosx_10_5
macosx_10_6
macosx_10_7
macosx_10_8
macosx_10_9
macosx_11_0
macosx_12_0
macosx_13_0
macosx_14_0
I notice that CasADi is not using delocate to repair the macOS wheels and it isn't setting a minimum MACOSX_DEPLOYMENT_TARGET either in the source code (C++14 or C++17 can usually use 10.13 and above but even lower versions can work: https://github.com/pypa/cibuildwheel/blob/main/docs/cpp_standards.md)
This makes it slightly difficult for Python libraries linking against CasADi dylibs to publish compiled wheels, since delocate is now hardened and raises errors by checking against all dependencies for a particular shared object for a CPython extension module.
Possible solution
Set the MACOSX_DEPLOYMENT_TARGET environment variable to 11.0 for arm64 macOS wheels and at least 10.13 for the amd64 macOS wheels, in the GitHub Actions steps from where wheels are built in CI and published.
The text was updated successfully, but these errors were encountered:
agriyakhetarpal
changed the title
Set MACOSX_DEPLOYMENT_TARGET to 11_0 for CasADi v3.6.5 – libcasadi.3.7.dylib requires 11.1
Set MACOSX_DEPLOYMENT_TARGET to 11.0 for CasADi v3.6.5 – libcasadi.3.7.dylib requires 11.1 – breaks linkage
May 16, 2024
agriyakhetarpal
changed the title
Set MACOSX_DEPLOYMENT_TARGET to 11.0 for CasADi v3.6.5 – libcasadi.3.7.dylib requires 11.1 – breaks linkage
Set MACOSX_DEPLOYMENT_TARGET to 11.0 for CasADi v3.6.5 on arm64 macOS – libcasadi.3.7.dylib requires 11.1 and breaks linkage
May 16, 2024
Note: I'm not sure whether this is as easy as setting an environment variable (it should be, though, unless CasADi is doing something complicated), but I'm happy to put up a PR for this.
Description
Hi there! Thanks for CasADi. We use CasADi as a dependency for our macOS wheels and we've been seeing failures related to
libcasadi.3.7.dylib
requiring a macOS version of 11.1, which is not supported by Python packaging standards, i.e., wheels that link to CasADi cannot be installed bypip
:Tap to expand
Here are some workflow logs which can help: https://github.com/agriyakhetarpal/PyBaMM/actions/runs/9116260227/job/25064471991#step:5:3260
I notice that CasADi is not using
delocate
to repair the macOS wheels and it isn't setting a minimum MACOSX_DEPLOYMENT_TARGET either in the source code (C++14 or C++17 can usually use 10.13 and above but even lower versions can work: https://github.com/pypa/cibuildwheel/blob/main/docs/cpp_standards.md)This makes it slightly difficult for Python libraries linking against CasADi dylibs to publish compiled wheels, since
delocate
is now hardened and raises errors by checking against all dependencies for a particular shared object for a CPython extension module.Possible solution
Set the
MACOSX_DEPLOYMENT_TARGET
environment variable to 11.0 for arm64 macOS wheels and at least 10.13 for the amd64 macOS wheels, in the GitHub Actions steps from where wheels are built in CI and published.Additional context
xref: pybamm-team/PyBaMM#4092
The text was updated successfully, but these errors were encountered: