Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Inconsistency between b2 and CMake builds regarding library type (Static vs. Header-only)

Open
#65 0 comments 0 reactions 0 assignees View on GitHub

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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from boostorg/exception

All issues in boostorg/exception

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.