Issue
I installed android sdk, platform and build tools and NDK in my ArchLinux to develop with android-studio and c++. I've created a simple "hello world program" just to start but it is not compiling. The error message on build returned by android studio is "A problem occurred configuring project ':app'. executing external native build for cmake /home/fabio/AndroidStudioProjects/HelloWorld/app/CMakeLists.txt"
On the CMakeError.log:
Determining if the C compiler works failed with the following output: Change Dir: /home/fabio/AndroidStudioProjects/HelloWorld/app/.externalNativeBuild/cmake/debug/armeabi/CMakeFiles/CMakeTmp
Run Build Command:"/opt/android-sdk/cmake/3.6.3155560/bin/ninja" "cmTC_be251"
[1/2] Building C object CMakeFiles/cmTC_be251.dir/testCCompiler.c.o FAILED: /opt/android-ndk/toolchains/llvm/prebuilt/linux-x86_64/bin/clang -target armv5te-none-linux-androideabi -gcc-toolchain /opt/android-ndk/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64 --sysroot=/opt/android-ndk/platforms/android-15/arch-arm -g -DANDROID -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -march=armv5te -mtune=xscale -msoft-float -fno-integrated-as -mthumb -Wa,--noexecstack -Wformat -Werror=format-security -g -DANDROID -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -march=armv5te -mtune=xscale -msoft-float -fno-integrated-as -mthumb -Wa,--noexecstack -Wformat -Werror=format-security -o CMakeFiles/cmTC_be251.dir/testCCompiler.c.o -c /home/fabio/AndroidStudioProjects/HelloWorld/app/.externalNativeBuild/cmake/debug/armeabi/CMakeFiles/CMakeTmp/testCCompiler.c
/opt/android-ndk/toolchains/llvm/prebuilt/linux-x86_64/bin/clang: error while loading shared libraries: libtinfo.so.5: cannot open shared object file: No such file or directory
ninja: build stopped: subcommand failed.
For the creation of the project, I just checked the option "Include c++ support" and started with a blank activity, changed no code then.
Edit
Tryied instlalling libtinfo as suggested in this thread but didn't worked.
Solution
I experienced the same issue. Quite many of the other distributions often have outdated packages. They still use ncurses 5 instead of ncurses 6 (libtinfo seems to belong to ncurses). Assuming, that the android ndk's version of clang was built on such a system, it was worth a try to use ncurses 5. From the Arch User Repositories I was able to install the latest version of ncurses5-compat-libs (and I also installed the 32bit version: lib32-ncurses5-compat-libs). This solved the problem for me. If you have it installed already, try reinstalling or updating it, if it is outdated.
Answered By - DanielB
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.