crashpad icon indicating copy to clipboard operation
crashpad copied to clipboard

Formula for porting backtrace_crashpad to homebrew

Open shraddhaarora opened this issue 1 year ago • 9 comments

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

shraddhaarora avatar Oct 18 '23 18:10 shraddhaarora

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.

jviotti avatar Oct 18 '23 18:10 jviotti

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

rick-bt avatar Oct 18 '23 18:10 rick-bt

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

shraddhaarora avatar Oct 25 '23 11:10 shraddhaarora

@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!

gm4sl avatar Oct 30 '23 13:10 gm4sl

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

jviotti avatar Oct 30 '23 14:10 jviotti

@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

jviotti avatar Oct 30 '23 14:10 jviotti

@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 avatar Oct 31 '23 08:10 shraddhaarora

@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 avatar Oct 31 '23 08:10 shraddhaarora

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

shraddhaarora avatar Oct 31 '23 10:10 shraddhaarora