@h-g-s: I'm requesting a fix in your cbcbox repo, but I can't open a pull request or issue against it due to it being a fork, so I'm doing that here.
I've only verified this behavior on on macOS 26.7 (arm64), but it seems that cbcbox 2.935 dies as soon as its bundled OpenBLAS is loaded:
python -c 'import cbcbox, ctypes, os; ctypes.CDLL(os.path.join(cbcbox.cbc_lib_dir(), "libopenblas.0.dylib"))'
Exit 137, no traceback. Model(solver_name="CBC") dies the same way, because libCbc.dylib pulls that library in.
The problem seems to be that setup.py runs install_name_tool and then strip -x on the bundled binaries. Both invalidate the linker's signature, and nothing re-signs afterwards. codesign -dv on the shipped library reports flags=0x20002(adhoc,linker-signed).
Signing after both steps seems to fix the issue:
codesign --force --sign - <path>
The signature then becomes flags=0x2(adhoc), and the library loads.
Here's a patch to setup.py: ghackebeil/cbcbox@39243b2
@h-g-s: I'm requesting a fix in your cbcbox repo, but I can't open a pull request or issue against it due to it being a fork, so I'm doing that here.
I've only verified this behavior on on macOS 26.7 (arm64), but it seems that cbcbox 2.935 dies as soon as its bundled OpenBLAS is loaded:
Exit 137, no traceback.
Model(solver_name="CBC")dies the same way, becauselibCbc.dylibpulls that library in.The problem seems to be that
setup.pyrunsinstall_name_tooland thenstrip -xon the bundled binaries. Both invalidate the linker's signature, and nothing re-signs afterwards.codesign -dvon the shipped library reportsflags=0x20002(adhoc,linker-signed).Signing after both steps seems to fix the issue:
The signature then becomes
flags=0x2(adhoc), and the library loads.Here's a patch to setup.py: ghackebeil/cbcbox@39243b2