Building srt on android arm64 and x86_64 fails
I can build the cerbero 1.14 branch for android without incident as it exists. Unfortunately, there is no srt support there by default. I'm attempting to add the srt plugin so I can use that in an Android app.
While trying to build gstreamer-plugins-bad with srt support on Android, I've run into a variety of challenges.
I have a Dockerfile you can use to reproduce my 1.14 + srt build problem here:
I can build 1.14 with srt support for android armv7 and android x86 successfully.
When I try to build srt for android arm64 or android x86_64, I get this error:
./cerbero-uninstalled -c config/cross-android-x86.cbc build srt ... /cerbero/build/sources/android_arm64/srt-1.3.1/srtcore/core.cpp:5494: error: undefined reference to 'std::istream::seekg(long long, std::_Ios_Seekdir)'
Looking at https://github.com/Haivision/srt/blob/master/docs/Android/Compiling.md , it appears that building srt with gnustl has been removed as it has been deprecated:
GNU compilers and gnustl will be removed from NDK starting Q3 2018, so we will use clang and libc++.
Taking that as a clue as maybe things have changed in the 1.15.0 master branch, I run into entirely different sets of problems.
The first problem with the master branch is that
recipes/gettext.recipe contains a patch filename that is missing the .patch extension, requiring the following fixup to build at all:
sed -i -e "s%'gettext/0001-Fix-linker-error-Cannot-export-rpl_printf'%'gettext/0001-Fix-linker-error-Cannot-export-rpl_printf.patch'%" recipes/gettext.recipe
Even with this small fix, however, I don't get very far:
./cerbero-uninstalled -c config/cross-android-armv7.cbc build libiconv gnustl gettext ... /usr/bin/ld: unrecognised emulation mode: armelf_linux_eabi Supported emulations: elf_x86_64 elf32_x86_64 elf_i386 elf_iamcu i386linux elf_l1om elf_k1om i386pep i386pe clang: error: linker command failed with exit code 1 (use -v to see invocation) Makefile:227: recipe for target 'libintl.la' failed
There is a toolchain problem going on here with the 1.15 master branch that makes cross builds problematic.
Here is the Dockerfile for 1.15.0 (master branch) that encounters this newer more substantial android cross-compile build problem for all architectures:
This really only leaves gst-build to act as an android build harness. Digging into gst-build, it appears that cross-building for android with that just isn't ready yet.
That leaves me in a bit of a lurch here. Given the general broken state of the cerbero master branch for android cross builds, I'm going to keep iterating with srt and 1.14 until I can figure out how to get past this silly android 64 bit gnustl build problem.