-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
sentry-crashpad: add sentry-crashpad recipe #5536
Conversation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
I don't really understand why a new recipe is required. It's sentry-native with vendored crashpad, correct? It could live in #5524. |
Do we still need this since the other two related PRs were merged? |
This fork provides features that the original does not, such as attachments. |
I'm the third person asking the same... 😅 This recipe is downloading the same sources as |
It makes more sense. The unix philosophy is to let something do one and only one thing. Don't complicate things by mixing. The downside is that every Extra reason to add it as a separate recipe: |
We will need the qt option added here then: #5440 |
Why's that? Sorry, I misunderstood. Yes, the |
This comment has been minimized.
This comment has been minimized.
handler_exe = "crashpad_handler.exe" if self.settings.os == "Windows" else "crashpad_handler" | ||
handler_bin_path = os.path.join(self.deps_cpp_info["sentry-crashpad"].rootpath, "bin", handler_exe) |
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.
handler_exe = "crashpad_handler.exe" if self.settings.os == "Windows" else "crashpad_handler" | |
handler_bin_path = os.path.join(self.deps_cpp_info["sentry-crashpad"].rootpath, "bin", handler_exe) | |
handler_exe = "crashpad_handler.exe" if self.settings.os == "Windows" else "crashpad_handler" | |
handler_bin_path = os.path.join(self.deps_cpp_info["sentry-crashpad"].rootpath, "bin", handler_exe) |
You don't need to pass the absolute path. By run_environment, it's already included in PATH, and with priority order, so even if there is another app with same name, that one provided by Conan should be used first.
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.
The absolute path is passed as an argument.
When applying the following patch:
diff --git a/recipes/sentry-crashpad/all/test_package/conanfile.py b/recipes/sentry-crashpad/all/test_package/conanfile.py
index 724a4675..1b6e6555 100644
--- a/recipes/sentry-crashpad/all/test_package/conanfile.py
+++ b/recipes/sentry-crashpad/all/test_package/conanfile.py
@@ -16,6 +16,5 @@ class TestPackageConan(ConanFile):
test_env_dir = "test_env"
tools.mkdir(test_env_dir)
bin_path = os.path.join("bin", "test_package")
- handler_exe = "crashpad_handler.exe" if self.settings.os == "Windows" else "crashpad_handler"
- handler_bin_path = os.path.join(self.deps_cpp_info["sentry-crashpad"].rootpath, "bin", handler_exe)
- self.run("%s %s/db %s" % (bin_path, test_env_dir, handler_bin_path), run_environment=True)
+ handler_exe = "crashpad_handler.exe" if self.settings.os == "Windows" else "crashpad_handler"e)
+ self.run("%s %s/db %s" % (bin_path, test_env_dir, handler_exe), run_environment=True)
the following error occurs:
----Running------
> bin/test_package test_env/db crashpad_handler
-----------------
[23258:23258:20210527,173156.407616:FATAL double_fork_and_exec.cc:131] execv crashpad_handler: No such file or directory (2)
@@ -0,0 +1,32 @@ | |||
sources: | |||
"0.4.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.
Why pulling sentry-native
instead of just the submodule?
https://github.com/getsentry/crashpad
Is it because of the tags/releases?
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.
That repo does no releases and has no stable branches.
They rebase on top of google crashpad's master.
|
||
def requirements(self): | ||
self.requires("zlib/1.2.11") | ||
if self.options.with_tls: |
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.
Why do you condition openssl
requirement with an option?
According to the sources it will always look for it on Linux
and Android
. It could end up picking up the system instal of if this option is set to false.
https://github.com/getsentry/crashpad/blob/getsentry/CMakeLists.txt#L27
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.
Fixed it.
By patching the cmake script, it can be kept as an option.
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.
Why changing the default behavior with an option?
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.
because default behavior is bad, unpredictable.
For package managers:
bad build system design: try to find a dependency and disable a feature if not found
good build system design: enable an option, hard fail if requirements for this option are not met
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.
Strong argument haha
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, that's the reason.
I think openssl is only used by the crashpad_handler
executable. Not by the library.
This comment has been minimized.
This comment has been minimized.
All green in build 10 (
|
* sentry-crashpad: add sentry-crashpad recipe * sentry-crashpad: fix 0.2.9 * sentry-crashpad: drop Apple * sentry-crashpad: require at least MSVC2017 * sentry-crashpad: copy correct license * sentry-crashpad: with_tls is only valid for Linux and Android * sentry-native: fix usage of with_tls
The versions are the same as the one in
sentry-native
.conan-center hook activated.