When compiling in OSX always use -flat_namespace -undefined suppress. If the user has some LDFLAGS which is almost always the case in OSX for other things like OpenSSL headers, it would suppress the above compiler options and always fail with:
Undefined symbols for architecture x86_64:
"_enif_alloc", referenced from:
_on_load in bcrypt_nif.o
_bcrypt_hashpw in bcrypt_nif.o
_bcrypt_rt_dtor in bcrypt_nif.o
_async_queue_create in async_queue.o
_async_queue_push in async_queue.o
Tested the fix on Mojave and Catalina but should be the same effect for older OSX versions.
When compiling in OSX always use
-flat_namespace -undefined suppress
. If the user has some LDFLAGS which is almost always the case in OSX for other things like OpenSSL headers, it would suppress the above compiler options and always fail with:Tested the fix on Mojave and Catalina but should be the same effect for older OSX versions.