<div dir="ltr">Thanks Francis for the help. I tried solution #2, it worked well.<div>Now I want for a fresh install. so, after untar'ing the kea src, I edited configure (appended -lcrypto with -lssl) and did usual installation (configure, make, make install) and it worked well too. Hope this is a recommended way.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Jun 15, 2017 at 11:27 PM, Francis Dupont <span dir="ltr"><<a href="mailto:fdupont@isc.org" target="_blank">fdupont@isc.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Gokulakrishnan Gopalakrishnan writes:<br>
> ...<br>
<span class="">> for making HTTPS Call using boost. While starting the server, I'm getting<br>
</span>> error loading user_chk lib (*undefined Symbol: SSL_library_unit*).<br>
<br>
=> the cryptolink library uses either the Botan or the OpenSSL crypto<br>
backend (it was initially Botan only but I added OpenSSL to provide<br>
an alternative, e.g. for people requiring a certified crypto).<br>
So if you build Kea with the OpenSSL backend you get the -lcrypto<br>
dependeny, i.e. the low level OpenSSL library. Note that we chose to<br>
not include direct HTTPS/TLS support inside Kea even both Botan and<br>
OpenSSL support TLS, of course with very different API.<br>
To conclude in your case you need the second SSL/TLS OpenSSL library -lssl<br>
<span class=""><br>
> to build the library with "-lcrypto - lssl". I'm bit confused on how to<br>
> change the Makefile to build the library using these two libs.<br>
<br>
</span>=> you have two choices:<br>
 - you modify the Makefile.am and rerun autoconf, configure, etc<br>
<br>
 - you patch config.status to add -lssl in a variable definition<br>
  for instance the one with -lcrypto (i.e. you substitute "-lcrypto"<br>
  by "-lcrypto -lssl" everywhere) and you rerun it by:<br>
  sh ./config.status<br>
<br>
I use often the second solution because it is quick but it is dirty too<br>
so if it fixes your problem you have to try the first/clean way after.<br>
<br>
// Extra notes for corner cases, mainly the hook library case<br>
<br>
Note the order can matter (in theory it should not but in practice<br>
it could). And if you are working with a DSO (aka hook library)<br>
things can become really complex as hooks are loaded using dlopen()<br>
so anything the hook can need must be available in the Kea binary.<br>
<br>
There are already a few hacks to enforce some symbols to be visible,<br>
you have an example at the end of src/lib/eval/lexer.ll you can<br>
adapt to enforce a reference to a symbol in -lssl (without this<br>
the dynamic library libssl.so will be skipped by ld when the Kea<br>
binary is built). So if you have the -lssl not adding the library<br>
you should:<br>
 - check if the libssl.so is linked by something like<br>
  libtool --mode=execute ldd kea-dhcp4<br>
 (with libtool kea-dhcp4 is a shell script, the real binary is in<br>
  the src/bin/dhcp4/.libs directory and ldd applied directly on it<br>
  just returns errors saying it can't find libraries)<br>
  ldd on Linux and BSDs returns the list of dynamic libraries used<br>
  by the binary<br>
<br>
 - if libssl.so is not listed by ldd then add a hack at the end of<br>
  src/lib/cryptolink/openssl_<wbr>link.cc with a reference to a libssl.so<br>
  symbol. Choose one (e.g., SSL_library_init), add its include<br>
  (<openssl/ssl.h>) and a call to it as in lexer.ll. Note the function<br>
  will be never really called but it will be referenced.<br>
  Rebuild and recheck.<br>
<br>
Regards<br>
<br>
Francis Dupont <<a href="mailto:fdupont@isc.org">fdupont@isc.org</a>><br>
<br>
PS: I assume you use dynamic linking on Linux or BSD. If you use static<br>
linking (./configure --enable-static-link) and/or Apple OS X / macOS<br>
some details change.<br>
</blockquote></div><br></div>