Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

The BOOST_STACKTRACE_HAS_BACKTRACE check doesn't seem to work with clang

未关闭
#197 3 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

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

调研方向

从 BOOST_STACKTRACE_HAS_BACKTRACE 检查的 CMake 逻辑入手,检查使用 clang 配置时它如何定位 backtrace.h。在 Ubuntu 24.04 上使用 clang 和 GCC libbacktrace 安装复现失败的检查,然后确认无需显式定义 BOOST_STACKTRACE_BACKTRACE_INCLUDE_FILE 即可成功完成配置。

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

描述

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?

主要语言
C++
星标
497
派生
86
平均合并
8 天 20 小时
30 天内合并 PR
3

贡献指南

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

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

boostorg/stacktrace 的其他 Issue

查看 boostorg/stacktrace 的全部 Issue

相似的 Issue

更多 C++ Issue

把新 issue 发到你的邮箱

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