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

mini_chromium requres C++20 header span.h #1115

Open
1 of 3 tasks
aokerholm-cobot opened this issue Jan 14, 2025 · 3 comments · May be fixed by #1118
Open
1 of 3 tasks

mini_chromium requres C++20 header span.h #1115

aokerholm-cobot opened this issue Jan 14, 2025 · 3 comments · May be fixed by #1118
Assignees

Comments

@aokerholm-cobot
Copy link

Description

I am unable to build with C++17 because my system lacks the span.h header file.
There is a reasonable substitute available here:
https://github.com/tcbrindle/span/blob/master/include/tcb/span.hpp
Copying this file to base/numerics/span.hpp and using quotes in base/numerics/byte_conversions.h solves the problem

When does the problem happen

  • During build
  • During run-time
  • When capturing a hard crash

Environment

  • OS: Ubuntu 22.04
  • Compiler: g++ 9.4.0-1ubuntu1~20.04.2
  • CMake version and config: [3.30.2, SENTRY_BACKEND=crashpad]

Steps To Reproduce

cmake --build build --parallel

Log output

In file included from /home/third-party/sentry-native/external/crashpad/util/misc/uuid.cc:31:
/home/third-party/sentry-native/external/crashpad/third_party/mini_chromium/mini_chromium/base/numerics/byte_conversions.h:12:10: fatal error: span: No such file or directory
12 | #include
| ^~~~~~
compilation terminated.
make[2]: *** [crashpad_build/util/CMakeFiles/crashpad_util.dir/build.make:328: crashpad_build/util/CMakeFiles/crashpad_util.dir/misc/uuid.cc.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [CMakeFiles/Makefile2:461: crashpad_build/util/CMakeFiles/crashpad_util.dir/all] Error 2
make: *** [Makefile:146: all] Error 2

@kahest
Copy link
Member

kahest commented Jan 14, 2025

Hey @aokerholm-cobot, thanks for reporting! I assume you're trying to use 0.7.18 with C++17, correct? If not, which SDK version are you using?

@aokerholm-cobot
Copy link
Author

Yes, I am using 0.7.18 with C++17

@getsantry getsantry bot moved this to Waiting for: Product Owner in GitHub Issues with 👀 3 Jan 16, 2025
@supervacuus
Copy link
Collaborator

Mea culpa. That was an oversight on my part that also none of our CI configs discovered since they all have <span>. While the file uses the base::span implementation inside mini_chromium and not std::span, a header-include survived, and compilers that don't have a C++20 <span> header will fail to compile. I also added CI runners that cover our bases against GCC 9.4.0.

You can try #1118 to see if it fixes the build issue. Again, I'm so sorry, and I'll release the fix soon.

@JoshuaMoelans JoshuaMoelans moved this from Needs Discussion to In Progress in Mobile & Cross Platform SDK Jan 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: No status
Status: In Progress
Development

Successfully merging a pull request may close this issue.

3 participants