OS X side steps the problems with selecting the wrong runtime library
and RPATHs by using something called an install name. Effectively, the
install name should be placed in libcrypto.dylib and libssl.dylib, and
it calls out the fully qualified path name. Programs linked to a
library with an install name will record the library, and dyld(1) will
link to the proper library at runtime. There's no need for tricks like
LD_LIBRARY_PATH on Linux (its called DYLD_LIBRARY_PATH on OS X).

To make room for an install name that may change (for example, from
PWD to /usr/local/ssl/lib, you need to use the flag
-headerpad_max_install_names on libcrypto.dylib and libssl.dylib.

To add the icing to the cake, 'make install' should add the following
to its recipe for OS X:

  cp libcrypto.dylib $(DESTDIR)$(OPENSSLDIR)/lib/libcrypto.dylib
  install_name_tool -id $(DESTDIR)$(OPENSSLDIR)/lib/libcrypto.dylib
$(DESTDIR)$(OPENSSLDIR)/lib/libcrypto.dylib

And:

  cp libssl.dylib $(DESTDIR)$(OPENSSLDIR)/lib/libssl.dylib
  install_name_tool -id $(DESTDIR)$(OPENSSLDIR)/lib/libssl.dylib
$(DESTDIR)$(OPENSSLDIR)/lib/libssl.dylib


-- 
Ticket here: http://rt.openssl.org/Ticket/Display.html?id=4367
Please log in as guest with password guest if prompted

-- 
openssl-dev mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-dev

Reply via email to