-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add NOTES.UNIX, with a description on how to deal with runpaths
[skip ci] Reviewed-by: Rich Salz <[email protected]> (Merged from openssl/openssl#2818)
- Loading branch information
Showing
2 changed files
with
31 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
|
||
NOTES FOR UNIX LIKE PLATFORMS | ||
============================= | ||
|
||
For Unix/POSIX runtime systems on Windows, please see NOTES.WIN. | ||
|
||
|
||
Shared libraries and installation in non-standard locations | ||
----------------------------------------------------------- | ||
|
||
Binaries on Unix variants expect to find shared libraries in standard | ||
locations, such as /usr/lib, /usr/local/lib and some other locations | ||
configured in the system (for example /etc/ld.so.conf on some systems). | ||
If the libraries are installed in non-standard locations, binaries | ||
will not find them and therefore fail to run unless they get a bit of | ||
help from a defined RPATH or RUNPATH. This can be applied by adding | ||
the appropriate linker flags to the configuration command, such as | ||
this (/usr/local/ssl was the default location for OpenSSL installation | ||
in versions before 1.1.0): | ||
|
||
$ ./config --prefix=/usr/local/ssl --openssldir=/usr/local/ssl \ | ||
-Wl,-rpath,/usr/local/ssl/lib | ||
|
||
Because the actual library location may vary further (for example on | ||
multilib installations), there is a convenience variable in Makefile | ||
that holds the exact installation directory and that can be used like | ||
this: | ||
|
||
$ ./config --prefix=/usr/local/ssl --openssldir=/usr/local/ssl \ | ||
-Wl,-rpath,'$(LIBRPATH)' |