I compile Kamailio and a lot of modules on MacOS as for a development environment, doing some tests as well, but not planning to use it for a production system. Considering this, if you use also tls module or others modules are linked to libssl, try with `--atexit=no` -- see the remarks at:
* https://www.kamailio.org/docs/modules/devel/modules/tls.html#tls.overview
If it's not that one, then provide full details of MacOS version, I can try to reproduce and if I find a quick solution, then it will be fixed, otherwise, it will have really low priority, given that newer MacOS versions have lots of restrictions related to signed and trusted apps.