Skip to content

Commit bd11434

Browse files
authored
[REMOVAL] Drop C++11 support (#2342)
1 parent c3c643a commit bd11434

File tree

9 files changed

+23
-178
lines changed

9 files changed

+23
-178
lines changed

.github/workflows/ci.yml

-95
Original file line numberDiff line numberDiff line change
@@ -28,43 +28,6 @@ jobs:
2828
run: |
2929
./ci/do_ci.sh cmake.test
3030
31-
#
32-
# This build uses the latest libraries compatible
33-
# with C++11
34-
#
35-
cmake_gcc_maintainer_cpp11_async_test:
36-
name: CMake gcc 12 (maintainer mode, C++11, async)
37-
runs-on: ubuntu-latest
38-
steps:
39-
- uses: actions/checkout@v4
40-
with:
41-
submodules: 'recursive'
42-
- name: setup
43-
env:
44-
CC: /usr/bin/gcc-12
45-
CXX: /usr/bin/g++-12
46-
GOOGLETEST_VERSION: 1.12.1
47-
PROTOBUF_VERSION: 21.12
48-
run: |
49-
sudo -E ./ci/setup_cmake.sh
50-
sudo -E ./ci/setup_ci_environment.sh
51-
sudo -E ./ci/install_protobuf.sh
52-
- name: run cmake gcc (maintainer mode, C++11, async)
53-
env:
54-
CC: /usr/bin/gcc-12
55-
CXX: /usr/bin/g++-12
56-
run: |
57-
./ci/do_ci.sh cmake.maintainer.cpp11.async.test
58-
- name: generate test cert
59-
env:
60-
CFSSL_VERSION: 1.6.3
61-
run: |
62-
sudo -E ./tools/setup-cfssl.sh
63-
(cd ./functional/cert; ./generate_cert.sh)
64-
- name: run func test
65-
run: |
66-
(cd ./functional/otlp; ./run_test.sh)
67-
6831
cmake_gcc_maintainer_sync_test:
6932
name: CMake gcc 12 (maintainer mode, sync)
7033
runs-on: ubuntu-latest
@@ -290,64 +253,6 @@ jobs:
290253
- name: run cmake tests (enable opentracing-shim)
291254
run: ./ci/do_ci.sh cmake.opentracing_shim.test
292255

293-
cmake_gcc_48_test:
294-
name: CMake gcc 4.8 (without otlp exporter)
295-
runs-on: ubuntu-20.04
296-
steps:
297-
- uses: actions/checkout@v4
298-
with:
299-
submodules: 'recursive'
300-
- name: Add Ubuntu Xenial package sources
301-
run: |
302-
sudo apt-add-repository 'deb http://archive.ubuntu.com/ubuntu/ xenial main'
303-
sudo apt-add-repository 'deb http://archive.ubuntu.com/ubuntu/ xenial universe'
304-
- name: setup
305-
run: |
306-
sudo ./ci/setup_ci_environment.sh
307-
sudo ./ci/install_gcc48.sh
308-
- name: setup cmake
309-
env:
310-
CC: /usr/bin/gcc-4.8
311-
CXX: /usr/bin/g++-4.8
312-
GOOGLETEST_VERSION: 1.10.0
313-
run: |
314-
sudo -E ./ci/setup_cmake.sh
315-
- name: run tests
316-
env:
317-
CC: /usr/bin/gcc-4.8
318-
CXX: /usr/bin/g++-4.8
319-
CXX_STANDARD: '11'
320-
run: ./ci/do_ci.sh cmake.legacy.test
321-
322-
cmake_gcc_48_otlp_exporter_test:
323-
name: CMake gcc 4.8 (with otlp exporter)
324-
runs-on: ubuntu-20.04
325-
steps:
326-
- uses: actions/checkout@v4
327-
with:
328-
submodules: 'recursive'
329-
- name: Add Ubuntu Xenial package sources
330-
run: |
331-
sudo apt-add-repository 'deb http://archive.ubuntu.com/ubuntu/ xenial main'
332-
sudo apt-add-repository 'deb http://archive.ubuntu.com/ubuntu/ xenial universe'
333-
- name: setup
334-
run: |
335-
sudo ./ci/setup_ci_environment.sh
336-
sudo ./ci/install_gcc48.sh
337-
- name: setup cmake and grpc
338-
env:
339-
CC: /usr/bin/gcc-4.8
340-
CXX: /usr/bin/g++-4.8
341-
GOOGLETEST_VERSION: 1.10.0
342-
run: |
343-
sudo -E ./ci/setup_cmake.sh
344-
sudo -E ./ci/setup_grpc.sh -v 4.8
345-
- name: run tests
346-
env:
347-
CC: /usr/bin/gcc-4.8
348-
CXX: /usr/bin/g++-4.8
349-
run: ./ci/do_ci.sh cmake.legacy.exporter.otprotocol.test
350-
351256
cmake_test_cxx14_gcc:
352257
name: CMake C++14 test(GCC)
353258
runs-on: ubuntu-20.04

CHANGELOG.md

+8-2
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,13 @@ Increment the:
2020
* [EXPORTER] Remove explicit timestamps from metric points exported by Prometheus
2121
[#2324](https://github.com/open-telemetry/opentelemetry-cpp/pull/2324)
2222
* [EXPORTER] Handle attribute key collisions caused by sanitation
23-
[#2324](https://github.com/open-telemetry/opentelemetry-cpp/pull/2326)
23+
[#2326](https://github.com/open-telemetry/opentelemetry-cpp/pull/2326)
2424
* [EXPORTER] Replace colons with underscores when converting to Prometheus label
25-
[#2324](https://github.com/open-telemetry/opentelemetry-cpp/pull/2330)
25+
[#2330](https://github.com/open-telemetry/opentelemetry-cpp/pull/2330)
2626
* [API] Add InstrumentationScope attributes in MeterProvider::GetMeter()
2727
[#2224](https://github.com/open-telemetry/opentelemetry-cpp/pull/2224)
28+
* [REMOVAL] Drop C++11 support
29+
[#2342](https://github.com/open-telemetry/opentelemetry-cpp/pull/2342)
2830

2931
Important changes:
3032

@@ -59,6 +61,10 @@ Breaking changes:
5961
* Applications that set neither CMAKE_CXX_STANDARD nor -stdc++
6062
options may need to provide a C++ standard in their makefiles.
6163

64+
* [REMOVAL] Drop C++11 support
65+
[#2342](https://github.com/open-telemetry/opentelemetry-cpp/pull/2342)
66+
* Building with C++11 is no longer supported.
67+
6268
## [1.11.0] 2023-08-21
6369

6470
* [BUILD] Fix more cases for symbol name for 32-bit win32 DLL build

DEPRECATED.md

+1-60
Original file line numberDiff line numberDiff line change
@@ -30,66 +30,7 @@ N/A
3030

3131
## [Compilers]
3232

33-
### Drop C++11 support
34-
35-
#### Announcement (C++11)
36-
37-
* Date: 2022-12-01
38-
* Issue: [DEPRECATION] Drop C++11 support
39-
[#1830](https://github.com/open-telemetry/opentelemetry-cpp/pull/1830)
40-
* This announcement has been pinned,
41-
visible in the issues pages since December 2022.
42-
43-
#### Motivation (C++11)
44-
45-
This repository, opentelemetry-cpp, supports a "bring your own dependency" model.
46-
47-
In this model,
48-
the build scripts can be configured to:
49-
50-
* pick a given version for a third party library,
51-
* build opentelemetry-cpp with the library given.
52-
53-
The makefiles do not mandate to use a particular version,
54-
hence the "bring your own" denomination.
55-
56-
To have an up to date build, projects are encouraged to use up to date
57-
versions of third party libraries, to benefit from bug fixes.
58-
59-
Now, many libraries deliver new versions that require C++14, bug fixes
60-
releases for C++11 are no longer available.
61-
62-
In particular, the following components:
63-
64-
* GRPC C++
65-
* abseil
66-
* googletest
67-
68-
now require C++14, per
69-
[google support policies](https://github.com/google/oss-policies-info/blob/main/foundational-cxx-support-matrix.md)
70-
71-
As a result, to stay up to date, opentelemetry-cpp needs to upgrade its
72-
minimum build requirements to use C++14 instead of C++11.
73-
74-
#### Scope (C++11)
75-
76-
Continuous Integration (CI) builds will use C++14 instead of C++11.
77-
78-
The CI build for gcc 4.8 is now deprecated, to be decommissioned when C++11
79-
support is dropped.
80-
81-
#### Mitigation (C++11)
82-
83-
Building the code with recent third party libraries will require C++14
84-
instead of C++11.
85-
86-
#### Planned end of life (C++11)
87-
88-
Support for C++11 in opentelemetry-cpp will end on September 2023.
89-
90-
After this date, opentelemetry-cpp may still build properly in C++11 mode,
91-
assuming a suitable, old, version for each dependency is used,
92-
but the C++11 build will no longer be tested for each new release.
33+
N/A
9334

9435
## [Third party dependencies]
9536

INSTALL.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ You can link OpenTelemetry C++ SDK with libraries provided in
1616

1717
- A supported platform (e.g. Windows, macOS or Linux). Refer to [Platforms
1818
Supported](./README.md#supported-development-platforms) for more information.
19-
- A compatible C++ compiler supporting at least C++11. Major compilers are
19+
- A compatible C++ compiler supporting at least C++14. Major compilers are
2020
supported. Refer to [Supported Compilers](./README.md#supported-c-versions)
2121
for more information.
2222
- [Git](https://git-scm.com/) for fetching opentelemetry-cpp source code from
@@ -158,7 +158,7 @@ path.
158158

159159
- A supported platform (e.g. Windows, macOS or Linux). Refer to [Platforms
160160
Supported](./README.md#supported-development-platforms) for more information.
161-
- A compatible C++ compiler supporting at least C++11. Major compilers are
161+
- A compatible C++ compiler supporting at least C++14. Major compilers are
162162
supported. Refer to [Supported Compilers](./README.md#supported-c-versions) for
163163
more information.
164164
- [Git](https://git-scm.com/) for fetching opentelemetry-cpp source code from

README.md

+6-13
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,8 @@ repo.
2222
Code shipped from this repository generally supports the following versions of
2323
C++ standards:
2424

25-
* ISO/IEC 14882:2011 (C++11, C++0x)
26-
* ISO/IEC 14882:2014 (C++14, C++1y)
27-
* ISO/IEC 14882:2017 (C++17, C++1z)
25+
* ISO/IEC 14882:2014 (C++14)
26+
* ISO/IEC 14882:2017 (C++17)
2827
* ISO/IEC 14882:2020 (C++20)
2928

3029
Any exceptions to this are noted in the individual `README.md` files.
@@ -39,19 +38,13 @@ of the current project.
3938

4039
| Platform | Build type |
4140
|---------------------------------------------------------------------|---------------|
42-
| ubuntu-22.04 (GCC - 10, 12) | CMake, Bazel |
43-
| ubuntu-20.04 (GCC 4.8 with -std=c++11 flag) | CMake [1] |
44-
| ubuntu-20.04 (GCC 9.4.0) | CMake, Bazel |
45-
| ubuntu-20.04 (Default GCC Compiler - 9.4.0 with -std=c++20 flags) | CMake, Bazel |
46-
| macOS 12.0 (Xcode 14.2) | Bazel |
41+
| ubuntu-22.04 (GCC 10, GCC 12, Clang 14) | CMake, Bazel |
42+
| ubuntu-20.04 (GCC 9.4.0 - default compiler) | CMake, Bazel |
43+
| ubuntu-20.04 (GCC 9.4.0 with -std=c++14/17/20 flags) | CMake, Bazel |
44+
| macOS 12.7 (Xcode 14.2) | Bazel |
4745
| Windows Server 2019 (Visual Studio Enterprise 2019) | CMake, Bazel |
4846
| Windows Server 2022 (Visual Studio Enterprise 2022) | CMake |
4947

50-
[1]: Bazel build is disabled for GCC 4.8, as gRPC library 1.38 and above
51-
(required by OTLP exporter) don't build with this compiler. See gRPC [official
52-
support](https://grpc.io/docs/#official-support) document. CMake build doesn't
53-
build OTLP exporter with GCC 4.8.
54-
5548
In general, the code shipped from this repository should build on all platforms
5649
having C++ compiler with [supported C++ standards](#supported-c-versions).
5750

docs/building-with-stdlib.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ API surface classes with [Abseil classes](https://abseil.io/) instead of
1919

2020
* ABI stability: scenario where different modules are compiled with different
2121
compiler and incompatible standard library.
22-
* backport of C++17 and above features to C++11 compiler.
22+
* backport of C++17 and above features to C++14 compiler.
2323

2424
The need for custom `nostd` classes is significantly diminished when the SDK is
2525
compiled with C++17 or above compiler. Only `std::span` needs to be backported.
@@ -137,9 +137,9 @@ Visual Studio provides 1st class debug experience for the standard library.
137137

138138
Supported build flavors:
139139

140-
* `nostd` - OpenTelemetry backport of classes for C++11. Not using standard lib.
140+
* `nostd` - OpenTelemetry backport of classes for C++14. Not using standard lib.
141141
* `stdlib` - Standard Library.
142-
Native experience with C++11/C++14/C++17/C++20/C++23 compiler.
142+
Native experience with C++14/C++17/C++20/C++23 compiler.
143143
Depending on the stdlib level in effect,
144144
C++ features are used from the standard library,
145145
completed with `nostd` replacement implementations.

docs/dependencies.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ Both these dependencies are listed here:
2727
compiler if cmake option `WITH_STL` is enabled
2828
or macro `OPENTELEMETRY_STL_VERSION` is defined.
2929
License: `GNU General Public License`
30-
- For C++11/14/17 compilers, fallback to gsl::span if [GSL C++
30+
- For C++14/17 compilers, fallback to gsl::span if [GSL C++
3131
library](https://github.com/microsoft/GSL) is installed. License: `MIT
3232
License`
3333
- libc++ 14.0.0 do not support construct std::span from a range or container

docs/google-test.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ this, Google Test also allows us to easily integrate code coverage tools such as
9393
## Integration and Usage
9494

9595
One of the base requirements to build and use Google Test from a source package
96-
are to use either Bazel or CMake; the other is a C++11-standard-compliant
96+
are to use either Bazel or CMake; the other is a C++14-standard-compliant
9797
compiler like GCC or Clang.
9898

9999
### Bazel

docs/public/api/Overview.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Library design
1515
--------------
1616

1717
The OpenTelemetry C++ API is provided as a header-only library and
18-
supports all recent versions of the C++ standard, down to C++11.
18+
supports all recent versions of the C++ standard, down to C++14.
1919

2020
A single application might dynamically or statically link to different
2121
libraries that were compiled with different compilers, while several of

0 commit comments

Comments
 (0)