[MacOS Sequoia.]
I am tracking down a problem where I am linking to libboringssl.dylib even though I am statically linking openssl.
In Xcode debugger, 'Show Library info' shows this:
But there is no such file as /usr/lib/libboringssl.dylib
Whats going on?
This library doesn’t existing on disk because it’s been merged into the dynamic linker shared cache. I discuss this here.
I am tracking down a problem where I am linking to libboringssl.dylib even though I am statically linking openssl.
Directly linking to? Or is it just that libboringssl.dylib
is being loaded into your process?
Because the latter is absolutely normal. macOS has its own internal copy of BoringSSL, used by Network framework and other things. This isn’t exposed as API.
Due to the dynamic linker’s two-level namespace, its presence shouldn’t affect your linking, even if your own copy of OpenSSL uses exactly the same symbol names. However, you might run into problems if you manually force a flat namespace (don’t do that!) or use other late binding techniques.
For more backstory on this, see An Apple Library Primer.
Share and Enjoy
—
Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"