-
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 android-ndk r21d #3004
add android-ndk r21d #3004
Conversation
Failure in build 1 (
|
Failure in build 2 (
|
recipes/android-ndk/all/conanfile.py
Outdated
def source(self): | ||
tarballs = self.conan_data["sources"][self.version] | ||
tools.get(**tarballs[str(self.settings.os)]) | ||
extracted_dir = self.name + "-" + self.version | ||
os.rename(extracted_dir, self._source_subfolder) |
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 the downloading of the binaries should move to build
,
because the following will fail:
conan create android-ndk/r21d@ -s os=Windows
conan create android-ndk/r21d@ -s os=Linux -ks
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 do not understand
If you want to download this for a operating system you are not on, this package will not make any sense
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 would make it possible for a devops guy to create android-ndk packages on his Linux machine for all platforms.
This is possible now too, but there is a possibility that, by executing the commands in my previous comment, a wrong package is generated.
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 actually a good point I never thought about because I have all 3 OSes just available,
but I sometimes found it annoying to change the computer
So I will investigate in this, thanks!
if os.name == 'posix': | ||
os.chmod(filename, os.stat(filename).st_mode | 0o111) | ||
|
||
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.
Should this package have a toolchain
method?
See https://docs.conan.io/en/latest/creating_packages/toolchains/cmake.html
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.
needs further investigation since I never used that methode, but a good point!
also, there is actually a toolchain file included in, /build/cmake/android.toolchain.cmake
need to check if this could simplify the cmake wrapper
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'm also interested in knowing if this package will be compatible with the new toolchain
features.
For instance here https://docs.conan.io/en/latest/integrations/cross_platform/android.html#use-built-in-conan-toolchain they use a profile:host with android_ndk_installer/r20@bincrafters/stable
and conan_toolchain.cmake gets filled with all the information.
Is the current package a drop-in replacement for the bincrafters recipe?
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.
@Hopobcn , this NDK package makes much more, it allows also building packages that do not use CMake, like openssl or curl
Why creating an own toolchain if you can get one from the NDK, that is for sure the most complete one?
If you create your toolchain file, it should just include that one from the NDK anyway
It is not a drop in replacement, because it works with the (not so) new 2 profile approach, the bincrafter one used the one profile way with os_buid and os_arch
The future is the 2 profile way.
Co-authored-by: Anonymous Maarten <[email protected]>
Failure in build 3 (
|
Co-authored-by: Anonymous Maarten <[email protected]>
Failure in build 4 (
|
Bincrafters repo: https://github.com/bincrafters/conan-android_ndk_installer At Bincrafters the Docker image |
I do not think that there is any image to use, since this package is 'just' re-packaging files and providing some setup for consumption. The only dependencyis to repack the right package for the platform. |
Failure in build 5 (
|
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
I am against that! |
Please make android-ndk public available on CCI. :-) |
hello @a4z , do you need any help with this PR to make it green again, so we can review, approve and merge? |
I don't think I really understand the logic behind cci bot. :-) Why is the pull request still marked as blocked? All blocked issues are merged now. Why do you have to manually retrigger the bot by closing/reopening the pull request? Why is the pull still not merged after 14 hours? |
Human error!
CCI is still very young, sometimes the things go wrong... ideal it should automatically build ever commit and only faily due to human error... that's not the case yet
I takes one Conan team member and two community reviews to merge the PR. #2857 has more details |
@prince-chrismc I work in highly regulated industry but the 3 whitelisted reviewers that is really strong. :-) Anyway good to know, I will not waste my time with reviews anymore. PS: we should push https://github.community/t/cross-reference-issues-with-blocks-and-blocked-by/1437 to reduce human errors. |
this is still EAP (consider it more or less a beta), so please don't expect much stability right away. given the fact CI is complicated and depends on several external resources (e.g. github repositories, docker registries, cloud running agents, bintray etc.) any instability in these external resources may cause an unexpected error even if CI itself is super stable. but CI itself is still under heavy development, we still have to figure out how to do things right (e.g. rebuild downstream packages that become outdated after new builds of the upstream), so don't expect a coherent behavior from the CI itself or its bots out of the box. |
A review is not just about giving an OK, @dmn-star , but also to find places of improvements in PRs, or confirm it looks good. |
@SSE4
@a4z In many cases it is. Simple bugfixes, trivial recipe changes, new library versions and so on. But here is not the right place for the feedback. I have cloned new android-ndk and get an error (on macOS): android-ndk/r21d (test package): Running test() |
It runs on my OSX, and on the cci builds, but check if your whole output looks something like that one and if not, check where it is different that could cause that problem |
After I called conan create ... second time sucess. 👍 Strange, I think I should check my env. |
We need more reviewers! Please do not back off, I didn't mean to be discouraging! Those of us on that short list were/are actively reviewing before that existed, so being active in the community is the fast track to be being added yourself. ❤️ join us! |
I will try my best. :-) |
Is there official documentation on how to use this? |
you use 2 profiles, profile:build and profile:host p:b is your current machine, p:h the android target, eg armv8 |
I've reported #5666, and answer was the same: Use 2 profiles. |
This doc (https://docs.conan.io/en/latest/integrations/cross_platform/android.html#using-docker-images) says that when using docker images "it should just work".
the default came with the container. It has unblocked me for some package, but now libbacktrace fails, it's a deps for boot:
I wonder if the default profile is for the host, and build profile should have native compiler. It's not clear from the doc |
In the context of this cci package, the docs provide nothing, but they mention the 2 profile way everything else you find will use the old way, using 1 profile, and you can forget about that your host profile looks kind of ok, the build/default one should be your machine you build one, so that is wrong since it says its Android/arm |
Alright, looks like that was it:
I got lot of pre-built packages, and was able to build others. Thanks for the link, it made me realised that i was looking at some old documentation. 👍 |
BTW, i started learning Conan this morning! 🤣 |
in your host profile, what you seem to have as default, add
so this package will be picked up and gets used to compile for Android |
Specify library name and version: android-ndk r21d
conan-center hook activated.
This is a mixture of what has been at bincrafters, and changes @jgsogo has in his branch, but make it working (for me)
There are some questions, like , and option for cmake (android can build today with system cmake or any other)
But for a base of discussion, I add this now
Then, together with #1137, everything for doing mobile packaging basically exists, (except some docs on how to use profiles to do this, but I am working on that)
Note, this only works with the new 2 profile (build / host) syntax