issues with current libtool.m4 in macOS 11.x

Aleix Conchillo Flaqué aconchillo at gmail.com
Mon Sep 20 21:18:00 CEST 2021


Hello,

A few days ago I sent a patch to update libtool.m4 out of the blue.
The reason for this update is that the current libtool.m4 doesn't
support macOS 11.x properly which means libgcrypt is linked with the
option flat_namespace.

This shouldn't be a problem except when using dlopen with RTLD_LAZY |
RTLD_LOCAL mode. When using this mode dyld will fail with this error:

dyld: lazy symbol binding failed: Symbol not found:
__gcry_check_version Referenced from: /usr/local/lib/libgcrypt.dylib
Expected in: flat namespace

dyld: Symbol not found: __gcry_check_version Referenced from:
/usr/local/lib/libgcrypt.dylib Expected in: flat namespace

More details about why this happens can be found in this thread:

https://developer.apple.com/forums//thread/689991

I found this issue while trying to use guile-gcrypt in Guile 3.0.7.
Since guile 3.0.6, dlopen is used with RTLD_LAZY | RTLD_LOCAL.

Also, it seems libgpg-error has the same issue. It would be fantastic
if you could update both, with or without my patch.

Thank you so much in advance,

Aleix



More information about the Gcrypt-devel mailing list