-
Notifications
You must be signed in to change notification settings - Fork 33
Conversation
This will fix #16 I suppose |
Hi, Thanks a lot! Just a question, wouldn't simply upgrading the NDK version help? This Docker image still installs NDK r12 (https://github.com/bitrise-docker/android-ndk/pull/20/files#diff-3254677a7917c6c01f55212f86c57fbfR17), while the latest now is r13 (https://developer.android.com/ndk/downloads/index.html) |
Not really, if you don't include the CMake dependency, all projects using NDK together with the new CMake build system will just fail with this message:
|
# uncompress | ||
RUN cd /opt/android-cmake-tmp && unzip -q android-cmake.zip -d android-cmake | ||
# move to it's final location | ||
RUN cd /opt/android-cmake-tmp && mv ./android-cmake ${ANDROID_HOME}/cmake |
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.
cmake have to be in ANDROID_HOME
and not in the NDK HOME?
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.
yep, it's at the same level of "platform-tools", "ndk-bundle" and so on
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.
thanks, I wonder why it's not part of the Android SDK then.. Well, I guess it's only required for NDK, but then why they chose to put it into the SDK home?..
Anyway, in case of Android it's not always "logical" how things work / where things are ¯_(ツ)_/¯
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 feel the same, that's why at first I tried to go only with the apt-get install cmake
route but that didn't work out
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.
Yep, just tested and the ANDROID_HOME
path is where Studio installs cmake
, so 👍
only thing now is to rebase this PR, and that's all ;)
RUN cd /opt/android-cmake-tmp && wget -q https://dl.google.com/android/repository/cmake-3.6.3155560-linux-x86_64.zip -O android-cmake.zip | ||
# uncompress | ||
RUN cd /opt/android-cmake-tmp && unzip -q android-cmake.zip -d android-cmake | ||
# move to it's final location |
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.
typo: it's
-> its
;)
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.
if you're around feel free to fix this at https://github.com/bitrise-docker/android-ndk/pull/20/files#diff-3254677a7917c6c01f55212f86c57fbfR20 too :D
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.
done!
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.
thanks! ;)
Can you please rebase this on the current |
# uncompress | ||
RUN cd /opt/android-cmake-tmp && unzip -q android-cmake.zip -d android-cmake | ||
# move to its final location | ||
RUN cd /opt/android-cmake-tmp && mv ./android-cmake ${ANDROID_HOME}/cmake |
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.
actually, shouldn't this be ${ANDROID_HOME}/cmake/3.6.3155560
instead? That's where Android Studio installs it
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.
also checked the content of the zip
and it's not exactly the same as what you get if you install CMake
from Android Studio, but that's probably not an issue (it's the same cmake version)
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.
ZIP tree
:
tree . -L 3
.
├── android.toolchain.cmake
├── bin
│ ├── cmake
│ ├── cpack
│ ├── ctest
│ └── ninja
├── doc
│ └── cmake-3.6
│ ├── Copyright.txt
│ ├── cmcompress
│ ├── cmcurl
│ ├── cmlibarchive
│ ├── cmliblzma
│ ├── cmsys
│ └── cmzlib
├── share
│ ├── aclocal
│ │ └── cmake.m4
│ └── cmake-3.6
│ ├── Help
│ ├── Modules
│ ├── Templates
│ ├── completions
│ ├── editors
│ └── include
└── source.properties
Android Studio installed cmake tree
:
tree . -L 3
.
├── android.toolchain.cmake
├── bin
│ ├── ccmake
│ ├── cmake
│ ├── cmakexbuild
│ ├── cpack
│ ├── ctest
│ └── ninja
├── doc
│ └── cmake-3.6
│ ├── Copyright.txt
│ ├── cmcompress
│ ├── cmcurl
│ ├── cmlibarchive
│ ├── cmliblzma
│ ├── cmsys
│ └── cmzlib
├── package.xml
├── share
│ ├── aclocal
│ │ └── cmake.m4
│ └── cmake-3.6
│ ├── Help
│ ├── Modules
│ ├── Templates
│ ├── completions
│ ├── editors
│ └── include
└── source.properties
e.g. cmakexbuild
is missing from the ZIP
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.
hum, true, I tried without the version number just because of the error message they showed me when I tried to build without CMake:
Expected CMake executable at /Users/xx/Library/Android/sdk/cmake/bin/cmake.
It works outside the version folder, I need to recheck to see if it builds using the Android Studio folder config, probably it will
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.
Ok, I tested with this changes:
-RUN cd /opt/android-cmake-tmp && mv ./android-cmake ${ANDROID_HOME}/cmake
+RUN cd /opt/android-cmake-tmp && mkdir ${ANDROID_HOME}/cmake/ && mv ./android-cmake ${ANDROID_HOME}/cmake/3.6.3155560
---
-ENV PATH ${PATH}:${ANDROID_HOME}/cmake/bin
+ENV PATH ${PATH}:${ANDROID_HOME}/cmake/3.6.3155560/bin
It finds the binaries:
# which cmake
/opt/android-sdk-linux/cmake/3.6.3155560/bin/cmake
But it doesn't compile. It gives the same error as before:
* What went wrong:
A problem occurred configuring project ':app'.
> Could not resolve all dependencies for configuration ':app:_qaDebugApk'.
> Failed to find CMake.
Install from Android Studio under File/Settings/Appearance & Behavior/System Settings/Android SDK/SDK Tools/CMake.
Expected CMake executable at /opt/android-sdk-linux/cmake/bin/cmake.
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.
hmm... that's quite strange, given that's not the place where the Android Studio installs cmake
, but I guess we can have this as a "first version", and if required change it in the future
Thanks for the PRs, you're a true hero!! ;) Schedule: the next alpha images will be created in ~12 hours, tested as usual, and then, if everything's OK deployed (as non alpha images) on Saturday So, by Sunday you should have this on bitrise.io ;) |
@mickele can you check this discussion bitrise-io/build.issues#33 (comment) ? It seems that installing a default It seems that the latest Do you have a sample project we could use to test whether removing the default installed From the sample's build log:
|
Another question is whether |
We've made a test where PATH did not include the |
Proposed PR to remove the preinstalled cmake: #38 We plan to merge and ship this next week, unless there's a use case against this change. |
@viktorbenei oh, actually I moved recently and I don't have my dev environment prepared yet nor access to my old projects that were using But I think you can safely remove if there's another solution now. |
I think we'll remove it then, and if that would cause issues related to this change, we can add it again with a reverse commit anyway ;) Thanks for the info and for your PR/work @mickele ! |
Since Android Studio 2.2, they're including a CMake dependency in the SDK Manager, but it's not available to install through
android update sdk --no-ui --filter [NAME]
afaik.The most updated version can be found at: https://dl.google.com/android/repository/repository2-1.xml // last
<remotePackage>
nodeThis is needed for all new CMake build system: https://developer.android.com/ndk/guides/cmake.html