boostorg / stacktrace

C++ library for storing and printing backtraces.
https://boost.org/libs/stacktrace
422 stars 70 forks source link

macOS _GNU_SOURCE linking error #94

Closed oguzziya closed 2 years ago

oguzziya commented 4 years ago

Boost version: 1.72.03 (Installed by homebrew) OS: Catalina 10.15.5 Compiler: g++9

I get the following error in the compile time:

#error "Boost.Stacktrace requires `_Unwind_Backtrace` function. Define `_GNU_SOURCE` macro or `BOOST_STACKTRACE_GNU_SOURCE_NOT_REQUIRED` if _Unwind_Backtrace is available without `_GNU_SOURCE`."
      |  ^~~~~

When I tried to define the _GNU_SOURCE, the error disappears and I get the linking error, mostly related to boost::log::v2_mt_posix. I could not further track down the problem. There was a similar issue #88 also.