[openssl-users] How to invoke RPATH settings?

Jeffrey Walton noloader at gmail.com
Sat Apr 25 19:19:21 UTC 2015


OpenSSL has support for RPATHs.

How do we invoke the support? Configure and --openssldir or --prefix
does not do it.

Should there be an --rpath option to Configure make this clear and easy?

*****

./Configure linux-x86_64 shared no-ssl2 no-ssl3 no-comp
--openssldir=/usr/local/ssl --prefix=/usr/local/ssl
make depend
make
...
$ ldd ./libssl.so
    linux-vdso.so.1 =>  (0x00007fffa14ef000)
    libcrypto.so.1.0.0 => /lib/x86_64-linux-gnu/libcrypto.so.1.0.0
(0x00007f9b17de5000)
    libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f9b17a20000)
    libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f9b1781b000)
    /lib64/ld-linux-x86-64.so.2 (0x00007f9b18448000)

*****

$ grep -i rpath *
grep: apps: Is a directory
grep: bugs: Is a directory
grep: certs: Is a directory
CHANGES:  *) Add full support for -rpath/-R, both in shared libraries and
CHANGES:     uses the RPATH feature, and is available through the special
CHANGES:     configuration target "alpha-cc-rpath", which will never be selected
...
Makefile:        SDIRS='$(SDIRS)' LIBRPATH='$(INSTALLTOP)/$(LIBDIR)'    \
Makefile.bak:        SDIRS='$(SDIRS)' LIBRPATH='$(INSTALLTOP)/$(LIBDIR)'    \
Makefile.org:        SDIRS='$(SDIRS)' LIBRPATH='$(INSTALLTOP)/$(LIBDIR)'    \
Makefile.shared:DO_GNU_APP=LDFLAGS="$(CFLAGS) -Wl,-rpath,$(LIBRPATH)"
Makefile.shared:    LDFLAGS="$(CFLAGS) -Wl,-rpath,$(LIBPATH)"; \
Makefile.shared:        LDFLAGS="$(CFLAGS) -rpath $(LIBRPATH)"; \
Makefile.shared:        LDFLAGS="$(CFLAGS) -R $(LIBRPATH)"; \
Makefile.shared:    @LDFLAGS="$(CFLAGS) -Wl,-rpath,$(LIBRPATH)"; \
Makefile.shared:    LDFLAGS="$(CFLAGS)
-Wl,+s,+cdp,../:,+cdp,./:,+b,$(LIBRPATH)"; \
Makefile.shared:    LDFLAGS="$(CFLAGS)
-Wl,-brtl,-blibpath:$(LIBRPATH):$${LIBPATH:-/usr/lib:/lib}"; \
Makefile.shared:symlink.cygwin symlink.alpha-osf1 symlink.tru64
symlink.tru64-rpath symlink.beos:
Makefile.shared:link_o.tru64-shared-rpath: link_o.tru64-rpath
Makefile.shared:link_a.tru64-shared-rpath: link_a.tru64-rpath
Makefile.shared:link_app.tru64-shared-rpath: link_app.tru64-rpath
Makefile.shared:symlink.tru64-shared-rpath: symlink.tru64-rpath
...


More information about the openssl-users mailing list