Skip to content

ci: metrics (new, android) fails #4418

Closed

Description

@antonis

Description

metrics (new, android) fails on CI consistently due to undeclared uint8_t in hermes/Support/SHA1.h

[ 53%] Building CXX object lib/Support/CMakeFiles/hermesSupport.dir/SHA1.cpp.o
In file included from /home/runner/work/sentry-react-native/sentry-react-native/performance-tests/TestAppSentry/node_modules/react-native/sdks/hermes/lib/Support/SHA1.cpp:8:
/home/runner/work/sentry-react-native/sentry-react-native/performance-tests/TestAppSentry/node_modules/react-native/sdks/hermes/include/hermes/Support/SHA1.h:17:25: error: ‘uint8_t’ was not declared in this scope
   17 | using SHA1 = std::array<uint8_t, SHA1_NUM_BYTES>;
      |                         ^~~~~~~
/home/runner/work/sentry-react-native/sentry-react-native/performance-tests/TestAppSentry/node_modules/react-native/sdks/hermes/include/hermes/Support/SHA1.h:13:1: note: ‘uint8_t’ is defined in header ‘<cstdint>’; did you forget to ‘#include <cstdint>’?
[ 53%] Building CXX object lib/CMakeFiles/hermesOptimizer.dir/Optimizer/Scalar/InstructionEscapeAnalysis.cpp.o
[ 56%] Building CXX object lib/CMakeFiles/hermesOptimizer.dir/Optimizer/Scalar/TDZDedup.cpp.o
   12 | #include <string>
  +++ |+#include <cstdint>
   13 | 
/home/runner/work/sentry-react-native/sentry-react-native/performance-tests/TestAppSentry/node_modules/react-native/sdks/hermes/include/hermes/Support/SHA1.h:17:48: error: template argument 1 is invalid
   17 | using SHA1 = std::array<uint8_t, SHA1_NUM_BYTES>;
      |                                                ^
/home/runner/work/sentry-react-native/sentry-react-native/performance-tests/TestAppSentry/node_modules/react-native/sdks/hermes/include/hermes/Support/SHA1.h:19:32: error: ‘SHA1’ does not name a type
   19 | std::string hashAsString(const SHA1 &hash);
      |                                ^~~~
/home/runner/work/sentry-react-native/sentry-react-native/performance-tests/TestAppSentry/node_modules/react-native/sdks/hermes/lib/Support/SHA1.cpp:14:32: error: ‘SHA1’ does not name a type
   14 | std::string hashAsString(const SHA1 &hash) {
      |                                ^~~~
/home/runner/work/sentry-react-native/sentry-react-native/performance-tests/TestAppSentry/node_modules/react-native/sdks/hermes/lib/Support/SHA1.cpp: In function ‘std::string hermes::hashAsString(const int&)’:
/home/runner/work/sentry-react-native/sentry-react-native/performance-tests/TestAppSentry/node_modules/react-native/sdks/hermes/lib/Support/SHA1.cpp:19:44: error: invalid types ‘const int[unsigned int]’ for array subscript
   19 |     snprintf(buf + (i * 2), 3, "%02x", hash[i]);
      |                                            ^
gmake[3]: *** [lib/Support/CMakeFiles/hermesSupport.dir/build.make:277: lib/Support/CMakeFiles/hermesSupport.dir/SHA1.cpp.o] Error 1

Activity

  1. antonis commented on Jan 7, 2025

    @antonis
    ContributorAuthor

    Tested reverting the last change on main that seemed to trigger the issue (though #4412 was 🟢), but this did not help.
    The check on #4414 that touched the performance tests is also 🟢

  2. self-assigned this
    on Jan 8, 2025
  3. antonis commented on Jan 8, 2025

    @antonis
    ContributorAuthor

    I've tested the failing check on a PR that was 🟢 without merging new code from main. With exactly the same code the test that was passing has started failing.
    This may indicate a change in the CI environment has triggered the error. For example the 🟢 tests were on Ubuntu 22.04.5 LTS and the 🔴 ones on Ubuntu 24.04.1 LTS

  4. antonis commented on Jan 8, 2025

    @antonis
    ContributorAuthor

    Pinning the Ubuntu version with #4424 has indeed resolved the failure indicating that the upgrade of the build toolchain or the system libraries has triggered the build failure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions