[mythtv] [mythtv-users] Android mythfrontend mysql driver problems

David Engel david at istwok.net
Wed Oct 5 01:39:40 UTC 2022


On Wed, Oct 05, 2022 at 09:54:10AM +1100, Mark Spieth wrote:
> 
> On 5/10/2022 8:28 am, David Engel wrote:
> > On Mon, Oct 03, 2022 at 08:41:21PM -0500, David Engel wrote:
> > > On Sun, Oct 02, 2022 at 08:12:03PM +1100, Mark Spieth wrote:
> > > > On 29/09/2022 11:04 pm, Peter Bennett wrote:
> > > > > On 9/29/22 01:05, David Hampton via mythtv-dev wrote:
> > > > > > On Wed, 2022-09-28 at 17:34 -0400, Peter Bennett wrote:
> > > > > > > On 9/28/22 17:15, David Engel wrote:
> > > > > > > > What problem?  I've rebuilt recently with no, new problems.  There
> > > > > > > > are some resume from sleep related problems but I've usually
> > > > > > > > attributed them to Nvidia Shield updates and not MythTV.
> > > > > > > The problems are:
> > > > > > > 
> > > > > > > 1. The build required API level 29 but the fire stick only has 25.
> > > > > > > This would not affect the Shield. It was caused by the new QT which
> > > > > > > disallowed specification of the minimum version in the manifest. I
> > > > > > > fixed this locally by going back to api version 21 as we had used
> > > > > > > before.
> > > > > > > 
> > > > > > > 2. Rebuilding the libs, I was unable to build the mariadb-connector
> > > > > > > library due to an error in the cmake file ConnectorName.cmake . It
> > > > > > > has an END() command where it should have had ENDIF(). The build
> > > > > > > failed with error "CMake Error at cmake/ConnectorName.cmake:30
> > > > > > > (ENDMACRO):   Flow control statements are not properly nested.".
> > > > > > > Changing it to ENDIF let the build complete that but I don't know
> > > > > > > what is really going on with this, whether the downloaded source has
> > > > > > > an error or whether some patch was applied incorrectly or if I am
> > > > > > > just misunderstanding the whole problem.
> > > > > > The downloaded source has an error.
> > > > > > 
> > > > > > > 3. After fixing those, I built and installed mythfrontend (32bit
> > > > > > > version) on a fire stick 4K. Starting it up fails with the message
> > > > > > > "mythdbcon.cpp:84:MSqlDatabase  FATAL: Unable to load the QT QMYSQL
> > > > > > > driver, is it installed?". All I see is the splash screen for a few
> > > > > > > seconds then back to the android home page.
> > > > > > > 
> > > > > > > It is possible that my fix for the mariadb connector was all wrong
> > > > > > > and caused the DB problem. Or maybe we need a different mariadb
> > > > > > > connector version. It is using version 2.3.7.
> > > > I have pushed an update to the android libs and patches.
> > > > 
> > > > There is now a config for various devices, nvshield and firetv-max
> > > > 
> > > > No more managing SDK, NDK and arm versions and trying to remember what you
> > > > last used. I left these much as before. firetv is at TARGETSDK 28 and build
> > > > SDK must be at least 29 use to qt build requirements.
> > > > 
> > > > to compile
> > > > 
> > > >          make CONFIG=firetv-max distclean everything
> > > This is a good step toward something I wanted to do long ago.  At
> > > least two things are still missing.
> > > 
> > > * Use a Makefile to only build the libs that need to be rebuilt doing
> > >    everything in makelibs.sh.
> > > 
> > > * Allow specifying the libs(install)?(64)?, build(64)? and
> > >    mythinstall(64)?  direcotires in the config file.  That would allow
> > >    for things like keeping a stable nvshield config while working on an
> > >    nvshield-test build.
> > > 
> > > On the bad news front, my build goes into an infinite loop somehow.
> > > I'll investigate more tomorrow.
> > I'm still not sure why it went into an infinite loop but the core
> > probelm is in soundtouch/bootstrap.  It is a /bin/sh script which uses
> > "-a" in a if/elif test in two places.  The problem is that /bin/sh on
> > Debian is dash and it doesn't support -a.  The fix is either to patch
> > bootstrap to use /bin/bash or explicily execute bootstrap with bash in
> > makelibs.sh.  Which fix do you prefer?
> > 
> Fix the script so it uses compatible constructs to dash I think.

Okay.  I'll do that tomorrow.

> The other way is to use "test" instead of the built-in contitional
> functionality. I think "test" supports it all.

/bin/test on Debian doesn't support -a either.

> Doesnt really matter which way.
> 
> is [[ ]] construct treated differently in dash vs bash? That may be an issue
> too as its used in a few places.
> 
> Are there any -o operators too?

Neither are supported in dash.  FWIW, the immediate issue appears to
be limited to just soundtouch and will be fixed there.

Assuming /bin/sh is Bash is an all too common, but invalid, assumtion
in Linux.  IME, if one wants to use Bashisms, that's fine and
reasonable on Linux.  Just make sure it's explicitly run by /bin/bash
and not /bin/sh.

> Ill have to remember that.
> 
> I also want to use sdkmanager to auto pull in any missing android build
> components. That should also make it easier to use. Maybe even make it
> CI-able.
> 
> Also, adding the customizable dir suffix should be easy. makelibs deps a bit
> harder. But it doesnt take that long.

NOt as long as it used to with my newish (to me) 16-core/32-thread
desktop. :)

FYI, I noticed at least a couple of things built by makelibs don't
honor/use -j$NCPUS.  At least one uses cmake.  I don't know how to
request parallel builds with it.  Fixing those would speed things up a
little more.

David
-- 
David Engel
david at istwok.net


More information about the mythtv-dev mailing list