-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add optional BoringSSL support via configure #343
Conversation
git clone https://boringssl.googlesource.com/boringssl | ||
cd boringssl | ||
# We need a specific revision | ||
git fetch origin 12fe1b25ead258858309d22ffa9e1f9a316358d7 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably better as git checkout 12fe1b25ead258858309d22ffa9e1f9a316358d7
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the heads-up, I'll change that.
Thanks @lminiero! Everything built just fine for us; however, after checking links with ldd we could still see janus linked to the system libssl. So we build boringssl with shared libs instead ( It appears as though your instructions call for building boringssl in statically. But I think we'd have to modify autoconf to not link in libssl when building statically. Thanks |
@masahji actually all my attempts to use a shared version of the library failed somehow, or at least I couldn't find a way to reliably force that upon the stock OpenSSL, so I eventually resigned to using the static build (which is what BoringSSL tries to build by default, anyway). I also noticed ldd still listing the OpenSSL shared objects (as you pointed out, probably because we still have |
btw, if you do end up building shared libs and putting them somewhere besides /usr/lib/, the best way to make janus use them (at run time) is to add to the "rpath", the runtime library path. As I mentioned in #325 (comment) I build with
("..." is where I trimmed the output.) You could do the same with "/opt/boringssl/lib"; you can have multiple rpath additions. |
I think I tried playing with rpath for a shared build of BoringSSL as well, using the info you provided in that other discussion, but I still couldn't get it to work, can't remember why. I'll give it another try next week. |
Yeah this stuff can be fiddly and confusing. I wonder if it was due to the linker pulling in the system openssl library on behalf of another shared library before pulling in boringssl on behalf of janus proper... Shared libraries can also have an rpath of their own. So libsophia-sip / libsrtp / etc should also be built against the openssl lib you want to be used. Now that I think about it, it's possible that janus was statically linking in boringssl stuff while libsophia-sip etc. were dynamically linking to the system openssl. |
Merging for now as it does indeed work for those who are interested in this, we can worry about shared vs. static and other things later. |
Add optional BoringSSL support via configure
This pull request adds optional BoringSSL support via a new flag in the configure script,
--enable-boringssl
. If enabled, it looks for BoringSSL in a specific folder and updates the Makefile accordingly to make use of it.The README has also been updated with instructions on how to build BoringSSL, partly derived from info gathered on #136 and partly coming from what I needed to get it working.
Feedback welcome on whether this is indeed working for everybody.