Mailing List Archive

Android mythfrontend mysql driver problems
There are multiple problems in mythfrontend master on android.

The one I am currently investigating is the database connection.

The makelibs.sh script is building mariadb-connector. There is an option
to build a mysql connector but that is not invoked by default.

After building and installing on fire stick 4K, mythfrontend fails thus:
mythdbcon.cpp:84:MSqlDatabase  FATAL: Unable to load the QT QMYSQL
driver, is it installed?

I tried to run the makelibs.sh with the mysqlplugin option and that
failed, it is looking for a QT directory that does not exist. The only
database driver in the QT source is sqlite.

I don't know why we are building the mariadb connector and what happened
to the mysql qt driver.

Anybody have ideas on this?

Perhaps there is a separate download for the QT Mysql driver source? How
did this work before?

Peter

_______________________________________________
mythtv-dev mailing list
mythtv-dev@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-dev
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: [mythtv-users] Android mythfrontend mysql driver problems [ In reply to ]
On Wed, Sep 28, 2022 at 04:04:54PM -0400, Peter Bennett wrote:
> There are multiple problems in mythfrontend master on android.
>
> The one I am currently investigating is the database connection.

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 makelibs.sh script is building mariadb-connector. There is an option to
> build a mysql connector but that is not invoked by default.

I don't remember when it changed but I suspect Mark Spieth knows/did
it. FWIW, I don't have an issue with that change. IMO, MariaDB >>>>>
MySQL.

David

> After building and installing on fire stick 4K, mythfrontend fails thus:
> mythdbcon.cpp:84:MSqlDatabase? FATAL: Unable to load the QT QMYSQL driver,
> is it installed?
>
> I tried to run the makelibs.sh with the mysqlplugin option and that failed,
> it is looking for a QT directory that does not exist. The only database
> driver in the QT source is sqlite.
>
> I don't know why we are building the mariadb connector and what happened to
> the mysql qt driver.
>
> Anybody have ideas on this?
>
> Perhaps there is a separate download for the QT Mysql driver source? How did
> this work before?
>
> Peter
>
> _______________________________________________
> mythtv-users mailing list
> mythtv-users@mythtv.org
> http://lists.mythtv.org/mailman/listinfo/mythtv-users
> http://wiki.mythtv.org/Mailing_List_etiquette
> MythTV Forums: https://forum.mythtv.org

--
David Engel
david@istwok.net
_______________________________________________
mythtv-dev mailing list
mythtv-dev@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-dev
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: [mythtv-users] Android mythfrontend mysql driver problems [ In reply to ]
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.

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.

Any suggestions?

Peter

_______________________________________________
mythtv-dev mailing list
mythtv-dev@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-dev
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: [mythtv-users] Android mythfrontend mysql driver problems [ In reply to ]
On Wed, Sep 28, 2022 at 05:34:03PM -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.

I vaguely recall some NDK/SDK version issues but I thought they were
all resolved.

> 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.

I thought that cmake issue was fixed too. I know I ran into it too.
Perhaps I just patched it up locally and moved on to what I was trying
to do in the first place.

> 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.

I haven't built for 32-bits in ages.

> 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.
>
> Any suggestions?

Wait for Mark to wake up? :) Many of the machinations to build and run
on Android are still black magic to me. Seriously, does increasing
the adb logging level shed any more light?

David
--
David Engel
david@istwok.net
_______________________________________________
mythtv-dev mailing list
mythtv-dev@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-dev
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: [mythtv-users] Android mythfrontend mysql driver problems [ In reply to ]
On 9/28/22 17:52, David Engel wrote:
> On Wed, Sep 28, 2022 at 05:34:03PM -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.
> I vaguely recall some NDK/SDK version issues but I thought they were
> all resolved.
>
>> 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.
> I thought that cmake issue was fixed too. I know I ran into it too.
> Perhaps I just patched it up locally and moved on to what I was trying
> to do in the first place.
>
>> 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.
> I haven't built for 32-bits in ages.
>
>> 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.
>>
>> Any suggestions?
> Wait for Mark to wake up? :) Many of the machinations to build and run
> on Android are still black magic to me. Seriously, does increasing
> the adb logging level shed any more light?
>
> David

I can't increase the logging, because the only way I know to do that is
to send a command once mythfrontend is running.

I would think you would still need the qt mysql driver plugin, even if
using mariadb. qt needs some sort of driver plugin.

The call to build_mysqlplugin is commented, and if I try to run it
individually, it does not work, because the sqldrivers/mysqlplugin have
not been copied to the build directory structure. If I do copy them
there from the source, it fails to do anything. The build_mysqlplugin()
tries to run readlink -f qtbase/src/plugins/sqldrivers/mysql when it is
not in the directory that contains that, and fails. It needs
$QT_SOURCE_DIR in the command ...

I don't know how this is supposed to work, it used to work (I think)
before I did a makelibs.sh today ...

Anyway I will pick away at it and see if I get anywhere.

Peter


_______________________________________________
mythtv-dev mailing list
mythtv-dev@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-dev
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: [mythtv-users] Android mythfrontend mysql driver problems [ In reply to ]
On Wed, Sep 28, 2022 at 08:43:38PM -0400, Peter Bennett wrote:
>
> On 9/28/22 17:52, David Engel wrote:
> > On Wed, Sep 28, 2022 at 05:34:03PM -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.
> > I vaguely recall some NDK/SDK version issues but I thought they were
> > all resolved.
> >
> > > 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.
> > I thought that cmake issue was fixed too. I know I ran into it too.
> > Perhaps I just patched it up locally and moved on to what I was trying
> > to do in the first place.
> >
> > > 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.
> > I haven't built for 32-bits in ages.
> >
> > > 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.
> > >
> > > Any suggestions?
> > Wait for Mark to wake up? :) Many of the machinations to build and run
> > on Android are still black magic to me. Seriously, does increasing
> > the adb logging level shed any more light?
> >
> > David
>
> I can't increase the logging, because the only way I know to do that is to
> send a command once mythfrontend is running.

I meant the adb logging level -- hoping that Android might show some
system error that is at fault. FYI, you can set the initial, MythTV
verbose and loglevel in androAndroidManifest.xml.in. Look for
android:name="android.app.arguments".

> I would think you would still need the qt mysql driver plugin, even if using
> mariadb. qt needs some sort of driver plugin.

I understand and expect it should work on 32-bit the say way it does
on 64-bit. See earlier comment regarding Mark and black magic,
though. :(

David

> The call to build_mysqlplugin is commented, and if I try to run it
> individually, it does not work, because the sqldrivers/mysqlplugin have not
> been copied to the build directory structure. If I do copy them there from
> the source, it fails to do anything. The build_mysqlplugin() tries to run
> readlink -f qtbase/src/plugins/sqldrivers/mysql when it is not in the
> directory that contains that, and fails. It needs $QT_SOURCE_DIR in the
> command ...
>
> I don't know how this is supposed to work, it used to work (I think) before
> I did a makelibs.sh today ...
>
> Anyway I will pick away at it and see if I get anywhere.
>
> Peter
>
>
> _______________________________________________
> mythtv-dev mailing list
> mythtv-dev@mythtv.org
> http://lists.mythtv.org/mailman/listinfo/mythtv-dev
> http://wiki.mythtv.org/Mailing_List_etiquette
> MythTV Forums: https://forum.mythtv.org

--
David Engel
david@istwok.net
_______________________________________________
mythtv-dev mailing list
mythtv-dev@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-dev
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: [mythtv-users] Android mythfrontend mysql driver problems [ In reply to ]
On 29/09/2022 11:52 am, David Engel wrote:
> On Wed, Sep 28, 2022 at 08:43:38PM -0400, Peter Bennett wrote:
>> On 9/28/22 17:52, David Engel wrote:
>>> On Wed, Sep 28, 2022 at 05:34:03PM -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.
>>> I vaguely recall some NDK/SDK version issues but I thought they were
>>> all resolved.
>>>
>>>> 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.
>>> I thought that cmake issue was fixed too. I know I ran into it too.
>>> Perhaps I just patched it up locally and moved on to what I was trying
>>> to do in the first place.
>>>
>>>> 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.
>>> I haven't built for 32-bits in ages.
>>>
>>>> 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.
>>>>
>>>> Any suggestions?
>>> Wait for Mark to wake up? :) Many of the machinations to build and run
>>> on Android are still black magic to me. Seriously, does increasing
>>> the adb logging level shed any more light?
>>>
>>> David
>> I can't increase the logging, because the only way I know to do that is to
>> send a command once mythfrontend is running.
> I meant the adb logging level -- hoping that Android might show some
> system error that is at fault. FYI, you can set the initial, MythTV
> verbose and loglevel in androAndroidManifest.xml.in. Look for
> android:name="android.app.arguments".
>
>> I would think you would still need the qt mysql driver plugin, even if using
>> mariadb. qt needs some sort of driver plugin.
> I understand and expect it should work on 32-bit the say way it does
> on 64-bit. See earlier comment regarding Mark and black magic,
> though. :(
>
> David
>
>> The call to build_mysqlplugin is commented, and if I try to run it
>> individually, it does not work, because the sqldrivers/mysqlplugin have not
>> been copied to the build directory structure. If I do copy them there from
>> the source, it fails to do anything. The build_mysqlplugin() tries to run
>> readlink -f qtbase/src/plugins/sqldrivers/mysql when it is not in the
>> directory that contains that, and fails. It needs $QT_SOURCE_DIR in the
>> command ...
>>
>> I don't know how this is supposed to work, it used to work (I think) before
>> I did a makelibs.sh today ...
>>
>> Anyway I will pick away at it and see if I get anywhere.
>>
>> Peter
>>
Sorry I just saw this. I was awake but working so don't look at this
mail that often during the day.

mariadb connector is an external library that must be compiled for the
mysql plugin to be buildable inside of the QT build.

If you want to use the mysql lib, you will have to pull in the mysql
client lib, build that and then the qt mysql plugin will link against that.

I have already built for SDK 32 + NDK 24.0.8215888 + build tools 32.0.0
but I havent finished this yet. from memory seems to work. There may
have been an issue.

I updated mariadb connector to 3.2.6 but I havent seen any issues with
recent builds. Last one I did was end of May using the previous build
env settings if SDK 28, NDK 21.4... and tools 29.0.3. I remember a 32
bit build issue I was fixing at the time.

qt is still 5.15.3 but I did try 6 but there were too many issues and I
aborted that for the time being.

Lots of other lib updates at the time.

I can push what I have but would like to double check the build process
first, unless you would like to chase any issues.

Running on firetv max and nvshield 2017 ok.

I used SDK28 due to the firestick as well which is what the MAX
supports. Doesnt get updated that much.

Cheers

Mark




_______________________________________________
mythtv-dev mailing list
mythtv-dev@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-dev
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: [mythtv-users] Android mythfrontend mysql driver problems [ In reply to ]
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.

After fixing ConnectorName.cmake I am able to build, install, and run
mythtv on my nvidia shield. I did this with both 32bit and 64bit
builds. I know this isn't a fire stick, but if the problem was related
to mariadb connector v2.3.7 it should affect all devices. This is
using android ndk 21.0.6113669.

I know you've probably already looked at this, but when Qt is
configured does it say that its going to build the mysql connector? If
you have a logfile of the library build, try this:

grep -B0 -A10 'Qt Sql Drivers' <logfilename>

This is what I get on my build system:

Qt Sql Drivers:
DB2 (IBM) .............................. no
InterBase .............................. no
MySql .................................. yes
OCI (Oracle) ........................... no
ODBC ................................... no
PostgreSQL ............................. no
SQLite2 ................................ no
SQLite ................................. yes
Using system provided SQLite ......... no
TDS (Sybase) ........................... no

David

P.S. I just ordered a fire stick for testing purposes.



_______________________________________________
mythtv-dev mailing list
mythtv-dev@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-dev
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: [mythtv-users] Android mythfrontend mysql driver problems [ In reply to ]
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.
> After fixing ConnectorName.cmake I am able to build, install, and run
> mythtv on my nvidia shield. I did this with both 32bit and 64bit
> builds. I know this isn't a fire stick, but if the problem was related
> to mariadb connector v2.3.7 it should affect all devices. This is
> using android ndk 21.0.6113669.
>
> I know you've probably already looked at this, but when Qt is
> configured does it say that its going to build the mysql connector? If
> you have a logfile of the library build, try this:
>
> grep -B0 -A10 'Qt Sql Drivers' <logfilename>
>
> This is what I get on my build system:
>
> Qt Sql Drivers:
> DB2 (IBM) .............................. no
> InterBase .............................. no
> MySql .................................. yes
> OCI (Oracle) ........................... no
> ODBC ................................... no
> PostgreSQL ............................. no
> SQLite2 ................................ no
> SQLite ................................. yes
> Using system provided SQLite ......... no
> TDS (Sybase) ........................... no
>
> David
>
> P.S. I just ordered a fire stick for testing purposes.
>
>
Thank you David.

You have the answer there. I have this in my log, so it did not build
the MySQL driver


Qt Sql Drivers:
  DB2 (IBM) .............................. no
  InterBase .............................. no
  MySql .................................. no
  OCI (Oracle) ........................... no
  ODBC ................................... no
  PostgreSQL ............................. no
  SQLite2 ................................ no
  SQLite ................................. yes
    Using system provided SQLite ......... no
  TDS (Sybase) ........................... no
Qt Testlib:
  Tester for item models ................. yes

This makes sense. When I built the libraries, all worked except the
mariadb. Then after fixing the error I only rebuilt mariadb, so the Qt
MySQL would not have been built. I will rebuild the Qt and see if that
solves it.

Peter



_______________________________________________
mythtv-dev mailing list
mythtv-dev@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-dev
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: [mythtv-users] Android mythfrontend mysql driver problems [ In reply to ]
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

These are in android-utilities/config. Add and update these as you see fit

mariadb connector is now 3.2.6 and qt 5.15.6 among other updates

It also supports SDK and build tools to 33.

If you use NDK 24 or 25 you get a vulkan include failure when building
ffmpeg. I didnt chase this so left the NDK at 21.4.xxxxx

This is independent of SDK and build tools used.

MIN API VERSION is also moved to the build system and not the pro file
which is also more logical. Small commit to mythtv repo to support this.

Readme is not updated yet.

Please test and let me know if anything is wrong but I have done
extensive building today and yesterday so hopefully I don't get surprised.

To get different SDKs and NDKs, use studio and choose configure, manage
sdks, select hidden items and select away.

Also should I merge the datetime db update issue? My deb qt 5.15.4 and
5.15.6 still dont have the patches required AFAICT.

Cheers

Mark

_______________________________________________
mythtv-dev mailing list
mythtv-dev@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-dev
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: [mythtv-users] Android mythfrontend mysql driver problems [ In reply to ]
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.

David

>
> These are in android-utilities/config. Add and update these as you see fit
>
> mariadb connector is now 3.2.6 and qt 5.15.6 among other updates
>
> It also supports SDK and build tools to 33.
>
> If you use NDK 24 or 25 you get a vulkan include failure when building
> ffmpeg. I didnt chase this so left the NDK at 21.4.xxxxx
>
> This is independent of SDK and build tools used.
>
> MIN API VERSION is also moved to the build system and not the pro file which
> is also more logical. Small commit to mythtv repo to support this.
>
> Readme is not updated yet.
>
> Please test and let me know if anything is wrong but I have done extensive
> building today and yesterday so hopefully I don't get surprised.
>
> To get different SDKs and NDKs, use studio and choose configure, manage
> sdks, select hidden items and select away.
>
> Also should I merge the datetime db update issue? My deb qt 5.15.4 and
> 5.15.6 still dont have the patches required AFAICT.
>
> Cheers
>
> Mark
>
> _______________________________________________
> mythtv-dev mailing list
> mythtv-dev@mythtv.org
> http://lists.mythtv.org/mailman/listinfo/mythtv-dev
> http://wiki.mythtv.org/Mailing_List_etiquette
> MythTV Forums: https://forum.mythtv.org

--
David Engel
david@istwok.net
_______________________________________________
mythtv-dev mailing list
mythtv-dev@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-dev
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: [mythtv-users] Android mythfrontend mysql driver problems [ In reply to ]
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?

David
--
David Engel
david@istwok.net
_______________________________________________
mythtv-dev mailing list
mythtv-dev@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-dev
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: [mythtv-users] Android mythfrontend mysql driver problems [ In reply to ]
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.

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

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?

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.

Mark


_______________________________________________
mythtv-dev mailing list
mythtv-dev@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-dev
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: [mythtv-users] Android mythfrontend mysql driver problems [ In reply to ]
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@istwok.net
_______________________________________________
mythtv-dev mailing list
mythtv-dev@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-dev
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: [mythtv-users] Android mythfrontend mysql driver problems [ In reply to ]
I am trying to build with Mark's changes. I created a new entry in
config, for firetv. The base fire TV is at SDK level 22, and the 4k is
at 25. I set the MIN_SDK_VERSION to 21.

Libs built fine.

The apk make fails with this:

External library
/home/peter/proj/github.com/MythTV/packaging-master/android/mythinstall/lib/libicudata65.so
does not exist!
make: *** [Makefile:54: apk] Error 10

I see that libs for icu version 70 were built successfully, so I don't
know why it is looking for version 65.

I checked that the version 70 of icu was successful up to  *** Build ICU
Done ***

Any suggestions?

_______________________________________________
mythtv-dev mailing list
mythtv-dev@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-dev
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org