`-static-libstdc++` with `stacktrace_from_exception` produces duplicate symbol `__cxa_allocate_exception`
还没有人认领这个 Issue。
评估
调研方向
从 libs/stacktrace/src/from_exception.cpp 开始,尤其检查报告的第 248 行附近区域,并使用 -static-libstdc++ 和 -static-libgcc 重现链接器失败。检查 stacktrace_from_exception 组件的构建方式以及它如何通过 Conan 暴露,然后验证重复的 __cxa_allocate_exception 定义已得到解决,同时不破坏该组件预期的库打包方式。
由索引模型根据 Issue 内容生成。
描述
I'm trying to update our project (The XRP ledger) to Boost 1.88 and I'm seeing a linker error on x86 (where stacktrace_from_exception gets enabled by default):
/usr/bin/ld: /usr/bin/../lib/gcc/x86_64-linux-gnu/12/libstdc++.a(eh_alloc.o): in function `__cxa_allocate_exception':
(.text.__cxa_allocate_exception+0x0): multiple definition of `__cxa_allocate_exception'; /root/.conan2/p/b/boost4d02c12b1f707/p/lib/libboost_stacktrace_from_exception.a(from_exception.o):/root/.conan2/p/boost9ad4e6f6d8220/s/src/libs/stacktrace/build/../src/from_exception.cpp:248: first defined here
This only happens with -static-libstdc++ -static-libgcc options.
There seems to be no easy way to disable the component through conan. I tried something like
def configure(self):
self.options["boost"].extra_b2_flags = "boost.stacktrace.from_exception=off"
which results in
boost/1.88.0: WARN: Boost component 'stacktrace_from_exception' is missing libraries. Try building boost with '-o boost:without_stacktrace_from_exception'. (Option is not guaranteed to exist)
ERROR: boost/1.88.0: Error in package_info() method, line 2026
raise ConanException(f"These libraries were expected to be built, but were not built: {non_built}")
ConanException: These libraries were expected to be built, but were not built: {'boost_stacktrace_from_exception'}
Here is the real project breaking: https://github.com/XRPLF/rippled/actions/runs/16486148700/job/46611443287?pr=5570
Any help and suggestions are very welcome 🙏
- 主要语言
- C++
- 星标
- 497
- 派生
- 86
- 平均合并
- 8 天 20 小时
- 30 天内合并 PR
- 3
贡献指南
这个仓库没有索引到贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
boostorg/stacktrace 的其他 Issue
-
难度 4/5 3-5 天 新手友好度 52/100
boostorg/stacktrace#233 ·
-
Ошибка в Inscape 未关闭
难度 5/5 一周以上 新手友好度 15/100
boostorg/stacktrace#211 · 1 条评论 ·
-
难度 3/5 1-2 天 新手友好度 48/100
boostorg/stacktrace#197 · 3 条评论 ·
-
enhancement help wanted
难度 5/5 一周以上 新手友好度 25/100
boostorg/stacktrace#176 · 1 条评论 ·
-
enhancement help wanted
难度 4/5 3-5 天 新手友好度 35/100
boostorg/stacktrace#163 · 7 条评论 ·
查看 boostorg/stacktrace 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 70/100
google/libultrahdr#485 ·
-
难度 2/5 1-3 小时 新手友好度 75/100
godotengine/godot#123776 ·
-
bug
难度 1/5 1 小时以内 新手友好度 60/100
-
good first issue
难度 1/5 1 小时以内 新手友好度 90/100
-
good first issue
难度 2/5 1-3 小时 新手友好度 75/100
ros2/common_interfaces#344 ·