-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Add breakpad recipe #5639
Add breakpad recipe #5639
Conversation
recipes/breakpad/all/conanfile.py
Outdated
if self.settings.os == "Linux": | ||
self.requires("linux-syscall-support/cci.20200813") | ||
|
||
def _patch_sources(self): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll make this a .patch
once the PR is ready.
recipes/breakpad/all/conanfile.py
Outdated
"#include <linux_syscall_support.h>" | ||
) | ||
|
||
# Let Conan handle fPIC |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this something we want? Or should we assume that it is hardcoded "for a reason" and don't mess with it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is hardcoded so users don't have to change anything to use it in a shared library.
tools.rmdir(os.path.join(self.package_folder, "share")) | ||
tools.rmdir(os.path.join(self.package_folder, "lib", "pkgconfig")) | ||
|
||
def package_info( self ): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some help is needed here. sentry-native
consumes this package using pkgConfig
, but I'm not familiar with that system, so I don't know how to model it on Conan.
https://github.com/getsentry/sentry-native/blob/master/CMakeLists.txt#L439
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll fork this recipe and open a pr with some fixes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it would be interesting to create a sentry-breakpad
recipe (such as I'm doing for sentry-crashpad
), to see what components are needs to interface it with sentry-native
.
This comment has been minimized.
This comment has been minimized.
recipes/breakpad/all/conanfile.py
Outdated
if self.settings.os == "Linux": | ||
self._patch_sources() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's okay to always patch?
if self.settings.os == "Linux": | |
self._patch_sources() | |
self._patch_sources() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All the changes are Linux specific, but since the paths to the files are hardcored, E.g. src/client/linux/minidump_writer/line_reader.h
I don't know if Windows will take them (doesn't it use \
instead of /
for the folder separation?)
Besides I was planning on make this a real patch file once it the PR is stable.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed.
I don't think the autotools build system was written with support for Windows built-in.
I think we should raise a ConanInvalidConfiguration
for win.
I don't have a clue what to do with Macos. Throwing an exception would be fine for me too.
tools.rmdir(os.path.join(self.package_folder, "share")) | ||
tools.rmdir(os.path.join(self.package_folder, "lib", "pkgconfig")) | ||
|
||
def package_info( self ): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll fork this recipe and open a pr with some fixes.
recipes/breakpad/all/conanfile.py
Outdated
return "source_subfolder" | ||
|
||
def config_options(self): | ||
if self.settings.os == "Windows": |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does it build on Windows?
I tried to build it with gyp
, but I couldn't get it working.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No idea :)
recipes/breakpad/all/conanfile.py
Outdated
"#include <linux_syscall_support.h>" | ||
) | ||
|
||
# Let Conan handle fPIC |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is hardcoded so users don't have to change anything to use it in a shared library.
This comment has been minimized.
This comment has been minimized.
Co-authored-by: Anonymous Maarten <madebr@users.noreply.github.com>
Co-authored-by: Anonymous Maarten <madebr@users.noreply.github.com>
I'm wondering why the test_package fails to run on Macos
I'm so smart |
This comment has been minimized.
This comment has been minimized.
|
||
def test(self): | ||
if not tools.cross_building(self.settings): | ||
bin_path = os.path.join("bin", "test_package") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This one does not need to use the binaries in the bin
package folder? (as the crashpad test package does?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think everything in bin
are tools.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yup. I was asking whether breakpad has a handler binary, such as crashpad.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nop. Breakpad is easier to use since you just link the library to your app. No need to ship an extra handler.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does not match this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@prince-chrismc
breakpad ships utility executables to examine stacktraces post-crash, but no crashpad_handler
-like executable that must be executed in parallel with the victim-executable.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ahhhhhh thank you for explaining
I've opened ericriff#6 A recipe for sentry-breakpad can be found at https://github.com/madebr/conan-center-index/tree/sentry_breakpad |
Thanks for the help with the components part! |
This is the build script by sentry. It only builds the client library. See https://github.com/madebr/conan-center-index/tree/sentry_breakpad The autotools build script by google only supports Linux. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
744cc38
to
1a29542
Compare
I cleaned up the recipe to remove all the OS checks since it is now Linux only, here e701de9 I can revert the commit if you think there is some value on keeping that around for the future. |
This comment has been minimized.
This comment has been minimized.
All green in build 9 (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Little contradiction, I flagged lines/converstation in question
bindir = os.path.join(self.package_folder, "bin") | ||
self.output.info("Appending PATH environment variable: {}".format(bindir)) | ||
self.env_info.PATH.append(bindir) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This
|
||
def test(self): | ||
if not tools.cross_building(self.settings): | ||
bin_path = os.path.join("bin", "test_package") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does not match this
@madebr Since you are dependant on this PR you can review it 😝 |
* Add breakpad recipe * Build test_package with CXX 11 * Use 2 spaces to indent Co-authored-by: Anonymous Maarten <madebr@users.noreply.github.com> * Use double quotes and specify 'provides' Co-authored-by: Anonymous Maarten <madebr@users.noreply.github.com> * breakpad: add components * Raise if os != Linux * Cleanup recipe since it is Linux only * Move source patching to actual patch files Co-authored-by: Anonymous Maarten <madebr@users.noreply.github.com> Co-authored-by: Anonymous Maarten <anonymous.maarten@gmail.com>
Specify library name and version: breakpad/cci.20210521
This is the last missing requirement of
sentry-native
. https://github.com/conan-io/conan-center-index/blob/master/recipes/sentry-native/all/conanfile.py#L66Some help is required around the
components/cpp_info
part since this library only providespkg config
files and I'm not familiar with it, so I'm not sure about how to model it on Conan.CC: @madebr
conan-center hook activated.