-
Notifications
You must be signed in to change notification settings - Fork 6.2k
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
[crashpad] Support more targets and cross-compile for Android #23827
[crashpad] Support more targets and cross-compile for Android #23827
Conversation
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 a new experimental fast check for PR issues. Please let us know if this bot is helpful!
After committing all other changes, the version database must be updated
git add -u && git commit
git checkout 5f62686b96cecc91a5d02ea188857a24efd3ef4f -- versions
./vcpkg x-add-version --all
Diff
diff --git a/versions/c-/crashpad.json b/versions/c-/crashpad.json
index 0f97ead..969fe1c 100644
--- a/versions/c-/crashpad.json
+++ b/versions/c-/crashpad.json
@@ -1,7 +1,7 @@
{
"versions": [
{
- "git-tree": "3fd92538923181d2b7932e3958d98cf99be75fa9",
+ "git-tree": "626b86347c4129cc313f7ea12f0db584992d186d",
"version-date": "2022-03-28",
"port-version": 0
},
You have modified or added at least one vcpkg.json where a "license" field is missing.
If you feel able to do so, please consider adding a "license" field to the following files:
ports/crashpad/vcpkg.json
Valid values for the license field can be found in the documentation
Question: should I include some sort of readme about how to actually integrate Crashpad? A usage file? What would be recommended? When figuring out how to integrate Android crashpad, I relied on https://docs.bugsplat.com/introduction/getting-started/integrations/mobile/android quite a bit. |
@vejmartin / @JackBoosY, please review |
Is it possible to add arm64-windows as well? |
@janisozaur , yes, and I just got a local build of it to work |
@LilyWangLL / @JackBoosY , is there a way to get clang installed on the CI x64-linux machine? I would've wanted to use |
@BillyONeal Request |
Ports don't get to be that opinionated about which compiler is used; they need to use what the triplet selected.
I'm nervous about doing that because we explicitly want to prevent this kind of thing. |
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 a new experimental fast check for PR issues. Please let us know if this bot is helpful!
All manifest files must be formatted
./vcpkg format-manifest ports/*/vcpkg.json
Diff
diff --git a/ports/crashpad/vcpkg.json b/ports/crashpad/vcpkg.json
index 5518974..8eb44dd 100644
--- a/ports/crashpad/vcpkg.json
+++ b/ports/crashpad/vcpkg.json
@@ -8,11 +8,11 @@
"homepage": "https://chromium.googlesource.com/crashpad/crashpad/+/master/README.md",
"supports": "(x64 & (osx | windows | linux | android)) | (arm & android) | (arm64 & (windows | linux | android))",
"dependencies": [
- "zlib",
{
"name": "vcpkg-gn",
"host": true
- }
+ },
+ "zlib"
],
"features": {
"generate-dump": {
PRs must add only one version and must not modify any published versions
When making any changes to a library, the version or port-version in vcpkg.json
or CONTROL
must be modified.
Error: Local changes detected for crashpad but no changes to version or port version.
-- Version: 2022-03-28
-- Old SHA: 3fd92538923181d2b7932e3958d98cf99be75fa9
-- New SHA: 8276c3090c038cd372dc7725bef2de381c038599
-- Did you remember to update the version or port version?
-- Pass `--overwrite-version` to bypass this check.
***No files were updated.***
You have modified or added at least one vcpkg.json where a "license" field is missing.
If you feel able to do so, please consider adding a "license" field to the following files:
ports/crashpad/vcpkg.json
Valid values for the license field can be found in the documentation
fd5b1c8
to
6b554aa
Compare
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 a new experimental fast check for PR issues. Please let us know if this bot is helpful!
All manifest files must be formatted
./vcpkg format-manifest ports/*/vcpkg.json
Diff
diff --git a/ports/crashpad/vcpkg.json b/ports/crashpad/vcpkg.json
index eede4a5..c222681 100644
--- a/ports/crashpad/vcpkg.json
+++ b/ports/crashpad/vcpkg.json
@@ -7,7 +7,7 @@
],
"homepage": "https://chromium.googlesource.com/crashpad/crashpad/+/master/README.md",
"license": "Apache-2.0",
- "supports": "(osx | windows | android | linux)",
+ "supports": "osx | windows | android | linux",
"dependencies": [
{
"name": "vcpkg-tool-gn",
After committing all other changes, the version database must be updated
git add -u && git commit
git checkout e9d2b4c40e3a3ac4c6264dd685d59df8d082ace1 -- versions
./vcpkg x-add-version --all
Diff
diff --git a/versions/baseline.json b/versions/baseline.json
index 875e830..02e1ec7 100644
--- a/versions/baseline.json
+++ b/versions/baseline.json
@@ -1669,7 +1669,7 @@
"port-version": 1
},
"crashpad": {
- "baseline": "2022-04-16",
+ "baseline": "2022-04-27",
"port-version": 0
},
"crashrpt": {
diff --git a/versions/c-/crashpad.json b/versions/c-/crashpad.json
index 013a9da..34891c9 100644
--- a/versions/c-/crashpad.json
+++ b/versions/c-/crashpad.json
@@ -1,5 +1,10 @@
{
"versions": [
+ {
+ "git-tree": "e87c265c481cae3521a1f01881a0ce72b032acc8",
+ "version-date": "2022-04-27",
+ "port-version": 0
+ },
{
"git-tree": "448abcac90e97d8b5ee03843775dd7fcba971979",
"version-date": "2022-04-16",
6b554aa
to
d319643
Compare
@bold84, any chance you can help with validation of arm64-OSX locally? My machine's too old to validate that. Also, were you able to successfully build arm-windows with your change? When I try to build that, I get issues related to a missing toolchain. |
What I'm particular do you mean by "validation"? I'll try a Windows arm64 build and let you know. Give me an hour or two. |
@bold84, I effectively mean that you are able to build successfully. I was able to build arm64-windows fine. I wasn't able to build arm-windows and arm64-osx. Since your recent change to the vcpkg.json broadened the scope of supported targets for OSX & Windows, I need some help validating if those builds succeed. With your original change, I assume you were able to build all the new permutations of triplets that weren't supported before (i.e., arm, arm64, x86 for windows and arm64-osx). |
arm-windows ❌ I believe it's possible to make this work. You'd just have to read the BUILD.gn files and figure out what needs to be adjusted. |
c5942ba
to
d69d8bd
Compare
@ras0219-msft / @BillyONeal , any updates regarding the ability to move forward with this PR? |
I don't believe anything has changed or is likely to change soon, no. |
After reading through the current discussions, I'm still trying to understand what is the current blocker. Is it related to the changes adding support for more targets or purely having the port using an external toolchain? The Knowing that the port was already using an external toolchain before (if I understand @jason-ortiz comments), does it mean that any attempt of fixing the port would be rejected unless a solution is found through one of the ideas that have been suggested in #23827 (comment)? |
The problem is that we make the compiler to use a user setting. vcpkg says "you WILL use the compiler the user says" and this port is trying to say "NO, I will ignore you and use Clang instead" which isn't OK in general.
I don't see the current port using an external toolchain. In fact there's a lot of stuff in there trying to ensure user settings are respected. That may be imperfect but we certainly were not downloading clang before. |
In this previous comment, I mentioned that compiler choice is hardcoded:
Also, my changes to the port (i.e., In summary, I've not changed how this port handles user settings; it already ignores them/has requirements for certain compilers. |
message(STATUS "Setting GN options for Android") | ||
|
||
if (VCPKG_CRT_LINKAGE STREQUAL "static") | ||
string(APPEND VCPKG_COMBINED_SHARED_LINKER_FLAGS_DEBUG " -static-libstdc++ ") |
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 suspicious -- what if the user wants a different standard library setting? This seems like it should already be part of the combined flags.
If it isn't, we likely need to change vcpkg_cmake_get_vars
diff --git a/build/config/BUILD.gn b/build/config/BUILD.gn | ||
index e32e40d..654bffc 100644 | ||
--- a/build/config/BUILD.gn | ||
+++ b/build/config/BUILD.gn |
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.
Before merging this, I want to double check that this is the minimal approach. For example, if we can simply ensure "framework_dirs" is empty when not targeting macos/ios, that would enormously reduce the length of the patch and be less concerning about unintended side effects.
"description": [ | ||
"Crashpad is a crash-reporting system.", | ||
"Crashpad is a library for capturing, storing and transmitting postmortem crash reports from a client to an upstream collection server. Crashpad aims to make it possible for clients to capture process state at the time of crash with the best possible fidelity and coverage, with the minimum of fuss." | ||
], | ||
"homepage": "https://chromium.googlesource.com/crashpad/crashpad/+/master/README.md", | ||
"license": "Apache-2.0", | ||
"supports": "osx | windows", | ||
"supports": "static & (((x64 | x86 | arm64) & windows) | (x64 & (osx | linux)) | android)", |
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.
Generally ports should not be marked as only supporting static libraries -- vcpkg policy allows ports to ignore dynamic lib requests by instead calling the port helper vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
.
We strongly prefer known-bad lists over known-good lists since they enable users to work through configurations we may not know about. If possible, it would be great to change this conditional to block known-bad configurations instead of trying to enumerate every known-good configuration. As an example: do we know that iOS doesn't work? Do we know that MacOS arm64 doesn't work?
"supports": "static & (((x64 | x86 | arm64) & windows) | (x64 & (osx | linux)) | android)", | |
"supports": "((x64 | x86 | arm64) & windows) | (x64 & (osx | linux)) | android", |
This PR seems to be the best chance to resolve #25197 and at this point, I'm wondering if I'm the only Crashpad's port user running into building errors with the current port on Windows 😅 I did double check this is still the case with the latest vcpkg release. Therefore, I'm wondering if you could have a look at the latest comment @jason-ortiz and how does that connect with the work that has been done in #25864? |
Ping @jason-ortiz for reply. |
Hi everyone Jason is no longer working in this code unfortunately. At this point, anyone who is willing to take over the change and get it over the finish line is super welcome to, but we don't have the resources on our side to finish this off |
Convert to draft since there is no reply. |
Any progrees here? |
Drop |
Closing this PR since it seems that no progress is being made. Please ping me to reopen if work is still being done. |
Updates Crashpad port to build for Windows, OSX, Linux, and allows those hosts to cross-compile for Android. Also introduces
generate-dump
feature to optionally build and installgenerate_dump
tool for live-process-dump-creation.What does your PR fix?
Fixes [crashpad] Support Linux/Android targets and arm64 architecture #22891
Fixes [crashpad] Build failure #25197
Which triplets are supported/not supported? Have you updated the CI baseline?
Supports:
CI baseline is updated.
Does your PR follow the maintainer guide?
Yes, I believe so.
If you have added/updated a port: Have you run
./vcpkg x-add-version --all
and committed the result?Yes