[openssl-dev] [Bug, maybe] [master] bin/* no longer find their libraries if installed in non-default locations

Richard Levitte levitte at openssl.org
Wed Mar 1 22:46:34 UTC 2017

In message <20170301221703.tFwPU%steffen at sdaoden.eu> on Wed, 01 Mar 2017 23:17:03 +0100, Steffen Nurpmeso <steffen at sdaoden.eu> said:

steffen> Hello,
steffen> Richard Levitte <levitte at openssl.org> wrote:
steffen>  |In message <20170301165032.8jhWg%steffen at sdaoden.eu> on Wed, 01 Mar \
steffen>  |2017 17:50:32 +0100, Steffen Nurpmeso <steffen at sdaoden.eu> said:
steffen>  |
steffen>  |steffen> "Salz, Rich" <rsalz at akamai.com> wrote:
steffen>  |steffen>  |> This is new behaviour, until now the installation was \
steffen>  |always self-contain\
steffen>  |steffen>  |> ed
steffen>  |steffen>  |> when configured via
steffen>  |steffen>  |> 
steffen>  |steffen>  |>   ./config --prefix=$(MYPREFIX) zlib-dynamic no-hw shared
steffen>  |steffen>  |
steffen>  |steffen>  |Did you install the libraries in a standard place?
steffen>  |steffen>  |
steffen>  |steffen>  |> I think this should at least be noted in CHANGES or so.
steffen>  |steffen>  |
steffen>  |steffen>  |I don't think so.  I think the libs weren't installed.
steffen>  |steffen> 
steffen>  |steffen> Yes, also in my opinion the old behaviour was much, much better.
steffen>  |
steffen>  |I very much disagree.  We have had bug reports as well as cases of our
steffen>  |own because a new compilation that you want to test picked up
steffen>  |previously installed versions of the libraries (usually an older
steffen>  |version).  The reason for doing so previously was because we installed
steffen>  |the libraries in non-standard locations by default.
steffen> That unpuzzles me a little bit -- this behaviour did exist.  Good.
steffen>  |Since OpenSSL 1.1.0 and on is installing in standard locations by
steffen>  |default, we don't have to use these mechanisms for a default build.
steffen>  |With that, we realised that choosing to use DT_RPATH, DT_RUNPATH (they
steffen>  |are different) or whatever isn't really our decision to make, but the
steffen>  |decision of the packager or the individual user, so we've handed the
steffen>  |decision to you. 
steffen>  |
steffen>  |For the GNU toolchain, I'd recommend configuring with something like
steffen>  |this (from memory, I might be fuzzy in the details):
steffen>  |
steffen>  |    -Wl,--enable-new-dtags -rpath '$(LIBRPATH)'
steffen>  |
steffen>  |LIBRPATH is a convenience Makefile variable that gets correctly set to
steffen>  |the configured shared library installation directory, meant for
steffen>  |exactly this sort of situation.
steffen> The latter (DT_RUNPATH) does not overwrite $LD_LIBRARY_PATH, yes,
steffen> when i reported the dynamic link test failures a while back i have
steffen> seen that and also added support for this new linker flag to my
steffen> software.  It is i think off-topic that now new environment
steffen> variables come up that makes me wonder why the LD_PRELOAD ..
steffen> DT_RPATH .. LD_LIBRARY_PATH chain has ever been declared
steffen> deprecated.
steffen> LIBRPATH i did not know about yet, thanks for the pointer, i will
steffen> read about it.
steffen> Yes, i mean, i just didn't know this, it is not mentioned anywhere
steffen> (i think that would well be worth in entry in INSTALL), and
steffen> i really would have sworn that it worked in the past.
steffen> Thank you, and
steffen> Ciao!

I've added a change with documentation:


Please go in and comment, or if you don't have a github account, feel
free to comment here.


Richard Levitte         levitte at openssl.org
OpenSSL Project         http://www.openssl.org/~levitte/

More information about the openssl-dev mailing list