[FreeBSD-Announce] FreeBSD Errata Notice FreeBSD-EN-21:18.libc++

FreeBSD Errata Notices errata-notices at freebsd.org
Wed Jun 30 06:42:18 UTC 2021

Hash: SHA512

FreeBSD-EN-21:18.libc++                                         Errata Notice
                                                          The FreeBSD Project

Topic:          Missing C++20 headers in libc++

Category:       contrib
Module:         libc++
Announced:      2021-06-29
Affects:        FreeBSD 13.0
Corrected:      2021-06-03 18:53:18 UTC (stable/13, 13.0-STABLE)
                2021-06-29 17:08:58 UTC (releng/13.0, 13.0-RELEASE-p3)

For general information regarding FreeBSD Errata Notices and Security
Advisories, including descriptions of the fields above, security
branches, and the following sections, please visit

I.   Background

libc++ is an implementation of the C++ Standard Library, provided by the
LLVM project. It is used by C++ programs in the base system, and also by
many C++ programs in the ports collection. 

II.  Problem Description

The LLVM project components in the base system, including libc++, were
(2020-07-31) upgraded to upstream version 11.0.0. Among other features,
improvements were made to libc++ to better support the C++20 standard. This
also included a number of new Standard Library headers, but these were
missed during the upgrade and not installed into the base system, in

* <barrier>
* <concepts>
* <execution>
* <latch>
* <numbers>
* <semaphore>

III. Impact

Even though clang and libc++ 11.0.0 have much improved support for the
C++20 standard, it is not possible to build programs using the standard
headers listed above, because they are not available in the base system.

IV.  Workaround

No workaround is available.

V.   Solution

Upgrade your system to a supported FreeBSD stable or release / security
branch (releng) dated after the correction date.

Perform one of the following:

1) To update your system via a binary patch:

Systems running a RELEASE version of FreeBSD on the amd64, i386, or
(on FreeBSD 13 and later) arm64 platforms can be updated via the
freebsd-update(8) utility:

# freebsd-update fetch
# freebsd-update install

2) To update your system via a source code patch:

The following patches have been verified to apply to the applicable
FreeBSD release branches.

a) Download the relevant patch from the location below, and verify the
detached PGP signature using your PGP utility.

# fetch https://security.FreeBSD.org/patches/EN-21:18/libc++.patch
# fetch https://security.FreeBSD.org/patches/EN-21:18/libc++.patch.asc
# gpg --verify libc++.patch.asc

b) Apply the patch.  Execute the following commands as root:

# cd /usr/src
# patch < /path/to/patch

c) Recompile the operating system using buildworld and installworld as
described in <URL:https://www.FreeBSD.org/handbook/makeworld.html>.

VI.  Correction details

This issue is corrected by the corresponding Git commit hash or Subversion
revision number in the following stable and release branches:

Branch/path                             Hash                     Revision
- -------------------------------------------------------------------------
stable/13/                              70e13c4cffd5    stable/13-n245875
releng/13.0/                            dac086497e50  releng/13.0-n244747
- -------------------------------------------------------------------------

Run the following command to see which files were modified by a
particular commit:

# git show --stat <commit hash>

Or visit the following URL, replacing NNNNNN with the hash:


To determine the commit count in a working tree (for comparison against
nNNNNNN in the table above), run:

# git rev-list --count --first-parent HEAD

VII. References



The latest revision of this advisory is available at


More information about the freebsd-announce mailing list