Android Error while compiling Kodi for Android - Printable Version +- Kodi Community Forum (https://forum.kodi.tv) +-- Forum: Development (https://forum.kodi.tv/forumdisplay.php?fid=32) +--- Forum: Kodi Application (https://forum.kodi.tv/forumdisplay.php?fid=93) +---- Forum: Android Development (https://forum.kodi.tv/forumdisplay.php?fid=184) +---- Thread: Android Error while compiling Kodi for Android (/showthread.php?tid=303279) |
Error while compiling Kodi for Android - karthickbabu - 2017-01-06 I'm following the instructions provided in https://github.com/xbmc/xbmc/blob/master/docs/README.android Setup: Ubuntu 16.04.1 (running on Windows 7 Virtual Box) Android ARM Toolchain Latest Android SDK Android NDK r12b Code: ./configure --with-tarballs=/home/kb/xbmc-tarballs --host=arm-linux-androideabi --with-sdk-path=/home/kb/Android/Sdk --with-ndk=/home/kb/android-ndk-r12b --with-toolchain=/home/kb/arm-linux-androideabi-4.9-vanilla/android-21 --prefix=/home/kb/xbmc-depends I could compile all the dependencies successfully and received "Dependencies built successfully." message. While building Kodi (Step 5 in README.android), I'm receiving the following error: Code: kb@kb-VirtualBox:~/kodi-android$ make -C tools/depends/target/xbmc/ Can someone help me in finding what is going wrong? Thanks in advance. RE: Error while compiling Kodi for Android - wsnipex - 2017-01-06 we switched to cmake, docs haven't been updated yet. Use: make -C tools/depends/target/cmakebuildsys instead of make -C tools/depends/target/xbmc/ RE: Error while compiling Kodi for Android - karthickbabu - 2017-01-09 Thanks @wsnipex. I ran the command suggested by you and it seems to work. I'm yet to check the apk. The following is what I got on building using cmakebuildsys: Code: vnadmin@vnadmin-VirtualBox:~/android/kodi-android$ make -C tools/depends/target/cmakebuildsys/ After this I've run make and make apk from kodi-android/build folder and got this: Code: vnadmin@vnadmin-VirtualBox:~/android/kodi-android/build$ make apk RE: Error while compiling Kodi for Android - Harry_chauhan - 2017-03-21 I have tried to compile as suggest on the android using : make -C tools/depends/target/cmakebuildsys I am having ubuntu 14.04 and x86_64-linux but I am struggling with the error as: diksha@diksha-ubuntu:~/KODI/kodi-android$ sudo make -C tools/depends/target/cmakebuildsys/ [sudo] password for diksha: make: Entering directory `/home/diksha/KODI/kodi-android/tools/depends/target/cmakebuildsys' mkdir -p /home/diksha/KODI/kodi-android/build cd /home/diksha/KODI/kodi-android/build; /home/diksha/KODI/xbmc-depends/x86_64-linux-gnu-native/bin/cmake -DCMAKE_TOOLCHAIN_FILE=/home/diksha/KODI/xbmc-depends/x86_64-linux-gnu-debug/share/Toolchain.cmake -DCMAKE_INSTALL_PREFIX=/home/diksha/KODI/xbmc-depends/x86_64-linux-gnu-debug -DCMAKE_BUILD_TYPE=Debug -DENABLE_INTERNAL_CROSSGUID=OFF -DENABLE_INTERNAL_FFMPEG=OFF /home/diksha/KODI/kodi-android -- Source directory: /home/diksha/KODI/kodi-android -- Build directory: /home/diksha/KODI/kodi-android/build -- Generator: Single-configuration: Debug (Unix Makefiles) -- CMake Version: 3.6.2 -- System type: Linux -- Linker: GNU gold -- Debug Fission enabled -- Core system type: linux -- Platform: -- CPU: x86_64, ARCH: x86_64-linux -- Cross-Compiling: TRUE -- Execute build artefacts on host: FALSE -- Depends based build: 1 -- Checking to see if CXX compiler accepts flag -msse -- Checking to see if CXX compiler accepts flag -msse - yes -- Checking to see if CXX compiler accepts flag -msse2 -- Checking to see if CXX compiler accepts flag -msse2 - yes -- Checking to see if CXX compiler accepts flag -msse3 -- Checking to see if CXX compiler accepts flag -msse3 - yes -- Checking to see if CXX compiler accepts flag -mssse3 -- Checking to see if CXX compiler accepts flag -mssse3 - yes -- Checking to see if CXX compiler accepts flag -msse4.1 -- Checking to see if CXX compiler accepts flag -msse4.1 - yes -- Checking to see if CXX compiler accepts flag -msse4.2 -- Checking to see if CXX compiler accepts flag -msse4.2 - yes -- Checking to see if CXX compiler accepts flag -mavx -- Checking to see if CXX compiler accepts flag -mavx - yes -- Checking to see if CXX compiler accepts flag -mavx2 -- Checking to see if CXX compiler accepts flag -mavx2 - yes -- Could NOT find Avahi (missing: AVAHI_CLIENT_LIBRARY AVAHI_COMMON_LIBRARY AVAHI_CLIENT_INCLUDE_DIR AVAHI_COMMON_INCLUDE_DIR) -- Could NOT find Bluetooth (missing: BLUETOOTH_LIBRARY BLUETOOTH_INCLUDE_DIR) -- Could NOT find CAP (missing: CAP_LIBRARY) -- Could NOT find CCACHE (missing: CCACHE_PROGRAM) -- Could NOT find DBus (missing: DBUS_LIBRARY DBUS_INCLUDE_DIR DBUS_ARCH_INCLUDE_DIR) -- Could NOT find LCMS2 (missing: LCMS2_LIBRARY LCMS2_INCLUDE_DIR) -- Could NOT find mDNS (missing: MDNS_LIBRARY MDNS_INCLUDE_DIR) -- Could NOT find PulseAudio (missing: PULSEAUDIO_LIBRARY PULSEAUDIO_MAINLOOP_LIBRARY PULSEAUDIO_INCLUDE_DIR) (Required is at least version "2.0.0") -- Could NOT find UDEV (missing: UDEV_LIBRARY UDEV_INCLUDE_DIR) -- Could NOT find VAAPI (missing: VAAPI_libva_LIBRARY VAAPI_libva-x11_LIBRARY VAAPI_libva-drm_LIBRARY VAAPI_INCLUDE_DIR) (Required is at least version "0.38.0") -- Could NOT find VDPAU (missing: VDPAU_LIBRARY VDPAU_INCLUDE_DIR) -- Could NOT find OpenGl (missing: OPENGL_gl_LIBRARY OPENGL_glu_LIBRARY OPENGL_INCLUDE_DIR) CMake Error at /home/diksha/KODI/xbmc-depends/x86_64-linux-gnu-native/share/cmake-3.6/Modules/FindPackageHandleStandardArgs.cmake:148 (message): Could NOT find X (missing: X_LIBRARY X_EXT_LIBRARY X_INCLUDE_DIR) (found version "1.6.2") Call Stack (most recent call first): /home/diksha/KODI/xbmc-depends/x86_64-linux-gnu-native/share/cmake-3.6/Modules/FindPackageHandleStandardArgs.cmake:388 (_FPHSA_FAILURE_MESSAGE) cmake/modules/FindX.cmake:32 (find_package_handle_standard_args) cmake/scripts/common/Macros.cmake:360 (find_package) CMakeLists.txt:242 (core_optional_dep) -- Configuring incomplete, errors occurred! See also "/home/diksha/KODI/kodi-android/build/CMakeFiles/CMakeOutput.log". See also "/home/diksha/KODI/kodi-android/build/CMakeFiles/CMakeError.log". make: *** [all] Error 1 make: Leaving directory `/home/diksha/KODI/kodi-android/tools/depends/target/cmakebuildsys' RE: Error while compiling Kodi for Android - Rechi - 2017-03-21 @Harry_chauhan are you trying to compile for android? It seems you haven't done https://github.com/xbmc/xbmc/blob/master/docs/README.android#L201 before executing make -C tools/depends/target/cmakebuildsys If I'm wrong with my assumption tell what you have done so far. RE: Error while compiling Kodi for Android - Harry_chauhan - 2017-03-21 @Rechi, I have followed the steps accordingly in the ReadMe file. but I am not sure if I have been wrong in mid way. I have configured the dependiencies acc to the guide and got the "Dependencies built successfully." message and after that I have tried to execute the make. but now I am struggling with this error. If I have done something wrong with the configurations, then would it be possible to built the dependencies? RE: Error while compiling Kodi for Android - Harry_chauhan - 2017-03-21 for more details I am using x86_64 machine with ubuntu 14.04 and I am trying to make a build from the feature_win64 branch I am using the android-ndk-r12b and inside that I am creating my toolchain with the ./make-standalone-toolchain.sh --ndk-dir=../../ \ --install-dir=/home/diksha/Android/android-ndk-r12b/myToolChain/android-21 --platform=android-21 \ --toolchain=x86-4.9 --arch=x86 then cloned the Kodi to my workspace and checkout to feature_win64 branch then I use the commands as: cd $HOME/kodi-android/tools/depends $ ./bootstrap ./configure --with-toolchain=/home/diksha/Android/android-ndk-r12b/myToolChain/android-21 --prefix=/home/diksha/KODI/xbmc-depends --host=x86_64 --with-tarballs=/home/diksha/KODI/xbmc-depends/tarballs --with-sdk-path=/home/diksha/Android/Sdk --with-ndk=/home/diksha/Android/android-ndk-r12b I have got the "Dependencies built successfully." message but after that when I tried to build Kodi I got the above errors. Please guide me through the correct way. RE: Error while compiling Kodi for Android - Rechi - 2017-03-21 (2017-03-21, 17:14)Harry_chauhan Wrote: for more details I am using x86_64 machine with ubuntu 14.04 and I am trying to make a build from the feature_win64 branchWhy do you want to use feature_win64 branch for compiling android? This branch is basically master and some changes needed for Windows x64. (2017-03-21, 17:14)Harry_chauhan Wrote: ./configure The name of the host parameter is a bit misleading, because host is defining for which target you will build. For android there are three different values, arm-linux-androideabi, aarch64-linux-android or i686-linux-android. The fist one is most likely the one you want. So just execute the configure command again with the corrected host name. PHP Code: ./configure After that rerun make in tools/depends. Than go to /home/diksha/KODI/kodi-android remove the build directory and execute make -C tools/depends/target/cmakebuildsys. Now you should be able to compile kodi for andorid by executing make in the build directory. RE: Error while compiling Kodi for Android - Harry_chauhan - 2017-03-21 This does not seems to be working : Now I am getting following errors: diksha@diksha-ubuntu:~/KODI/kodi-android$ make -C tools/depends/target/cmakebuildsys/ make: Entering directory `/home/diksha/KODI/kodi-android/tools/depends/target/cmakebuildsys' mkdir -p /home/diksha/KODI/kodi-android/build cd /home/diksha/KODI/kodi-android/build; /home/diksha/KODI/xbmc-depends/x86_64-linux-gnu-native/bin/cmake -DCMAKE_TOOLCHAIN_FILE=/home/diksha/KODI/xbmc-depends/arm-linux-androideabi-android-21-debug/share/Toolchain.cmake -DCMAKE_INSTALL_PREFIX=/home/diksha/KODI/xbmc-depends/arm-linux-androideabi-android-21-debug -DCMAKE_BUILD_TYPE=Debug -DENABLE_INTERNAL_CROSSGUID=OFF -DENABLE_INTERNAL_FFMPEG=OFF /home/diksha/KODI/kodi-android -- The CXX compiler identification is unknown -- The C compiler identification is unknown -- The ASM compiler identification is GNU -- Found assembler: /usr/bin/gcc -- Check for working CXX compiler: /usr/bin/g++ -- Check for working CXX compiler: /usr/bin/g++ -- broken CMake Error at /home/diksha/KODI/xbmc-depends/x86_64-linux-gnu-native/share/cmake-3.6/Modules/CMakeTestCXXCompiler.cmake:54 (message): The C++ compiler "/usr/bin/g++" is not able to compile a simple test program. It fails with the following output: Change Dir: /home/diksha/KODI/kodi-android/build/CMakeFiles/CMakeTmp Run Build Command:"/usr/bin/make" "cmTC_dd50e/fast" make[1]: Entering directory `/home/diksha/KODI/kodi-android/build/CMakeFiles/CMakeTmp' /usr/bin/make -f CMakeFiles/cmTC_dd50e.dir/build.make CMakeFiles/cmTC_dd50e.dir/build make[2]: Entering directory `/home/diksha/KODI/kodi-android/build/CMakeFiles/CMakeTmp' Building CXX object CMakeFiles/cmTC_dd50e.dir/testCXXCompiler.cxx.o /usr/bin/g++ -std=gnu++11 -DANDROID -fexceptions -fPIC -DPIC -march=armv7-a -mtune=cortex-a9 -mfloat-abi=softfp -mfpu=neon -frtti -g -D_DEBUG -I/home/diksha/KODI/xbmc-depends/arm-linux-androideabi-android-21-debug/include/android-21 -isystem /home/diksha/KODI/xbmc-depends/arm-linux-androideabi-android-21-debug/include -o CMakeFiles/cmTC_dd50e.dir/testCXXCompiler.cxx.o -c /home/diksha/KODI/kodi-android/build/CMakeFiles/CMakeTmp/testCXXCompiler.cxx g++: error: unrecognized command line option ‘-mfloat-abi=softfp’ g++: error: unrecognized command line option ‘-mfpu=neon’ make[2]: *** [CMakeFiles/cmTC_dd50e.dir/testCXXCompiler.cxx.o] Error 1 make[2]: Leaving directory `/home/diksha/KODI/kodi-android/build/CMakeFiles/CMakeTmp' make[1]: *** [cmTC_dd50e/fast] Error 2 make[1]: Leaving directory `/home/diksha/KODI/kodi-android/build/CMakeFiles/CMakeTmp' CMake will not be able to correctly generate this project. Call Stack (most recent call first): CMakeLists.txt:2 (project) -- Configuring incomplete, errors occurred! See also "/home/diksha/KODI/kodi-android/build/CMakeFiles/CMakeOutput.log". See also "/home/diksha/KODI/kodi-android/build/CMakeFiles/CMakeError.log". make: *** [all] Error 1 make: Leaving directory `/home/diksha/KODI/kodi-android/tools/depends/target/cmakebuildsys' RE: Error while compiling Kodi for Android - Rechi - 2017-03-21 Please post the output of the configure command, you can run it again to get and the content of /home/diksha/KODI/xbmc-depends/arm-linux-androideabi-android-21-debug/share/Toolchain.cmake. Use http://pastebin.com or something similar for posting these. RE: Error while compiling Kodi for Android - Harry_chauhan - 2017-03-21 checking build system type... x86_64-pc-linux-gnu checking host system type... arm-unknown-linux-androideabi checking for arm-linux-androideabi-g++... no checking for arm-linux-androideabi-c++... no checking for arm-linux-androideabi-gpp... no checking for arm-linux-androideabi-aCC... no checking for arm-linux-androideabi-CC... no checking for arm-linux-androideabi-cxx... no checking for arm-linux-androideabi-cc++... no checking for arm-linux-androideabi-cl.exe... no checking for arm-linux-androideabi-FCC... no checking for arm-linux-androideabi-KCC... no checking for arm-linux-androideabi-RCC... no checking for arm-linux-androideabi-xlC_r... no checking for arm-linux-androideabi-xlC... no checking for g++... g++ checking whether the C++ compiler works... yes checking for C++ compiler default output file name... a.out checking for suffix of executables... checking whether we are cross compiling... no checking for suffix of object files... o checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking whether g++ supports C++11 features by default... no checking whether g++ supports C++11 features with -std=gnu++11... yes checking for ccache... no checking for unzip... yes checking for zip... yes checking for curl... /usr/bin/curl checking for tar... /bin/tar checking for arm-linux-androideabi-ranlib... no checking for ranlib... /usr/bin/ranlib configure: WARNING: using cross tools not prefixed with host triplet checking for arm-linux-androideabi-ld... no checking for ld... /usr/bin/ld checking for arm-linux-androideabi-ar... no checking for ar... /usr/bin/ar checking for arm-linux-androideabi-readelf... no checking for readelf... /usr/bin/readelf checking for arm-linux-androideabi-strip... no checking for strip... /usr/bin/strip checking for arm-linux-androideabi-as... no checking for as... /usr/bin/as checking for arm-linux-androideabi-nm... no checking for nm... /usr/bin/nm checking for arm-linux-androideabi-objdump... no checking for objdump... /usr/bin/objdump checking for arm-linux-androideabi-gcc... no checking for gcc... /usr/bin/gcc checking for arm-linux-androideabi-g++... no checking for g++... /usr/bin/g++ checking how to run the C preprocessor... /usr/bin/gcc -E checking for ranlib... /usr/bin/ranlib checking for ld... /usr/bin/ld checking for ar... /usr/bin/ar checking for readelf... /usr/bin/readelf checking for strip... /usr/bin/strip checking for as... /usr/bin/as checking for nm... /usr/bin/nm checking for objdump... /usr/bin/objdump checking for gcc... /usr/bin/gcc checking for g++... /usr/bin/g++ checking for library containing iconv_open... none required checking for main in -lcrystax... no checking for aapt... /home/diksha/Android/Sdk/build-tools/25.0.1/aapt checking for dx... /home/diksha/Android/Sdk/build-tools/25.0.1/dx checking for zipalign... /home/diksha/Android/Sdk/build-tools/25.0.1/zipalign configure: creating ./config.status config.status: creating target/config.site config.status: creating native/config.site.native config.status: creating Makefile.include config.status: creating target/Toolchain.cmake config.status: creating target/config-binaddons.site config.status: creating target/Toolchain_binaddons.cmake ccache: no toolchain: /home/diksha/Android/android-ndk-r12b/myToolChain/android-21 cpu: armeabi-v7a host: arm-linux-androideabi sdk-platform: android-21 build-tools: /home/diksha/Android/Sdk/tools:/home/diksha/Android/Sdk/platform-tools:/home/diksha/Android/Sdk/build-tools/25.0.1 use simulator: 'target/config.site' -> '/home/diksha/KODI/xbmc-depends/arm-linux-androideabi-android-21-debug/share/config.site' 'target/config-binaddons.site' -> '/home/diksha/KODI/xbmc-depends/x86_64-linux-gnu-native/share/config-binaddons.site' 'target/Toolchain.cmake' -> '/home/diksha/KODI/xbmc-depends/arm-linux-androideabi-android-21-debug/share/Toolchain.cmake' 'target/Toolchain_binaddons.cmake' -> '/home/diksha/KODI/xbmc-depends/arm-linux-androideabi-android-21-debug/share/Toolchain_binaddons.cmake' 'native/config.site.native' -> '/home/diksha/KODI/xbmc-depends/x86_64-linux-gnu-native/share/config.site' #------- configuration -------# build type: debug toolchain: /home/diksha/Android/android-ndk-r12b/myToolChain/android-21 cpu: armeabi-v7a host: arm-linux-androideabi cflags: -DANDROID -fexceptions -fPIC -DPIC -march=armv7-a -mtune=cortex-a9 -mfloat-abi=softfp -mfpu=neon -g -D_DEBUG cxxflags: -std=gnu++11 -DANDROID -fexceptions -fPIC -DPIC -march=armv7-a -mtune=cortex-a9 -mfloat-abi=softfp -mfpu=neon -frtti -g -D_DEBUG ldflags: -L/home/diksha/KODI/xbmc-depends/arm-linux-androideabi-android-21-debug/lib/android-21 prefix: /home/diksha/KODI/xbmc-depends depends: /home/diksha/KODI/xbmc-depends/arm-linux-androideabi-android-21-debug sdk-platform: android-21 build-tools: /home/diksha/Android/Sdk/tools:/home/diksha/Android/Sdk/platform-tools:/home/diksha/Android/Sdk/build-tools/25.0.1 RE: Error while compiling Kodi for Android - Rechi - 2017-03-21 It seems like your toolchain path (specified with --with-toolchain=) is wrong. In the directory must be a bin directory which contains the flowing programs: arm-linux-androideabi-ar arm-linux-androideabi-as arm-linux-androideabi-g++ arm-linux-androideabi-gcc arm-linux-androideabi-ld arm-linux-androideabi-nm arm-linux-androideabi-objdump arm-linux-androideabi-ranlib arm-linux-androideabi-readelf arm-linux-androideabi-strip. You must reconfigure with the correct path and build the dependencies again. I don't know if other paths are also wrong, but you will see it when you still get errors. RE: Error while compiling Kodi for Android - Harry_chauhan - 2017-03-22 @Rechi: thanks for the help I tried to correct my configurations and worked for me. but now I am getting the following error after executing make in my build dir: [ 38%] Built target info_interface [ 38%] Generating ServiceDescription.h /bin/sh: 1: //home/diksha/xbmc-depends/x86_64-linux-gnu-native/bin/JsonSchemaBuilder: not found make[2]: *** [build/ServiceDescription.h] Error 127 make[1]: *** [build/interfaces/json-rpc/schema/CMakeFiles/generate_json_header.dir/all] Error 2 make: *** [all] Error 2 |