Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUILD] include <cstdint> #2230

Merged
merged 1 commit into from
Jul 12, 2023

Conversation

dbolduc
Copy link
Contributor

@dbolduc dbolduc commented Jul 11, 2023

We have a build that uses opentelemetry-cpp with C++20. It failed to compile the latest release (v1.10.0).
full log.

[11/66] Building CXX object sdk/src/metrics/CMakeFiles/opentelemetry_metrics.dir/data/circular_buffer.cc.o
FAILED: sdk/src/metrics/CMakeFiles/opentelemetry_metrics.dir/data/circular_buffer.cc.o 
/usr/bin/c++ -DHAVE_ABSEIL -Dopentelemetry_metrics_EXPORTS -I/var/tmp/build/api/include -I/var/tmp/build/sdk/include -I/var/tmp/build/sdk -I/var/tmp/build/ext/include -O3 -DNDEBUG -std=gnu++20 -fPIC -Wno-error=deprecated-declarations -MD -MT sdk/src/metrics/CMakeFiles/opentelemetry_metrics.dir/data/circular_buffer.cc.o -MF sdk/src/metrics/CMakeFiles/opentelemetry_metrics.dir/data/circular_buffer.cc.o.d -o sdk/src/metrics/CMakeFiles/opentelemetry_metrics.dir/data/circular_buffer.cc.o -c /var/tmp/build/sdk/src/metrics/data/circular_buffer.cc
In file included from /var/tmp/build/sdk/src/metrics/data/circular_buffer.cc:4:
/var/tmp/build/sdk/include/opentelemetry/sdk/metrics/data/circular_buffer.h:44:32: error: 'uint64_t' has not been declared
   44 |   void Increment(size_t index, uint64_t count);
      |                                ^~~~~~~~
/var/tmp/build/sdk/include/opentelemetry/sdk/metrics/data/circular_buffer.h:52:3: error: 'uint64_t' does not name a type
   52 |   uint64_t Get(size_t index) const;
      |   ^~~~~~~~
/var/tmp/build/sdk/include/opentelemetry/sdk/metrics/data/circular_buffer.h:9:1: note: 'uint64_t' is defined in header '<cstdint>'; did you forget to '#include <cstdint>'?
    8 | #include <limits>
  +++ |+#include <cstdint>
    9 | #include <vector>

Our build command is something like:
https://github.com/googleapis/google-cloud-cpp/blob/8c960f3f9cd862f20888a610f4c07920bb57d4c5/ci/cloudbuild/dockerfiles/fedora-37-cxx20.Dockerfile#L183-L195

@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Jul 11, 2023

CLA Signed

The committers listed above are authorized under a signed CLA.

  • ✅ login: dbolduc / name: Darren Bolduc (c82d669)

@dbolduc dbolduc marked this pull request as ready for review July 11, 2023 23:48
@dbolduc dbolduc requested a review from a team July 11, 2023 23:48
Copy link
Contributor

@ThomsonTan ThomsonTan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the fix.

@codecov
Copy link

codecov bot commented Jul 12, 2023

Codecov Report

Merging #2230 (c82d669) into main (ca8c234) will decrease coverage by 0.02%.
The diff coverage is n/a.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #2230      +/-   ##
==========================================
- Coverage   87.31%   87.29%   -0.02%     
==========================================
  Files         169      169              
  Lines        4901     4901              
==========================================
- Hits         4279     4278       -1     
- Misses        622      623       +1     
Impacted Files Coverage Δ
...e/opentelemetry/sdk/metrics/data/circular_buffer.h 100.00% <ø> (ø)

... and 1 file with indirect coverage changes

@marcalff marcalff merged commit d99cbab into open-telemetry:main Jul 12, 2023
@marcalff marcalff changed the title fix: include <cstdint> [BUILD] include <cstdint> Jul 12, 2023
@dbolduc dbolduc deleted the fix-cmake-include-cstdint branch July 14, 2023 04:33
@dbolduc
Copy link
Contributor Author

dbolduc commented Jul 14, 2023

Does this fix warrant a v1.10.1 patch release?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants