Replies: 6 comments
|
Nice idea! I'll check that after 37.0.0. |
|
I have created a PR to update android-tools to 37.0.0 and tried to add WIN32_LEAN_AND_MEAN the boringssl patch. It shows the same compiler error with X509_NAME. |
|
I just got my local version of my fork working on 37.0.0 and the changes I described (drop the linked hunk, add Would there still be interest in this change? The package was updated already. It would make sense to push this change alongside an update, but this change in and of itself doesn't fix anything, it just alters the already working fix, so I don't think it makes as much sense to implement it now. |
|
Could you share the change here just for reference? I am planning to add Windows support in android-tools project. If you have Windows device to test, it'd be very helpful. |
|
This was the first time I built a MSYS2 package, but the changes needed are fairly straight forward and reflect my proposals here (drop the hunk, add In the initial comment here, I claimed that another TU will be hit with Since the original patch is still adequate and fully solves the issue (since there are no more |
|
I think it's more preferable to add compiler flag in cmake than adding a random patch. So, I like your idea and will think about adding that. |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Hey @Biswa96! Sorry if my pinging is inappropriate, but you are the only person whose commits have touched the offending patch file.
This discussion regards the following hunk of
mingw-w64-android-tools/0002-android-tools-vendor.patch:MINGW-packages/mingw-w64-android-tools/0002-android-tools-vendor.patch
Lines 1 to 16 in 6606ac9
I've been testing the work in progress 37.0.0 update on my fork of nmeum/android-tools and I've noticed that since 36.0.1 there are more places where a
X509_NAMEcollision occurs (at least one more TU fails to compile because of the name clashing in addition to the place already handled by the patch). This has brought the patch to my attention, since I (and you when 37.0.0 is released downstream) will have to update the patch.I know it might be a bit early to comment on this, but you are a collaborator on the "upstream" downstream repository, so you are probably more aware of and actively involed in the topic discussed.
I propose the following: instead of adding the same fix (
#undefing what has to be#undefed) to more places, I propose settingWIN32_LEAN_AND_MEANorNOCRYPTwhere needed. I think that this is a more natural solution. boringssl itself usesWIN32_LEAN_AND_MEANoften, but it unfortunatelly doesn't export this macro (orNOCRYPT).In my fork, I have determined that the libadb and adb targets (and no more) need either
WIN32_LEAN_AND_MEANorNOCRYPTto compile without the fix in the hunk. But my fork handles only a subset of the tools nmeum/android-tools handles (but I doubt that any of the miscelaneus utilities I do not build need boringssl1).To my limited knowledge,
WIN32_LEAN_AND_MEANonly restricts what some standard headers likewindows.hinclude, so its inclusion in libadb and adb shouldn't introduce any bugs. If any incompatibilities arose, they would lead to compilation errors (which is better than runtime errors). But there is still possibility that this could be a breaking change.To my (again) limited knowledge,
NOCRYPTworks similarly toWIN32_LEAN_AND_MEAN, but it is much more targeted. I have verified that adding-DNOCRYPTto libadb and adb makes the subset of utilities my fork builds compile. This macro should be pretty safe and it completely resolves the issue.If you agree, the change can be made immediatelly (i.e. onto
mingw-w64-x86_64-android-tools-36.0.1), which will lead to a little less work during the 37.0.0 update. Or it can be addressed during the 37.0.0 update, leaving the current solution intact until then.If you disagree and choose to
#undeffurther during 37.0.0 update, I'd at least like to make a PR adding a patch comment header describing the situation to the patch. I already did some research on this, I'd like to at least improve documentation to justify it. Would such PR be considered even though it "does nothing"?Footnotes
I have not verified this statement. ↩
All reactions