boostorg / stacktrace

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

Missing #include's during `./b2` invocation #144

Closed cmazakas closed 10 months ago

cmazakas commented 10 months ago

When invoking ./b2 in the boost project root, I'm getting compilation failures such as these:

./boost/stacktrace/detail/addr2line_impls.hpp:162:9: error: ‘addr_base’ was not declared in this scope
  162 |         addr_base = boost::stacktrace::detail::get_own_proc_addr_base(addr);
      |         ^~~~~~~~~
./boost/stacktrace/detail/addr2line_impls.hpp:162:48: error: ‘get_own_proc_addr_base’ is not a member of ‘boost::stacktrace::detail’
  162 |         addr_base = boost::stacktrace::detail::get_own_proc_addr_base(addr);
      |                                                ^~~~~~~~~~~~~~~~~~~~~~
./boost/stacktrace/detail/addr2line_impls.hpp:164:67: error: ‘uintptr_t’ does not name a type
  164 |     const void* offset = reinterpret_cast<void*>(reinterpret_cast<uintptr_t>(addr) - addr_base);
      |                                                                   ^~~~~~~~~
./boost/stacktrace/detail/addr2line_impls.hpp:164:67: note: ‘uintptr_t’ is defined in header ‘<cstdint>’; did you forget to ‘#include <cstdint>’?
./boost/stacktrace/detail/addr2line_impls.hpp:164:86: error: ‘addr_base’ was not declared in this scope
  164 |     const void* offset = reinterpret_cast<void*>(reinterpret_cast<uintptr_t>(addr) - addr_base);
      |                                                                                      ^~~~~~~~~
./boost/stacktrace/detail/addr2line_impls.hpp: In function ‘std::string boost::stacktrace::detail::name(const void*, bool)’:
./boost/stacktrace/detail/addr2line_impls.hpp:207:5: error: ‘uintptr_t’ was not declared in this scope
  207 |     uintptr_t addr_base = 0;
      |     ^~~~~~~~~

I'm on Linux (Ubuntu 23.10) using gcc-13.

apolukhin commented 10 months ago

Fixed in #143

Thanks for the bug report!