[botan-devel] Linker error on OS X 10.11.2

john skaller skaller at users.sourceforge.net
Wed Dec 30 06:15:05 EST 2015

> On 30 Dec 2015, at 21:45, Simon Warta | Kullo <simon at kullo.net> wrote:
> Hi John,
> I am not sure if I understood your point entirely. Are you only talking
> about the case that a library links against libbotan?

No, the issue is with shared library links against shared libraries.
The external references in the library A linking against B are
not checked against the external definitions in library B.

Linking an executable X against a library, the externals ARE checked.

> We solve the link destination in the Botan cli and Botan tests binaries
> by running
> install_name_tool -change "/$(SONAME_ABI)"
> “@executable_path/$(SONAME_ABI)" $(CLI)

Take care. This directly patches the library.
It only works if the existing name is longer than the new name

> This lets the executable $(CLI) search for libbotan relatively (here in
> the same directory). Now you can move them around however you want. The
> same method works for dylib-to-dylib links as well.

Yes, but it’s obviously not a good solution.
The problem is .. there isn’t a good solution :)

john skaller
skaller at users.sourceforge.net

More information about the botan-devel mailing list