Closed harrkee closed 5 days ago
related to these warnings I think
ld: warning: object file (/private/var/folders/b3/2xm02wpd21qgrpkck5q1c6k40000gn/T/tmpdue65pir/build/CMakeFiles/fortranobject.dir/private/var/folders/b3/2xm02wpd21qgrpkck5q1c6k40000gn/T/build-env-66xdgth_/lib/python3.10/site-packages/numpy/f2py/src/fortranobject.c.o) was built for newer 'macOS' version (11.0) than being linked (10.9)
And I only get this if I use cibw >=2.18
I think I understand the problem, but I don't know how to solve it. The wheels are packaging up the libraries /usr/local/Cellar/gcc@11/11.4.0/lib/gcc/11/libgfortran.5.dylib
and /usr/local/Cellar/gcc@11/11.4.0/lib/gcc/11/libquadmath.0.dylib
by just copying them into the wheel, which are compiled for the macos version on the runner.
The repair step is flagging this because it wants the wheels to be compatible with more versions (I guess that means those libs should be compiled for older os versions, since I think they are forward compatible).
I don't know why this is suddenly a problem in cibw >=2.18. According the the changelog all they did was add documentation for it (I think this is what the "delocate error" is referring to).
I also don't know how to resolve it... @henryiii can you offer any thoughts?
The last successful release workflow (on cibw 2.16) also uses delocate
in the repair step https://github.com/CQCL/pyscf-ac0/actions/runs/9712357266/job/26806964016#step:4:433
But this doesn't produce the same error. I think this is because it's using delocate v0.10, whereas the failing workflows on cibw 2.19 are using 0.11. It did get "more strict" in 0.11 according to the changelog
You are not supposed to use homebrew for redistributable binaries. It's explicitly not supported by homebrew. https://cibuildwheel.pypa.io/en/stable/faq/#missing-dependencies As a quick fix, you could increase the MACOSX_DEPLOYMENT_TARGET to whatever those are compiled with, but longer term, you should compile these yourself with the appropriate MACOSX_DEPLOYMENT_TARGET that you do want to target.
Thanks for your help @henryiii. The wheels do indeed pass the repair step if I set the MACOSX_DEPLOYMENT_TARGET
to the version on on the runner (12 and 14 for x86 and arm64 respectively).
As you say, this will do as a short term fix, but I don't like have such a high version requirement on the arm64 wheels, so I'll need to do some reading to figure out how to build these libraries on CI. Is this something best done through cmake? Thanks again
strange: macos12 build complains " delocate.libsana.DelocationError: Library dependencies do not satisfy target MacOS version 10.9:"