<div dir="ltr">Hi Stephen,<div><br></div><div>Thanks for the detailed explanation. Your tip is very helpful, I did manage to find the directory directory of the log4cplus, and the problems was solved.</div><div><br></div><div>Thank you,</div><div>Tianxiang</div></div><div class="gmail_extra"><br><div class="gmail_quote">2017-05-04 22:17 GMT+08:00 Stephen Morris <span dir="ltr"><<a href="mailto:stephen@isc.org" target="_blank">stephen@isc.org</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">On 26/04/17 15:03, tianxiang li wrote:<br>
> Hi,<br>
><br>
> I've been trying to make compile Kea-1.2.0-Beta in Ubuntu 14.04, and<br>
> encountered a problem with the log4cplus library, the error code is as<br>
> follow:<br>
><br>
> .../kea-1.2.0-beta/src/lib/<wbr>log/compiler/.libs/lt-kea-msg-<wbr>compiler: error<br>
> with file loading shared libraries: liblog4cplus-2.0.so.3; cannot open<br>
> shared object file: No such file or directory<br>
><br>
> I've installed both the newer version log4cplus-2.0.0 and the older<br>
> 1.1.2 version, and met the same problem.<br>
><br>
> Thank you!<br>
> Tianxiang<br>
<br>
</div></div>The message you are getting is saying that while trying to run the<br>
message compiler(*), the system was unable to find the log4cplus<br>
dynamically loaded library.<br>
<br>
The compiler is linked against the logging library (libkea-log.so) and<br>
it is this component that requires log4cplus.  As the message compiler<br>
has been built, then so has libkea-log, something that will have<br>
required that the log4cplus library was present.  So the library appears<br>
to be there when libkea-log is built, but is not being found when the<br>
message compiler is run.<br>
<br>
To try to find where the system is expecting to find the log4cplus<br>
library, issue the command<br>
<br>
readelf -d <kea-top>/src/lib/log/.libs/<wbr>libkea-log.so<br>
<br>
... replacing "<kea-top>" with the directory in which you built Kea. You<br>
should see output similar to:<br>
<br>
ceres:~:2008% readelf -d /users/stephen/kea/src/lib/<wbr>log/.libs/libkea-log.so<br>
<br>
Dynamic section at offset 0x2ba58 contains 33 entries:<br>
  Tag  Type     Name/Value<br>
<..> (NEEDED)  Shared library: [libkea-exceptions.so.0]<br>
<..> (NEEDED)  Shared library: [libpthread.so.0]<br>
<..> (NEEDED)  Shared library:<br>
[libkea-threads.so.1]<br>
<..> (NEEDED)  Shared library: [libkea-util.so.2]<br>
<..> (NEEDED)  Shared library:<br>
[liblog4cplus-1.2.so.5]<br>
<..> (NEEDED)  Shared library: [libstdc++.so.6]<br>
<..> (NEEDED)  Shared library: [libc.so.6]<br>
<..> (NEEDED)  Shared library: [libgcc_s.so.1]<br>
<..> (SONAME)  Library soname: [libkea-log.so.3]<br>
<..> (RPATH)   Library rpath:<br>
   [/users/stephen/kea/src/lib/<wbr>exceptions/.libs:<br>
    /users/stephen/kea/src/lib/<wbr>util/threads/.libs:<br>
    /users/stephen/kea/src/lib/<wbr>util/.libs:<br>
    /opt/log4cplus-1.2.0/lib]<br>
<..> (INIT)    0x10198<br>
<br>
(To make the output clearer, I've removed the values in the first column<br>
(the Tag column) and compressed some spaces.  Also, owing to the<br>
restrictions of my email client, some of output has been split across<br>
multiple lines.)<br>
<br>
The bit you are looking for is the RPATH line, which gives the list of<br>
directories searched for the libraries.  One of these should correspond<br>
to the directory where log4cplus is installed. The example above shows<br>
that libkea-log.so was linked against liblog4cplus-1.2.so.5 and it is<br>
reasonably intuitive to see that the system is expecting to find that<br>
library in the directory /opt/log4cplus-1.2.0/lib<br>
<br>
Stephen<br>
<br>
(*) The message compiler is created early on in the build process and is<br>
responsible for converting the message (.mes) files - which list the<br>
code, message and explanation for each message that Kea could log - into<br>
C++ source code that can be built into Kea.<br>
</blockquote></div><br></div>