Thank you again for your reply. Here's the info you requested:
❯ xcrun dyldinfo -lazy_bind /usr/local/lib/libgcrypt.dylib | grep gcry_check_version
__DATA __la_symbol_ptr 0x000A40C8 0x02C7 flat-namespace __gcry_check_version
Also, here's the one from before properly formatted:
❯ nm -m /usr/local/lib/libgcrypt.dylib | grep gcry_check_version
0000000000005954 (__TEXT,__text) external __gcry_check_version
0000000000002aa7 (__TEXT,__text) external _gcry_check_version
Thanks again,
Aleix
Post
Replies
Boosts
Views
Activity
For anyone else reading this thread, I have found this PDF to be very useful to understand what lazy, two-level namespace or flat namespace are.
https://www.symbolcrash.com/wp-content/uploads/2019/02/MachORuntime.pdf
Thank you so much for your answer, really appreciate it. I believe this makes sense.
Just one last question: what would be the difference with RTLD_NOW | RTLD_LOCAL? Shouldn't this cause the same issue? Or would RTLD_NOW also look int the global flat namespace even if RTLD_LOCAL is defined?
By the way, I found this issue while using Guile (https://www.gnu.org/software/guile/) and trying to load guile-gcrypt. Newer versions of Guile (>= 3.0.6) use RTLD_LAZY | RTLD_LOCAL and when loading guile-gcrypt the crashed happened.
https://lists.gnu.org/archive/html/guile-devel/2021-09/msg00008.html
I have also provided a patch to Guile, but probably not going to be accepted since this doesn't seem a Guile issue.
https://lists.gnu.org/archive/html/guile-devel/2021-09/msg00024.html
So, I will need to go to homebrew and gcrypt and see how libgcrypt is built.
Thank you so much again.
Aleix
The issue was in libgrcypt libtool.m4. It was an old version which didn't support macOS 11.x properly and thus defaulting to using flat_namespace.
I provided a patch to upgrade to a newer libtool.m4:
https://lists.gnupg.org/pipermail/gcrypt-devel/2021-September/005173.html
I still wonder why RTLD_NOW | RTLD_LOCAL worked...
Thanks,
Aleix
No worries, thank you for all the answers!