Inconsistency between b2 and CMake builds regarding library type (Static vs. Header-only)
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 35/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Quiet
- Tech stack
- cmake, cpp
- Domain
- build-system
Research direction
Start with build/Jamfile.v2 and CMakeLists.txt, especially the linked library configuration lines, and compare how each build system represents Boost.Exception. Determine the intended library type and linkage behavior; the issue is resolved when the project’s expected behavior is decided and the two configurations are made consistent or the difference is clearly documented.
Written by the indexing model from the issue text.
Description
Greetings! 👋
There appears to be an inconsistency in how the Boost.Exception library is built and packaged depending on the build system used (b2 vs. CMake). I know b2 is the official one and CMake is optional, but this difference and as b2 only provide static library makes me think about this case.
With b2: The library forces a static build. Even when passing the global link=shared property to b2 to generate shared libraries across Boost, Boost.Exception overrides this behavior in its build configuration, hardcoding it to build strictly as a static library.
With CMake: The CMakeLists.txt configures Boost.Exception entirely as a header-only (INTERFACE) library, offering no option to build a compiled/pre-built library component.
-
Is the static restriction in Jamfile.v2 intended design, or is it a legacy artifact/bug?
-
Is Boost.Exception officially supposed to be treated strictly as a header-only library going forward (as suggested by the CMake configuration)?
Regards!
- Dominant language
- C++
- Stars
- 17
- Forks
- 50
- PR merge metrics
- No merged PRs in 30d
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
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/exception
-
Difficulty 4/5 3-5 days Newbie friendliness 43/100
All issues in boostorg/exception
Similar issues
-
upstream update
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
conan-io/conan-center-index#31098 ·
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
ml-explore/mlx-c#136 ·
-
bug chart-audit
Difficulty 1/5 Under an hour Newbie friendliness 92/100
Maintainers usually reply within 1 day