v20 "normal" build config for various platforms
#1
I'm trying to add the "ICUC4" library to Kodi, so I need to build on various platforms. How can I find out the "normal" build configurations, say, that Jenkins uses for Android, Windoze, etc? I'm starting with Android aarch64 since it "sounds" newer than the other Android flavor. Or am I going about this wrong?

For Android, after much headache and help, I have the basics working. I can cross-compile on Linux, but I don't know the options that I should use or what dependencies that I should build. Undoubtedly I can figure this out, but I am hoping to just copy whatever the 'official' build uses, or at least use that as a starting point. Currently I have:
             --host=${host} \
                --with-sdk-path=$HOME/android-tools/android-sdk-linux \
                --with-ndk-path=$HOME/android-tools/android-ndk-r21e \
                --prefix=$HOME/android-tools/xbmc-depends \
                --enable-debug=yes
                --with-target-cxxflags="-std=c++17"
             # --with-target-cflags= \
            #  --with-target-ldflags= \
             # --with-toolchain=/usr

   # exit $?
fi
# BUILD TOOLS and dependencies


if ${BUILD_TOOLS} -eq 1 (wiki); then
   make -j$(getconf _NPROCESSORS_ONLN)
   #exit $?
fi


#make -C tools/depends/target/libicu BUILD_DIR=${BUILD_DIR}

#exit $?

cd  ${KODI_SOURCE}


if ${BUILD_KODI} -eq 1 (wiki); then
   # Configure CMAKE

   make -C tools/depends/target/cmakebuildsys BUILD_DIR=${BUILD_DIR}

   # Build KODI

   make -j$(getconf _NPROCESSORS_ONLN)
   echo $?
fi

But it blows up building Python3.9 "/python3.9/lib-dynload/_sysconfigdata__linux_.py': No such file or directory", which I have not started to investigate. But I don't know if I need to build python for android in the first place (I suspect that I do).

For my purposes I think that I just need to build the minimum required to show that ICU4C can be built and unit-tests run. It would be better to demonstrate that it can be done with the full-blown shipped product so that any problems with memory footprint or other resource limits show up.

Any guidance appreciated.




Thanks
Reply
#2
Android dependencies are all done via tools/depends folder. It's all self contained, just follow the docs.

A toolchain file is generated by the configure script that sets all appropriate flags that are used by default when building for any of the 3 android arch types.
Reply
#3
I didnt really want to get too involved in this. But heres the info i have offhand

You'll need to build icu as both a native and a target dependency. For cross compile it requires icu tools.
Looks like harfbuzz is a dependency (based off https://github.com/unicode-org/icu/blob/...#L155-L157)

Something like https://github.com/fuzzard/xbmc/commit/9...454b2a48b3

its a bit hacky, the fact we have to refer directly into the native build dir (which isnt and shouldnt be guaranteed to be populated). No idea if theres a make install target for the config folder, but id look into that as a first step, and if not possible, look to hack around it and copy the minimal stuff into NATIVEPREFIX.

The above compiles (macos host, android aarch64 target). Completely untested past that.  Apple platforms.*should* compile as is, unless theres some apple specific flags required

Edit: just as a side note, this looks to be a HEAVY dependency to add. Im not sure what it'll do to apk sizes, but something to keep in the back of the mind, as there are size limits to apk sizes uploaded to Play Store (100mb with our current apk target, 150mb if we go to abb)
Reply
#4
Many thanks. I'm SLOWLY slogging my way through. I'm also concerned about the size of things.
Reply

Logout Mark Read Team Forum Stats Members Help
"normal" build config for various platforms0