boostorg / boostorg/cobalt

Why does libboost_cobalt.so get built for GCC 16 but not GCC 15?

Open
#260 8 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
347
Forks
47
Avg merge
3d 8h
Merged PRs (30d)
1

Description

I'm packaging Boost 1.90.0 for Fedora and observed that when my new `boost-1.90.0` RPM is built using GCC 15 (the current compiler in Fedora Rawhide) there are no libs built for Boost.Cobalt. When I experiment with building it with the GCC 16 package that will arrive in Rawhide some time next month, I get these extra files installed:

```
/usr/lib/debug/usr/lib64/libboost_cobalt.so.1.90.0-1.90.0-0.1.fc44.x86_64.debug
/usr/lib/debug/usr/lib64/libboost_cobalt_io.so.1.90.0-1.90.0-0.1.fc44.x86_64.debug
/usr/lib64/libboost_cobalt.so
/usr/lib64/libboost_cobalt.so.1.90.0
/usr/lib64/libboost_cobalt_io.so
/usr/lib64/libboost_cobalt_io.so.1.90.0
```

I assume this is because GCC 16 defaults to `-std=gnu++20` so supports C++20 coroutines by default, and GCC 15 only supports them if you use an extra option. But is that really the intended behaviour? Should building Boost automatically add `-std=gnu++20` when building Cobalt, so that it actually installs its libraries?

https://www.boost.org/doc/libs/1_90_0/libs/cobalt/doc/html/index.html#requirements says it's been tested with GCC 10, but says nothing about it not being supported out of the box and requiring additional steps to get the library binaries. Am I doing something wrong when building Boost? I'm just using the `./bootstrap.sh` and `b2` commands as recommended.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the reported ./bootstrap.sh and b2 build commands, comparing the GCC 15 and GCC 16 behavior described in the issue. Read the Boost.Cobalt requirements page and inspect how C++20 coroutine support affects library builds. Done means determining whether Cobalt libraries should build under GCC 15 by default and identifying the required build or documentation change.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
build-system
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.