`-static-libstdc++` with `stacktrace_from_exception` produces duplicate symbol `__cxa_allocate_exception`
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
Research direction
Start with libs/stacktrace/src/from_exception.cpp, especially the area around the reported line 248, and reproduce the linker failure using -static-libstdc++ and -static-libgcc. Review how the stacktrace_from_exception component is built and exposed through Conan, then verify that the duplicate __cxa_allocate_exception definition is resolved without breaking the component's expected library packaging.
Written by the indexing model from the issue text.
Description
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 🙏
- Dominant language
- C++
- Stars
- 497
- Forks
- 86
- Avg merge
- 8d 20h
- Merged PRs (30d)
- 3
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from boostorg/stacktrace
-
Difficulty 4/5 3-5 days Newbie friendliness 52/100
boostorg/stacktrace#233 ·
-
Ошибка в Inscape Open
Difficulty 5/5 Over a week Newbie friendliness 15/100
boostorg/stacktrace#211 · 1 comment ·
-
Difficulty 3/5 1-2 days Newbie friendliness 48/100
boostorg/stacktrace#197 · 3 comments ·
-
enhancement help wanted
Difficulty 5/5 Over a week Newbie friendliness 25/100
boostorg/stacktrace#176 · 1 comment ·
-
enhancement help wanted
Difficulty 4/5 3-5 days Newbie friendliness 35/100
boostorg/stacktrace#163 · 7 comments ·
All issues in boostorg/stacktrace
Similar issues
-
AuTest Bug Tests
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
apache/trafficserver#13714 ·
-
bug build
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
facebookincubator/velox#19143 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
tenstorrent/tt-metal#57393 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
objectionary/eo-graphs#74 ·