I have a question: how do you distribute OCaml binaries for MacOS?
Until now, I’ve used GitHub Actions to build a binary on a Mac machine, and then just distribute that. (Just like this topic suggests)
But apparently, it’s linking against some HOMEBREW libraries. Some user might not have them, some users might have them installed elsewhere… (See for instance this issue).
Do you just put the homebrew installation as a prerequesite?
Or do you manage to static link in Mac (I haven’t had success in this despite some nice help, but I’m a beginner in this. If you know how to do this, that would be great!)
@eWert-Online I tried something similar to your example (passing -cclib <path to .a>) but the homebrew dynamic library is still picked, according to otool… I’ll continue to try to understand why.
Actually, I’m fine with anything that is easy to install for mac users, reliable and low-effort for me. I’m always surprised how difficult distributing binaries is!
I’ll look into your suggestion but it seems it’s bundling two binaries for two architecture. If those binaries depend on Homebrew libraries that are not installed (or not at the expected path), I’ll still have the same problem.
Thanks! I’m not familiar with what are XCode, SDK, but this also seems to be about running on old OS, not ditching Homebrew requirement. Interesting though!