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

cxx17 compat #1109

Closed
1 of 3 tasks
jwinarske opened this issue Dec 23, 2024 · 1 comment
Closed
1 of 3 tasks

cxx17 compat #1109

jwinarske opened this issue Dec 23, 2024 · 1 comment

Comments

@jwinarske
Copy link
Contributor

jwinarske commented Dec 23, 2024

Description

No longer builds with cxx17 due to mini_chromium.

Sentry crashpad needs to use the mini_chromium cxx17 branch.

When does the problem happen

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

Environment

  • OS: Ubuntu 20
  • Compiler: Clang 10
  • CMake version and config: 3.27.9

Steps To Reproduce

Log output

local: CC = /usr/bin/clang
local: CXX = /usr/bin/clang++
cwd:  /home/tcna/workspace-automation/app/sentry-native/cmake-build-debug
cmd: ['cmake', '/home/tcna/workspace-automation/app/sentry-native', '-D', 'SENTRY_BUILD_TESTS=OFF', '-D', 'SENTRY_BUILD_EXAMPLES=OFF', '-D', 'SENTRY_BUILD_FORCE32=OFF', '-DCMAKE_STAGING_PREFIX=/home/tcna/workspace-automation/app/sentry-native/cmake-build-debug/staging/debug', '-DCMAKE_BUILD_TYPE=Debug']
-- SENTRY_TRANSPORT=curl
-- SENTRY_BACKEND=crashpad
-- SENTRY_LIBRARY_TYPE=SHARED
-- SENTRY_SDK_NAME=
-- Configuring done (0.1s)
-- Generating done (0.0s)
-- Build files have been written to: /home/tcna/workspace-automation/app/sentry-native/cmake-build-debug
cmd: ['make', '-j']
[  1%] Built target crashpad_compat
[  1%] Building CXX object crashpad_build/tools/CMakeFiles/crashpad_tools.dir/tool_support.cc.o
[  1%] Building CXX object crashpad_build/third_party/mini_chromium/CMakeFiles/mini_chromium.dir/mini_chromium/base/rand_util.cc.o
[  1%] Building CXX object crashpad_build/third_party/mini_chromium/CMakeFiles/mini_chromium.dir/mini_chromium/base/strings/strcat.cc.o
In file included from /home/tcna/workspace-automation/app/sentry-native/external/crashpad/tools/tool_support.cc:21:
In file included from /home/tcna/workspace-automation/app/sentry-native/external/crashpad/third_party/mini_chromium/mini_chromium/base/containers/heap_array.h:15:
/home/tcna/workspace-automation/app/sentry-native/external/crashpad/third_party/mini_chromium/mini_chromium/base/containers/span.h:1303:19: error: member reference base type 'span' is not a structure or union
  return span(lit).template first<N - 1>();
         ~~~~~~~~~^         ~~~~~
In file included from /home/tcna/workspace-automation/app/sentry-native/external/crashpad/third_party/mini_chromium/mini_chromium/base/containers/span.h/home/tcna/workspace-automation/app/sentry-native/external/crashpad/third_party/mini_chromium/mini_chromium/base/strings/strcat.cc::13215::
28In file included from :/home/tcna/workspace-automation/app/sentry-native/external/crashpad/third_party/mini_chromium/mini_chromium/base/strings/strcat.h :10:
error: /home/tcna/workspace-automation/app/sentry-native/external/crashpad/third_party/mini_chromium/mini_chromium/base/containers/span.h:1303member reference base type 'span' is not a structure or union:19
: error: member reference base type 'span' is not a structure or union
  return as_bytes(span(lit).template first<N - 1>());
                  ~~~~~~~~~^         ~~~~~
  return span(lit).template first<N - 1>();
         ~~~~~~~~~^         ~~~~~
In file included from /home/tcna/workspace-automation/app/sentry-native/external/crashpad/third_party/mini_chromium/mini_chromium/base/rand_util.cc:5:
In file included from /home/tcna/workspace-automation/app/sentry-native/external/crashpad/third_party/mini_chromium/mini_chromium/base/rand_util.h:12:
/home/tcna/workspace-automation/app/sentry-native/external/crashpad/third_party/mini_chromium/mini_chromium/base/containers/span.h:1303:19: error: member reference base type 'span' is not a structure or union
  return span(lit).template first<N - 1>();/home/tcna/workspace-automation/app/sentry-native/external/crashpad/third_party/mini_chromium/mini_chromium/base/containers/span.h
:1321         ~~~~~~~~~^         ~~~~~:
28: error: member reference base type 'span' is not a structure or union
  return as_bytes(span(lit).template first<N - 1>());
                  ~~~~~~~~~^         ~~~~~
/home/tcna/workspace-automation/app/sentry-native/external/crashpad/third_party/mini_chromium/mini_chromium/base/containers/span.h:1321:28: error: member reference base type 'span' is not a structure or union
  return as_bytes(span(lit).template first<N - 1>());
                  ~~~~~~~~~^         ~~~~~
2 errors generated.
@supervacuus
Copy link
Collaborator

This is a duplicate of #1041.

The cxx17 branch of mini_chromium hasn't been updated since January 2024. Upstream updated their refs beyond the state of cxx17, so we also updated them.

I am unsure if maintaining the ref to cxx17 is the right way forward since it doesn't seem Google maintains it alongside main.

In any case, let's discuss further aspects on #1041.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Status: Done
Development

No branches or pull requests

2 participants