backtrace-labs / crashpad

A fork of Crashpad with file attachment support and other improvements.
Apache License 2.0
99 stars 33 forks source link

Formula for porting backtrace_crashpad to homebrew #47

Open shraddhaarora opened 1 year ago

shraddhaarora commented 1 year ago

Hi @rick-bt , we have worked on a basic formula for porting backtrace_crashpad to homebrew but we would appreciate your feedback before going forward and sending a PR to homebrew.

You can try building it on your system: https://gist.github.com/jviotti/ba790598c0fb880616d18b21047f8246

We want to start simple, however, in near future, we want to extend the formula to have iOS support. It'd also be appreciated if you supported minidump_stackwalk too.

Another query we have is, what format of includes do you prefer? #include <crashpad/client/crashpad_client.h> OR #include <backtrace/crashpad/client/crashpad_client.h>

cc: @jviotti

jviotti commented 1 year ago

Thanks for posting this @shraddhaarora ! @rick-bt I think you guys are way more experienced than us on building Crashpad (given you completely ported it to CMake while we happily consumed it from Chromium 😅 ) so any feedback would be hugely appreciated.

rick-bt commented 1 year ago

Rock on - love the collab! We're under a bit of pressure at the moment, but we'll grok & respond when possible.

shraddhaarora commented 1 year ago

Hi @rick-bt, did you get the time to skim through the formula?

gm4sl commented 1 year ago

@shraddhaarora I would stick with the crashpad/client/crashpad_client.h to make it easier to swap any code between the official Crashpad repository and the backtrace-labs fork. In other words, leave off the backtrace/ prefix

The instructions in the gist don't work due to a missing cd into the build folder. What is there:

mkdir build
cmake ..
make

should be

mkdir build
cd build
cmake ..
make

or similar. This can probably be reduced further by specifying the build folder to cmake, etc.

Other than that, looks good. Thank you!

jviotti commented 1 year ago

I updated the Gist with the missing cd build. Thanks for the heads up!

jviotti commented 1 year ago

@shraddhaarora Looks like you are good to go to try to upstream it into Homebrew! Maybe keep the people in this thread on the discussion (and link it to this) so we have the right context in case questions pop up

shraddhaarora commented 1 year ago

@shraddhaarora I would stick with the crashpad/client/crashpad_client.h to make it easier to swap any code between the official Crashpad repository and the backtrace-labs fork. In other words, leave off the backtrace/ prefix

Makes sense!

shraddhaarora commented 1 year ago

@shraddhaarora Looks like you are good to go to try to upstream it into Homebrew! Maybe keep the people in this thread on the discussion (and link it to this) so we have the right context in case questions pop up

Yes, I'll update this thread with the link of the PR on homebrew

shraddhaarora commented 1 year ago

This is the link to the Homebrew PR: https://github.com/Homebrew/homebrew-core/pull/152908