-
Notifications
You must be signed in to change notification settings - Fork 436
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
NDK r11 does not work due to toolchain restructure #81
Comments
I've managed to workaround this problem by creating symlink named
After this I was able to set |
chenxiaolong@6d8525b#commitcomment-16919805 :) Just pass |
|
@osfans You might have to remove the build directory and then rerun CMake. The toolchain file can't seem to change the compiler after the build has already been configured. |
@chenxiaolong it works! Thanks! When
ndk-build has no error when link c++_static. |
@osfans You're welcome! Do you have a simple test case that causes the error? I created a simple project and cannot reproduce it: https://github.com/chenxiaolong/ndk_cmake_test I tried |
@chenxiaolong I create a PR in your repo. It seems I need pass |
@osfans It looks like that's because CMake is linking the static library in the wrong order. CMake is passing the This should fix the issue: https://gist.github.com/chenxiaolong/eae919138c5e56b16955d72eaa37041e |
@chenxiaolong It works. Thanks! I include your fork of android-cmake in trime. |
@chenxiaolong I git pull your r12 commit. I can't make trime with r12 again.
It seems that I cannot choose clang. |
Looks like r12 restructured things again. Why is google doing this nonsense? |
I have at least a parser for the release property file in the OSVR fork of this repo |
@osfans I made one more change related to
Commit: chenxiaolong@2522915 |
@chenxiaolong Thanks. It works. |
@chenxiaolong I really appreciate your efforts in maintaining the android cmake scripts. The unfortunate issue I see is that we have a lot of smart people investing their free time maintaining these scripts, but they all do it in isolation and the same set of issues have been fixed over and over, but in different ways. I think it's worth it to start getting people onto 1 repository and pooling fixes together. Would it be unreasonable to pool your efforts into @rpavlik's fork? |
Where's rpavlik's fork? I can't find it. |
The most updated, though not tidiest, branch is here: https://github.com/OSVR/android-cmake/tree/libcxx (under dev, so I haven't pulled things out into pull-requestable-branches yet). I tried to incorporate all the pull requests that I could find that made sense, plus additional changes as needed. I actually started working in parallel on a more minimal, modern, semi-from-scratch toolchain file that works with, rather than against, current CMake practices, in alt.android.toolchain.cmake in the same directory - it contains some pieces based on the original here (or the modifications I've made to it) but it's simpler and hopefully less fragile. It's incomplete, though enough to build one sample library (jsoncpp) against the NDK r12. Note also that the folks behind the CrystaX NDK forked some version of this toolchain script and made their own changes - https://github.com/crystax/android-platform-ndk/blob/master/cmake/toolchain.cmake - which I haven't fully ported over into my fork, and vice versa (there are changes that I've incorporated that they don't have). Ideally, I think, that would be the way to go: instead of having to do so much detection/guessing, have the toolchain description be shipped with the NDK, but it appears that might be a dream unless you can use (a currently unreleased version of) the CrystaX NDK. |
A colleague of mine created his own android toolchain specifically designed for r11. You can try it our here |
@chenxiaolong r13 is out in Archlinux, and trime build breaks again. Will you support it?
|
r13 comes with its own toolchain file. No need to use this anymore. On Sun, Oct 9, 2016, 8:37 PM osfans [email protected] wrote:
|
Yes, it works! |
@rcdailey |
I use a custom command in cmake to copy my binary to that directory so ant On Tue, Oct 11, 2016, 12:04 AM osfans [email protected] wrote:
|
@chenxiaolong It works ,3Q |
@chenxiaolong , I am a newbie in cmake, Can you explain how to "remove the build directory". I got this error
Thanks |
They have changed the way LLVM is structured in NDK r11. The
llvm
directory is no longer prefixed with a version number such asllvm-3.5
. It's justllvm
now. There is only 1 version of Clang (3.8).As such, it does not detect the clang tooling as available option for
ANDROID_TOOLCHAIN_NAME
.The text was updated successfully, but these errors were encountered: