boostorg / boostorg/stacktrace

The BOOST_STACKTRACE_HAS_BACKTRACE check doesn't seem to work with clang

未关闭
#197 3 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
C++
星标
494
派生
86
平均合并
8 天 20 小时
30 天内合并 PR
3

描述

When configuring cmake on ubuntu 24.04 with clang, the check for libbacktrace doesn't seem to work, even when libbacktrace is installed in the default location.

For reference, gcc puts libbacktrace here:
`/usr/lib/gcc/x86_64-linux-gnu/13/include/backtrace.h`

Configuring with clang, we see:
```
[build] -- Performing Test BOOST_STACKTRACE_HAS_BACKTRACE
[build] -- Performing Test BOOST_STACKTRACE_HAS_BACKTRACE - Failed
```

This can be corrected by explicitly telling the library where the header resides (the extra escapes are to pass the literal quotes all the way in to the header file as a define):
```
-DCMAKE_CXX_FLAGS="-DBOOST_STACKTRACE_BACKTRACE_INCLUDE_FILE=\\\"/usr/lib/gcc/x86_64-linux-gnu/13/include/backtrace.h\\\""
```

Can the cmake check of BOOST_STACKTRACE_HAS_BACKTRACE be modified to look at the gcc install location?

贡献指南

这个仓库没有索引到贡献指南

调研方向

Start at the CMake logic for the BOOST_STACKTRACE_HAS_BACKTRACE check and review how it locates backtrace.h when configuring with clang. Reproduce the failed check on Ubuntu 24.04 with clang and the GCC libbacktrace installation, then confirm configuration succeeds without explicitly defining BOOST_STACKTRACE_BACKTRACE_INCLUDE_FILE.

由索引模型根据 Issue 内容生成。

评估

技术栈
cmake, cpp
领域
build-system
Issue 类型
缺陷
难度
3/5
预计耗时
1-2 天
活跃度
停滞
描述清晰度
基本清楚
新手友好度
48/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。