Reputation: 125
I am able to compile BoringSSL on Ubuntu and created libssl.a and libcrypto.a. In Makefile I have changed -L
path to point to those library location and -lssl -lcrypto
to specify the library name. However my machine already has OpenSSL installed, so looks like in this case it is the OpenSSL libs getting picked up as always because the libraries have exact same name.
If there any other way to enforce OS to use BoringSSL other than completely remove or disable OpenSSL and try?
Upvotes: 0
Views: 3563
Reputation: 1
Please make sure that the library path with the shared libraries is not in the search paths of the linker and then the -L search path will be used and picks up the static libraries.
Alternatively try adding -Bstatic flag after -L to notify linker to use static libraries only.
Upvotes: 0
Reputation: 15584
If you have -L
pointed to the directory where BoringSSL is built, it will always use BoringSSL instead of the system SSL (except if the linker is searching for shared libraries only, as John Bollinger points out).
You'll also need to pass -pthread
to the compiler as it can't implicitly pull in the POSIX thread library with a static library like it can with a shared library.
Upvotes: 2