-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
fix(ndk): fix on-device building and remove custom __ANDROID_API__ header patches
#25786
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
fix(ndk): fix on-device building and remove custom __ANDROID_API__ header patches
#25786
Conversation
1868261 to
2cdf418
Compare
|
For clarity:
|
|
The binary reports itself as I really don't think this is the right way to resolve issue 23401. CC: @truboxl |
Could you explain how you can tell that the incorrect what is the SHA256 of the correct |
|
There is no other
termux-packages/packages/ndk-sysroot/build.sh Lines 83 to 84 in 2cdf418
|
I think I understand the concern you are explaining here. Actually, the solution I intend to create to issue 23401 does involve commands that are not Actually, the intended use of this PR in the context of serving as part of the solution to issue 23401 revolves around the series of commands I sent to the original poster of the issue in the issue thread. I referred to this PR as the "solution" because it is a required dependency of the commands which I sent. Please read these (and expand the collapsed markdown block) to understand further context: |
|
@licy183 I am sorry for not getting to the point very well. I didn't want to say something that sounds like an accusation of your code having a problem, which is why I did not outright say this anywhere at first, but I realize that beating around the bush can just cause unnecessary confusion: I primarily requested your review on this because I am editing this code you added in 09d6130, which appears to not work if |
Actually I've read your comment before I made my last one.
I didn't actually build Anyway, I feel that this fix is a bit strange and cannot be considered to solve 23401. The only way to solve 23401 seems to be to package all the prebuilt libraries of NDK, which does not seem to be necessary. |
I have a different opinion from you about this, because, for example, I do not think it would be good to package all of the binaries for all API levels at once, because on the majority of devices and situations they would not be useful. In my personal philosophical opinion this does fix issue 23401 because, I argue, that the correct way to target alternative API level in Termux on a case-by-case basis for personal projects, which is exactly what OP was doing, should consist of: step 1. build and install step 2. manually apply the desired API level to ^ and those are exactly the things that are covered and fully explained in my response on the issue. I don't believe that packaging and hosting multiple API levels of packages in the same Termux mirror set makes sense, because normally the API levels of the packages are uniform within a mirror set (example android21 in the android 5 mirror set, android24 in the f-droid termux mirror set, android29 in the google play termux mirror set) therefore I don't agree that putting all API level binaries in some packages in the same mirror set would be a good solution to issue 23401, and therefore my proposed solution is, in my opinion, the most idiomatic way to support that need of users in Termux. I would be interested to see the opinions of others about this also, and whether others think that this PR could be considered as the solution to issue 23401, or not. |
|
Also, while it is not the only factor, IMO one of the most important factors is whether the OP of the issue believes their issue is solved yet or not, since they are the one trying to target a different API level. Therefore, if they respond I think it will be important to consider what they say, and whether or not they still have other problems and errors happening when they try this possible solution. |
|
When I think about it a lot, I think that the argument can be made that multiple API levels of The reason I don't think that is a priority is because I can't think of any real-world situation where that would be needed, but it is an interesting thought, so maybe if one of the people who needs to target an alternative API level needs that, they could explain how and why so their use case can be considered here. |
f23773e to
5149792
Compare
…header patches - Fixes termux#26838 - Fixes partly termux#23401 - After termux#25627, it is believed that the custom definition of `__ANDROID_API__` is no longer needed, because: - There is no longer a way to reproduce any of the errors that it fixed before - Even if there were a way to, it would no longer be able to fix those errors by itself because of the update to NDK r28c (see termux#25622 for more details) - It is replaced with termux#25627, which does what it used to a different way that also fixes other errors and seems more reliable
5149792 to
624a776
Compare
To explain a clarification, a while ago, I changed the description to say "fixes partly 23401" instead of "fixes 23401" because it arguably does not completely fix 23401. |
|
I will merge this in 24 hours, so that the NDK r29 update can be rebased on it. |
truboxl
left a comment
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 couldnt find any regression after several test builds. Those packages that still build will continue build. Those that dont still dont build prior to this.
@licy183, I am leaning towards a yes for this. We probably want to keep fewer patches if possible.
Fixes [Bug]: libc++ download error #26838
Fixes partly [Bug]: clang cannot compile for api levels other than default #23401
After fix(main/libllvm): Implement all executables named after triplets with scripts #25627, it is believed that the custom definition of
__ANDROID_API__is no longer needed, because:$PREFIX/bin/*-clanghas different target API behavior fromclangon all architectures except for 32-bit ARM #25622 for more details)