Android Error at step build Kodi
#1
I'm using Ubuntu 20.04 LTS on Window 10

I'm following this https://github.com/xbmc/xbmc/blob/master...Android.md

Android SDK: commandlinetools-linux-7583922_latest

Android NDK: android-ndk-r21e-linux-x86_64

I use this configure:
./configure --with-tarballs=$HOME/android-tools/xbmc-tarballs --host=x86_64-linux-android --with-sdk-path=$HOME/android-tools/android-sdk-linux --with-ndk-path=$HOME/android-tools/android-ndk-r21e --prefix=$HOME/android-tools/xbmc-depends

I got an error at step build Kodi:

After run this step:
Quote:cd $HOME/kodi
make -C tools/depends/target/cmakebuildsys
Here is log after run:

https://paste.kodi.tv/vuwupuxozu

As you can see everything seem like work well:
Quote:-- Found Dav1d: /root/android-tools/xbmc-depends/x86_64-linux-android-21-debug/lib/libdav1d.a (found version "0.8.1")

But when I run :
Quote:cd cd $HOME/kodi/build
make -j$(getconf _NPROCESSORS_ONLN)
It run few minutes and then logged this error:
Quote:ERROR: dav1d >= 0.5.0 not found using pkg-config

If you think configure made a mistake, make sure you are using the latest
version from Git.  If the latest version fails, report the problem to the
[email protected] mailing list or IRC #ffmpeg on irc.freenode.net.
Include the log file "ffbuild/config.log" produced by configure as this will help
solve the problem.
make[5]: *** [CMakeFiles/ffmpeg.dir/build.make:92: ffmpeg-prefix/src/ffmpeg-stamp/ffmpeg-configure] Error 1
make[4]: *** [CMakeFiles/Makefile2:83: CMakeFiles/ffmpeg.dir/all] Error 2
make[3]: *** [Makefile:136: all] Error 2
make[2]: *** [CMakeFiles/ffmpeg.dir/build.make:86: build/ffmpeg/src/ffmpeg-stamp/ffmpeg-build] Error 2
make[1]: *** [CMakeFiles/Makefile2:4510: CMakeFiles/ffmpeg.dir/all] Error 2
make: *** [Makefile:91: all] Error 2
Here is full log:

https://paste.kodi.tv/iwuputusoh.kodi

I don't known why it cannot find 'dav1d' although in first log it said 'Found dav1d'.
If missing path, where should I configure for it.

Any solutions for this issue? Please help me, I stucked here for a week. Thank you!
Reply
#2
I can't edit the post so I note that I run: 'cd $HOME/kodi/build' not 'cd cd $HOME/kodi/build'
Thank you!
Reply
#3
Hi, I have similar issues when following the android building guide: https://github.com/xbmc/xbmc/blob/master...Android.md
At Step 5, similar step as you descibed: make -j$(getconf _NPROCESSORS_ONLN), I got several diffierent issues and I could somehow resolve them by running the command again and again...
However, I'm now stuck at a point where this trick doesn't work anymore, see snippet:

log:
make[4]: Leaving directory '/root/kodi/tools/depends/target/xz/x86_64-linux-android-21-debug/po'
Making install in tests
make[4]: Entering directory '/root/kodi/tools/depends/target/xz/x86_64-linux-android-21-debug/tests'
make[5]: Entering directory '/root/kodi/tools/depends/target/xz/x86_64-linux-android-21-debug/tests'
make[5]: Nothing to be done for 'install-exec-am'.
make[5]: Nothing to be done for 'install-data-am'.
make[5]: Leaving directory '/root/kodi/tools/depends/target/xz/x86_64-linux-android-21-debug/tests'
make[4]: Leaving directory '/root/kodi/tools/depends/target/xz/x86_64-linux-android-21-debug/tests'
make[4]: Entering directory '/root/kodi/tools/depends/target/xz/x86_64-linux-android-21-debug'
make[5]: Entering directory '/root/kodi/tools/depends/target/xz/x86_64-linux-android-21-debug'
make[5]: Nothing to be done for 'install-exec-am'.
make[5]: Leaving directory '/root/kodi/tools/depends/target/xz/x86_64-linux-android-21-debug'
make[4]: Leaving directory '/root/kodi/tools/depends/target/xz/x86_64-linux-android-21-debug'
make[3]: Leaving directory '/root/kodi/tools/depends/target/xz/x86_64-linux-android-21-debug'
touch .installed-x86_64-linux-android-21-debug
make[2]: Leaving directory '/root/kodi/tools/depends/target/xz'
make[1]: Leaving directory '/root/kodi/tools/depends/target'
Makefile:11: recipe for target 'target/.installed-x86_64-linux-android-21-debug' failed
make: *** [target/.installed-x86_64-linux-android-21-debug] Error 2
Reply
#4
It would interesting to know if someone still is able to succeed with the building guide for Android (X86_64)
Reply
#5
ive got to ask, whats the reason for building android x86_64?

Its not built as part of our CI at all, and both x86 and x86_64 were even removed completely at one point, so its a totally unknown state.

Android x86 (32bit) is still built as part of our CI, and it builds nightly against both master and Matrix branches.
Reply
#6
had some spare time to kill. do the following patch to fix dependency builds for android x86_64.
run your configure command again. make sure to do meson-cross-file target to regenerate the cross-file.meson, build dav1d and then ffmpeg, should be good to go.

I cant say if kodi builds/runs, but dependencies complete

cpp:

diff --git a/tools/depends/configure.ac b/tools/depends/configure.ac
index 10ab5066fe..0f3064272f 100644
--- a/tools/depends/configure.ac
+++ b/tools/depends/configure.ac
@@ -302,12 +302,18 @@ case $host in
         fi
         meson_cpu="aarch64"
       ;;
-      i*86*-linux-android*|x86_64*-linux-android*)
+      i*86*-linux-android*)
         if test "x$use_cpu" = "xauto"; then
           use_cpu=$host_cpu
         fi
         meson_cpu="x86"
       ;;
+      x86_64*-linux-android*)
+        if test "x$use_cpu" = "xauto"; then
+          use_cpu=$host_cpu
+        fi
+        meson_cpu="x86_64"
+      ;;
       *)
         AC_MSG_ERROR(unsupported host ($use_host))
       esac
Reply
#7
Thanks a lot, I will try it later today!
The reason for X86_64 is that the built-in android in my Polestar car (AAOS - Android 10) is using a x86_64 CPU.
However the AAOS Google Play Store only has around 40 apps, so I'm going to re-build the missing apps by myself Smile
After Mozilla Firefox, which was easy to re-build using Android Studio, I'm now trying to build Kodi.

Do you know if this will also work in Android Studio for Linux?

Best regards,
Dary
Reply
#8
Hi again,

Could you please give us a little guidance how to build dav1d?

I get still this error:
log:
make -C ffmpeg
make[2]: Entering directory '/root/kodi/tools/depends/target/ffmpeg'
rm -rf x86_64-linux-android-21-debug; mkdir -p x86_64-linux-android-21-debug
cd x86_64-linux-android-21-debug; /bin/tar --strip-components=1 -xf /root/android-tools/xbmc-tarballs/ffmpeg-4.4-N-Alpha1.tar.gz
cd x86_64-linux-android-21-debug;    ./configure --prefix=/root/android-tools/xbmc-depends/x86_64-linux-android-21-debug --extra-version="kodi-4.4-N-Alpha1" --cc="/root/android-tools/android-ndk-r21e/toolchains/llvm/prebuilt/linux-x86_64/bin/x86_64-linux-android21-clang" --cxx="/root/android-tools/android-ndk-r21e/toolchains/llvm/prebuilt/linux-x86_64/bin/x86_64-linux-android21-clang++" --ar=/root/android-tools/android-ndk-r21e/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-ar --ranlib=/root/android-tools/android-ndk-r21e/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-ranlib --strip=/root/android-tools/android-ndk-r21e/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-strip --extra-cflags="-DANDROID -D__ANDROID_API__=21 -fexceptions -funwind-tables -fstack-protector-strong -no-canonical-prefixes -fPIC -DPIC -Og -g -D_DEBUG  -I/root/android-tools/xbmc-depends/x86_64-linux-android-21-debug/include/android-21 -isystem /root/android-tools/xbmc-depends/x86_64-linux-android-21-debug/include" --extra-cxxflags="-DANDROID -D__ANDROID_API__=21 -fexceptions -funwind-tables -fstack-protector-strong -no-canonical-prefixes -fPIC -DPIC -frtti -Og -g -D_DEBUG  -I/root/android-tools/xbmc-depends/x86_64-linux-android-21-debug/include/android-21 -isystem /root/android-tools/xbmc-depends/x86_64-linux-android-21-debug/include" --extra-ldflags="-L/root/android-tools/xbmc-depends/x86_64-linux-android-21-debug/lib -Wl,--exclude-libs,libgcc.a -Wl,--exclude-libs,libatomic.a -L/root/android-tools/xbmc-depends/x86_64-linux-android-21-debug/lib/android-21  " --pkg-config=/root/android-tools/xbmc-depends/x86_64-linux-gnu-native/bin/pkg-config --disable-doc --disable-devices --disable-programs --disable-sdl2 --enable-gpl --enable-postproc --enable-runtime-cpudetect --enable-pthreads --enable-gnutls --enable-libdav1d  --enable-cross-compile --pkg-config-flags=--static --enable-pic --cpu=x86_64 --extra-cflags='-mno-stackrealign' --target-os=android --extra-libs=-liconv --x86asmexe=/root/android-tools/xbmc-depends/x86_64-linux-gnu-native/bin/nasm --arch=x86_64
ERROR: dav1d >= 0.5.0 not found using pkg-config
Reply
#9
Imo just start again. Apply the above patch, then build native/target as instructed in docs
Reply
#10
Hi Fuzzard,

I have done a complete new git clone, so you patch should be already inside.
I tried to clean the errors, with:

make -C target/dav1d distclean
make -C target/ffmpeg distclean 

But the error remains:

log:
If you think configure made a mistake, make sure you are using the latest
version from Git.  If the latest version fails, report the problem to the
[email protected] mailing list or IRC #ffmpeg on irc.freenode.net.
Include the log file "ffbuild/config.log" produced by configure as this will help
solve the problem.
Makefile:87: recipe for target 'x86_64-linux-android-21-debug' failed
make[2]: *** [x86_64-linux-android-21-debug] Error 1
make[2]: Leaving directory '/root/kodi/tools/depends/target/ffmpeg'
Makefile:181: recipe for target 'ffmpeg' failed
make[1]: *** [ffmpeg] Error 2
make[1]: Leaving directory '/root/kodi/tools/depends/target'
Makefile:11: recipe for target 'target/.installed-x86_64-linux-android-21-debug' failed
make: *** [target/.installed-x86_64-linux-android-21-debug] Error 2

Any command I need to execute before running make again?
Reply
#11
Did you apply the patch after the clone? It's not in any repo/branch, you have to manually apply it.
Reply
#12
I didn't apply the patch as I thought it's inside the new clone.
So how do I do this? Should I add the code from you to meson-cross-setup.sh?

Code:
diff --git a/tools/depends/configure.ac b/tools/depends/configure.ac index 10ab5066fe..0f3064272f 100644 --- a/tools/depends/configure.ac +++ b/tools/depends/configure.ac @@ -302,12 +302,18 @@ case $host in fi meson_cpu="aarch64" ;; - i*86*-linux-android*|x86_64*-linux-android*) + i*86*-linux-android*) if test "x$use_cpu" = "xauto"; then use_cpu=$host_cpu fi meson_cpu="x86" ;; + x86_64*-linux-android*) + if test "x$use_cpu" = "xauto"; then + use_cpu=$host_cpu + fi + meson_cpu="x86_64" + ;; *) AC_MSG_ERROR(unsupported host ($use_host)) esac
Reply
#13
Hi, I replaced your code in the configure.ac file, but the issue remains

See the patched configure.ac file here: https://paste.kodi.tv/dusowayinu
Reply
#14
Clear out your prefix path, run bootstrap/configure again.

Once again I'll mention, this is not a supported target anymore. You're on your own realistically with getting it to work.
Reply
#15
(2021-11-29, 07:47)Fuzzard Wrote: had some spare time to kill. do the following patch to fix dependency builds for android x86_64.
run your configure command again. make sure to do meson-cross-file target to regenerate the cross-file.meson, build dav1d and then ffmpeg, should be good to go.

I cant say if kodi builds/runs, but dependencies complete

cpp:

diff --git a/tools/depends/configure.ac b/tools/depends/configure.ac
index 10ab5066fe..0f3064272f 100644
--- a/tools/depends/configure.ac
+++ b/tools/depends/configure.ac
@@ -302,12 +302,18 @@ case $host in
         fi
         meson_cpu="aarch64"
       ;;
-      i*86*-linux-android*|x86_64*-linux-android*)
+      i*86*-linux-android*)
         if test "x$use_cpu" = "xauto"; then
           use_cpu=$host_cpu
         fi
         meson_cpu="x86"
       ;;
+      x86_64*-linux-android*)
+        if test "x$use_cpu" = "xauto"; then
+          use_cpu=$host_cpu
+        fi
+        meson_cpu="x86_64"
+      ;;
       *)
         AC_MSG_ERROR(unsupported host ($use_host))
       esac

Hi Fuzzard,

I think I'm pretty close to get Kodi build, could you please explain your steps a bit more detailed: ...make sure to do meson-cross-file target to regenerate the cross-file.meson, build dav1d and then ffmpeg, should be good to go.
  • How do I make sure to do meson-cross-file target to regenerate the cross-file.meson? (please share the command)
  • How do I manually build dav1d and then ffmpeg (please share the commands)

Thanks a lot and sorry for being an absolute beginner on this,
Dary
Reply

Logout Mark Read Team Forum Stats Members Help
Error at step build Kodi0