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

linux build using native SDK fails #92

Closed
MouhK opened this issue Nov 21, 2019 · 1 comment
Closed

linux build using native SDK fails #92

MouhK opened this issue Nov 21, 2019 · 1 comment

Comments

@MouhK
Copy link

MouhK commented Nov 21, 2019

Hi,

The linux native SDK doesn't seem to build crashpad on some Linux distribution. I'm not sure if
I should report it directly to crashpad but here is the thing.

My environment

  • Docker image ubuntu:bionic (also on debian stable)
  • clang++-6

Step to reproduce

  • Fetch latest ubuntu:bionic Docker image (or on debian stable)
  • make config=release sentry-crashpad
./crashpad/build/crashpad/snapshot/elf/elf_image_reader.cc:270:51: error: invalid use of non-static
      data member 'n_namesz'
  static_assert(sizeof(*type) >= sizeof(NhdrType::n_namesz),

This patch seems ok:

From 74e43a9d6bdf9a0ed55fd762bb688f153c33e149 Mon Sep 17 00:00:00 2001
From: Mouhamad Kebe <mouhamad.kebe@blade-group.com>
Date: Fri, 15 Nov 2019 11:56:31 +0100
Subject: [PATCH] linux: fix build

---
 crashpad/build/crashpad/snapshot/elf/elf_image_reader.cc | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/crashpad/build/crashpad/snapshot/elf/elf_image_reader.cc b/crashpad/build/crashpad/snapshot/elf/elf_image_reader.cc
index 7f6d7c7..1609c0e 100644
--- a/crashpad/build/crashpad/snapshot/elf/elf_image_reader.cc
+++ b/crashpad/build/crashpad/snapshot/elf/elf_image_reader.cc
@@ -267,11 +267,11 @@ ElfImageReader::NoteReader::Result ElfImageReader::NoteReader::ReadNote(
     NoteType* type,
     std::string* desc,
     VMAddress* desc_address) {
-  static_assert(sizeof(*type) >= sizeof(NhdrType::n_namesz),
+  NhdrType note_info;
+  static_assert(sizeof(*type) >= sizeof(note_info.n_namesz),
                 "Note field size mismatch");
   DCHECK_LT(current_address_, segment_end_address_);
 
-  NhdrType note_info;
   if (!segment_range_->Read(current_address_, sizeof(note_info), &note_info)) {
     return Result::kError;
   }
-- 
2.11.0

Thanks

@MouhK MouhK changed the title linux build using native SDK on Docker ubuntu:bionic linux build using native SDK fails Nov 21, 2019
@Swatinem
Copy link
Member

We do not currently support crashpad on linux.
Breakpad support is the priority for the next few weeks, after that, we might revisit crashpad support on linux.

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

No branches or pull requests

2 participants