We have in elf.cc a list of libraries which are already fully included inside the OSv kernel, so the user doesn't need to load another copy of them. We have one Boost library in this list, but starting with Boost version 1.69.0, Boost is compiled with hidden visibility - meaning that the symbols in this library are *not* available to the application. So if Boost is 1.69.0 or later, we shouldn't claim that the kernel contains this library.
Refs #1040. Signed-off-by: Nadav Har'El <n...@scylladb.com> --- core/elf.cc | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/core/elf.cc b/core/elf.cc index 1f8ae404..74d9cf6c 100644 --- a/core/elf.cc +++ b/core/elf.cc @@ -26,6 +26,7 @@ #include <osv/stubbing.hh> #include <sys/utsname.h> #include <osv/demangle.hh> +#include <boost/version.hpp> #include "arch.hh" @@ -1153,11 +1154,19 @@ program::program(void* addr) "libm.so.6", #ifdef __x86_64__ "ld-linux-x86-64.so.2", + // As noted in issue #1040 Boost version 1.69.0 and above is + // compiled with hidden visibility, so even if the kernel uses + // this library, it will not be visible for the application and + // it will need to load its own version of this library. +#if BOOST_VERSION < 106900 "libboost_system.so.1.55.0", +#endif #endif /* __x86_64__ */ #ifdef __aarch64__ "ld-linux-aarch64.so.1", +#if BOOST_VERSION < 106900 "libboost_system-mt.so.1.55.0", +#endif #endif /* __aarch64__ */ "libpthread.so.0", "libdl.so.2", -- 2.20.1 -- You received this message because you are subscribed to the Google Groups "OSv Development" group. To unsubscribe from this group and stop receiving emails from it, send an email to osv-dev+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/osv-dev/20191003100957.18752-1-nyh%40scylladb.com.