Skip to content

Include <boost/config.h> in the has_backtrace.cpp detector #229

@gysevvlad

Description

@gysevvlad

Hello!

I ran into an issue where has_backtrace.cpp does not include <boost/config.hpp> and therefore doesn’t pick up user.hpp with the required defines such as BOOST_STACKTRACE_BACKTRACE_INCLUDE_FILE.

Would it be possible to include the following patch, similar to how it’s done in has_addr2line.cpp?

diff --unified --recursive boost-1.83.0.orig/libs/stacktrace/build/has_backtrace.cpp boost-1.83.0/libs/stacktrace/build/has_backtrace.cpp
--- boost-1.83.0.orig/libs/stacktrace/build/has_backtrace.cpp   2026-04-27 21:08:22.774083629 +0200
+++ boost-1.83.0/libs/stacktrace/build/has_backtrace.cpp        2026-04-27 21:10:06.994861653 +0200
@@ -4,6 +4,8 @@
 // accompanying file LICENSE_1_0.txt or copy at
 // http://www.boost.org/LICENSE_1_0.txt)
 
+#include <boost/config.hpp>
+
 #ifdef BOOST_STACKTRACE_BACKTRACE_INCLUDE_FILE
 #   include BOOST_STACKTRACE_BACKTRACE_INCLUDE_FILE
 #else

I’m not very familiar with b2/Jam, so I’m not sure whether it’s appropriate to include <boost/config.hpp> in feature detection sources, or whether this macro is intended to be defined in user.hpp in the first place.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions