0

I am using boost log and my child process fails to load the libboost_log.so with the below error. The strace below shows that open failed, at this point my parent process is in the process of shutting down but not yet. My child process is loading libraries after successful execlp.

[pid 3629] writev(2, [{"/root/work/blah/blah/Linux/blahHelper", 46}, {": ", 2}, {"error while loading shared libraries", 36}, {": ", 2}, {"libboost_log.so.1.55.0", 22}, {": ", 2}, {"cannot open shared object file", 30}, {": ", 2}, {"No such file or directory", 25}, {"\n", 1}], 10) = 168

Satyajit Singh
  • 191
  • 1
  • 2
  • 6
  • I am aware that boost logging does not support for/exec yet. Would be great to have a work around. – Satyajit Singh Jul 14 '16 at 02:04
  • Boost.Log does support `fork`+`exec`, and even if it didn't it would not be able to prevent loading the library. You didn't describe how you're loading the library, so I assume your child process binary is liked with it. My guess is that libboost_log.so.1.55.0 is actually not found on your system in the known library directories. See where the library is located and try adding it to `LD_LIBRARY_PATH`. Make sure you're not removing it before `exec`. – Andrey Semashev Jul 15 '16 at 08:47

0 Answers0