Building libgcrypt-1.11.0 produces a dylib with unresolved symbols at runtime
On Darwin build targets, entry point symbols for asm code require an _ at the front of the symbol in order to be callable from C code. The configure script seems to have logic to handle this, but it is not enabled on a Darwin target. I used the following diff to resolve this on my system:
diff --git a/acinclude.m4 b/acinclude.m4 index 782b7f6a..e020cea6 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -73,6 +73,9 @@ case "${host}" in i386-emx-os2 | i[3456]86-pc-os2*emx | i386-pc-msdosdjgpp) ac_cv_sys_symbol_underscore=yes ;; + x86_64-apple-darwin*) + ac_cv_sys_symbol_underscore=yes + ;; *) if test "$cross_compiling" != yes; then tmp_do_check="yes"
I suspect that this is also required on other Apple platforms, so I suspect that you want something like *-apple-darwin* to handle all Apple platforms, but I have no way to test this myself.
After applying this patch, regenerating configure, and building the project, the resulting dylib works correctly.