dynawo / dynawo-nightly

Old Dynaωo nighlty test build with Travis
http://dynawo.org
Mozilla Public License 2.0
0 stars 0 forks source link

Fix boost problem on macOS #6

Closed gautierbureau closed 4 years ago

gautierbureau commented 4 years ago
Undefined symbols for architecture x86_64:
  "boost::log::v2_mt_posix::record_view::public_data::destroy(boost::log::v2_mt_posix::record_view::public_data const*)", referenced from:

      DYN::Trace::log(DYN::SeverityLevel, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) in DYNTrace.cpp.o

The problem comes from the default boost is not compiled as we want in shared library, and the log is mangled with the type of compilation, see here

In the boost library /usr/local/lib/libboost_log.dylib compiled on the travis vm we find the symbol: boost::log::v2_st::record_view::public_data::destroy(boost::log::v2_st::record_view::public_data const*) for the previous asked symbol.

nm -C /usr/local/lib/libboost_log-mt.dylib | grep record_view::public_data is ok.

gautierbureau commented 4 years ago

After this I get the following error:

In file included from /Users/travis/build/dynawo/dynawo-nightly/dynawo/dynawo/sources/Common/DYNExecUtils.cpp:40:
In file included from /Users/travis/Dynawo_MacOS_latest/include/boost/process.hpp:24:
In file included from /Users/travis/Dynawo_MacOS_latest/include/boost/process/async_system.hpp:22:
In file included from /Users/travis/Dynawo_MacOS_latest/include/boost/process/child.hpp:21:
In file included from /Users/travis/Dynawo_MacOS_latest/include/boost/process/detail/child_decl.hpp:30:
/Users/travis/Dynawo_MacOS_latest/include/boost/process/detail/posix/wait_for_exit.hpp:60:7: error: expected unqualified-id
    ::sigemptyset(&sigset);
      ^
/Applications/Xcode-10.3.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include/signal.h:125:26: note: expanded from macro 'sigemptyset'
#define sigemptyset(set)        (*(set) = 0, 0)
                                ^

Following this it seems it is a known issue...