[mythtv] Building for Android, mariadb issue

John P Poet jppoet at gmail.com
Sun Aug 5 20:49:41 UTC 2018

> > > which ndk?
> > > I have validated 13b
> > > 14 onwards has missing headers.
> > > The other thing to check is your default environment. printenv.
> > > Not sure otherwise.
> >
> > I vaguely remember some nl_langinfo problem, but not the solution.
> > I'm searching my old emails.  I'll reply if find something.
> My search didn't yield anything.  As Mark said, make sure you're using
> the currently, preferred NDK.  Also, make sure you run "./makelibs.sh
> all" instead of simply "./makelibs.sh".  I know that tripped me up at
> first.

I downloaded and linked r13b.  That seems to mess up the toolchain.  Even
after re-running maketoolchain.sh, I got:
* /home/john/android/android-ndk/my-android-toolchain64/bin/aarch64-linux-android-gcc:
Command not found*

So, I deceded to start from with a brand new VM.  Since the instructions
say to use r15c, I took one more stab at it, this time replacing the ndk
that android-studio downloads.  android-studio installs ndk 17.1.482850 in
~/Android/Sdk/ndk-bundle.  I moved that aside. and put android-ndk-r15c in
its place:

*$ ls -al ~/Android/Sdk*

*total 60drwxrwxr-x. 14 john john 4096 Aug  3 20:41 .drwxrwxr-x.  3 john
john 4096 Aug  3 20:29 ..drwxr-xr-x. 15 john john 4096 Aug  3 20:44
android-ndk-r15cdrwxrwxr-x.  3 john john 4096 Aug  3 20:33
build-toolsdrwxrwxr-x.  3 john john 4096 Aug  3 20:35 cmakedrwxrwxr-x.  7
john john 4096 Aug  3 20:32 emulatordrwxrwxr-x.  4 john john 4096 Aug  3
20:32 extras-rw-rw-r--.  1 john john   16 Aug  3 20:43
.knownPackagesdrwxrwxr-x.  2 john john 4096 Aug  3 20:35
licenseslrwxrwxrwx.  1 john john   16 Aug  3 20:41 ndk-bundle ->
android-ndk-r15cdrwxrwxr-x. 13 john john 4096 Aug  3 20:38
ndk-bundle-bakdrwxrwxr-x.  3 john john 4096 Aug  3 20:31
patcherdrwxrwxr-x.  5 john john 4096 Aug  3 20:35 platformsdrwxrwxr-x.  5
john john 4096 Aug  3 20:29 platform-toolsdrwxrwxr-x.  4 john john 4096
Aug  3 20:35 sourcesdrwxrwxr-x.  6 john john 4096 Aug  3 20:31 tools*

The instructions also expect the android-sdk to be in ~/android, so I setup
a soft link from the default location of ~/Android/Sdk to
~/android/android-sdk-linux. I end up with:

*$ ls -al ~/android*

*android-ndk -> android-sdk-linux/ndk-bundleandroid-sdk-linux ->

When I go to build, I get lots of warnings:
*BFD: libncurses.so.5: cannot open shared object file: No such file or
but that does not seem to affect the build.

It still fails on mariadb, but this time the error is different:
fatal error: iconv.h: No such file or directory

So, I finally relented and replaced r15c with r13b.  Like with r15c, I
installed into ~/Android/Sdk and adjusted the softlinks.  After running
maketoolchain.sh I tried to build the libs, and once again got:
Command not found*

So, from scratch again...

This time, I moved ~/Android/Sdk/ndk-bundle out of the way, and replaced it
with android-ndk-r13b.  Then I soft linked that to ~/android/android-ndk .
Once again, I have ~/Android/Sdk soft linked to
~/android/android-sdk-linux.  And... it still fails to build:

*make[1]: Entering directory
../util/mkbuildinf.pl <http://mkbuildinf.pl>
-DHAVE_DLFCN_H -D__ANDROID_API__=21 -mandroid -I/include -B/lib -O3
-fomit-frame-pointer -Wall" "android"
-DHAVE_DLFCN_H -D__ANDROID_API__=21 -mandroid -I/include -B/lib -O3
-fomit-frame-pointer -Wall   -c -o cryptlib.o cryptlib.cmake[1]:
Command not found*

With r13b, I seem to always end up with a path issue.  It will build some
of the libs, but eventually fails because it cannot
findaarch64-linux-android-gcc.  Honestly, it makes it further with r15c.

I am obviously making bad guesses on what to do regarding difference with
the latest package of android-studio, compared to what the instructions
expect.  After hacking on this for over four hours, I am fried.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mythtv.org/pipermail/mythtv-dev/attachments/20180805/3ebcd29f/attachment.html>

More information about the mythtv-dev mailing list