[mythtv] Android build

John P Poet jppoet at gmail.com
Thu Apr 29 01:52:27 UTC 2021


On Tue, Apr 27, 2021, 9:24 PM Mark Spieth <mark at digivation.com.au> wrote:

> On 28/04/2021 2:14 pm, David Hampton via mythtv-dev wrote:
> > On Tue, 2021-04-27 at 21:18 -0600, John P Poet wrote:
> >>
> >> On Tue, Apr 27, 2021 at 8:56 PM David Hampton via mythtv-dev <
> >> mythtv-dev at mythtv.org> wrote:
> >>> On Tue, 2021-04-27 at 21:10 -0500, David Engel wrote:
> >>>> On Wed, Apr 28, 2021 at 11:18:16AM +1000, Mark Spieth wrote:
> >>>>> On 28/04/2021 10:54 am, John P Poet wrote:
> >>>>>>
> >>>>>> On Tue, Apr 27, 2021 at 5:40 PM Mark Spieth <
> >>>>>> mark at digivation.com.au
> >>>>>> <mailto:mark at digivation.com.au>> wrote:
> >>>>>>
> >>>>>>      On 28/04/2021 6:52 am, John P Poet wrote:
> >>>>>>>      Are the instructions @
> >>>>>>>
> >>>>>>>
> >>> https://github.com/MythTV/packaging/blob/master/android/Readme.md
> >>>>>>>      <
> >>>>>>>
> >>> https://github.com/MythTV/packaging/blob/master/android/Readme.md
> >>>>>>>      up to date? I am trying to build latest master on a
> >>> Fedora
> >>>>>>> 34
> >>>>>>>      machine.
> >>>>>>>
> >>>>>>>      First error I got was that
> >>>>>>>      Android/android-ndk/toolchains/llvm/prebuilt/linux-
> >>>>>>> x86_64/bin/aarch64-linux-android-clang
> >>>>>>>      did not exist. To fix that I soft linked the version
> >>>>>>> specific file:
> >>>>>>>      $ ln -s aarch64-linux-android29-clang aarch64-linux-
> >>>>>>> android-clang
> >>>>>>>
> >>>>>>>      Then `make SDK=29 MODE=arm64 libs` produces:
> >>>>>>      I have not used the command line variables in a long
> >>>>>> time.
> >>>>>> SDK=29
> >>>>>>      should not be necessary.
> >>>>>>
> >>>>>>      In fact the SDK=XX mode may be broken. Not sure.
> >>>>>>
> >>>>>>      Not sure about the override. shouldnt need to use the
> >>> SDK=29
> >>>>>> it
> >>>>>>      should be the default. see setenv.sh.
> >>>>>>
> >>>>>>      The NDK is still on 28. The layout changed and caused
> >>>>>> problems
> >>>>>>      when I tried it.
> >>>>>>
> >>>>>>      I have recently been trying QT5.15.2 but had some
> >>>>>> problems
> >>>>>> but
> >>>>>>      there are a couple of fixes to the setenv script for
> >>>>>> detecting
> >>>>>>      tool paths which I will attach for you to test. This is
> >>> still
> >>>>>> on
> >>>>>>      QT 5.14.1 but is sort of ready to go for qt 5.15.2 when I
> >>>>>> figure
> >>>>>>      out the issue (some API change I think).
> >>>>>>
> >>>>>>      Then all I do is run 'make libs' and then 'make' or 'make
> >>>>>>      distclean everything'
> >>>>>>
> >>>>>>      my buildrc will show you which NDK's Ive been trying. use
> >>>>>> android
> >>>>>>      studio to install ndks with the correct version.
> >>>>>>
> >>>>>>      Sorry Ive been lazy and havent commited some of these
> >>> updates
> >>>>>> yet.
> >>>>>>      Not happy yet with them and I dont want to break things.
> >>>>>>
> >>>>>>      See how you go. But it does work for me.
> >>>>>>
> >>>>>>      Mark
> >>>>>>
> >>>>>>
> >>>>>> Hi Mark,
> >>>>>>
> >>>>>> That got me a lot further. Unfortunately it is now failing
> >>> trying
> >>>>>> to
> >>>>>> build Qt 5.14.1 using build tools 29.0.3. Should I be using a
> >>>>>> different
> >>>>>> version?
> >>>>>>
> >>>>>> Preparing build tree...
> >>>>>> Creating qmake...
> >>>>>> .....................................In file included from
> >>>>>> /home/john/src/Myth/Android/packaging/android/libs64/qt-
> >>>>>> everywhere-src-5.14.1/qtbase/include/QtCore/qfloat16.h:1,
> >>>>>>                   from
> >>>>>> /home/john/src/Myth/Android/packaging/android/libs64/qt-
> >>>>>> everywhere-src-
> >>>>>>
> >>> 5.14.1/qtbase/include/QtCore/../../src/corelib/global/qendian.h:4
> >>>>>> 4,
> >>>>>>                   from
> >>>>>> /home/john/src/Myth/Android/packaging/android/libs64/qt-
> >>>>>> everywhere-src-5.14.1/qtbase/include/QtCore/qendian.h:1,
> >>>>>>                   from
> >>>>>> /home/john/src/Myth/Android/packaging/android/libs64/qt-
> >>>>>> everywhere-src-
> >>> 5.14.1/qtbase/src/corelib/codecs/qutfcodec.cpp:43:
> >>>>>> /home/john/src/Myth/Android/packaging/android/libs64/qt-
> >>>>>> everywhere-src-
> >>>>>>
> >>> 5.14.1/qtbase/include/QtCore/../../src/corelib/global/qfloat16.h:
> >>>>>> 295:7:
> >>>>>> error: ‘numeric_limits’ is not a class template
> >>>>>>    295 | class numeric_limits<QT_PREPEND_NAMESPACE(qfloat16)>
> >>>>>> :
> >>>>>> public
> >>>>>> numeric_limits<float>
> >>>>>>        |       ^~~~~~~~~~~~~~
> >>>>>> /home/john/src/Myth/Android/packaging/android/libs64/qt-
> >>>>>> everywhere-src-
> >>>>>>
> >>> 5.14.1/qtbase/include/QtCore/../../src/corelib/global/qfloat16.h:
> >>>>>> 295:77:
> >>>>>> error: expected template-name before ‘<’ token
> >>>>>>    295 | class numeric_limits<QT_PREPEND_NAMESPACE(qfloat16)>
> >>>>>> :
> >>>>>> public
> >>>>>> numeric_limits<float>
> >>>>>>        |                         ^
> >>>>>> /home/john/src/Myth/Android/packaging/android/libs64/qt-
> >>>>>> everywhere-src-
> >>>>>>
> >>> 5.14.1/qtbase/include/QtCore/../../src/corelib/global/qfloat16.h:
> >>>>>> 295:77:
> >>>>>> error: expected ‘{’ before ‘<’ token
> >>>>>> ...
> >>>>>>
> >>>>>> Thanks,
> >>>>>>
> >>>>>> John
> >>>>> This sounds like an unsupported ndk version, compiler too new.
> >>>>> I
> >>>>> had trouble
> >>>>> with ndk 22.1.7171670 with similar results. The c++ headers are
> >>>>> a
> >>>>> bit
> >>>>> different I think but havent chased it down.
> >>>>>
> >>>>> install one of the 21 ones. ~/Android/Sdk/ndk is where they
> >>>>> live
> >>>>> and you can
> >>>>> see what is installed.
> >>>>>
> >>>>> I have 21.0.6113669 and 21.4.7075529 installed. both work for
> >>>>> me.
> >>>> I haven't rebuilt my libs in ages.  In that past, that part has
> >>>> tended
> >>>> to be fragile and best left alone for Mark to fix! :) It looks
> >>>> like
> >>> I
> >>>> last did that a little over a year ago with ndk 21.0.6113669.
> >>>>
> >>>> David
> >>> I'm compiling regularly with ndk 21.0.6113669.
> >>>
> >>> David H
> >>>
> >>
> >> On Fedora?  It looks like I am having to add
> >> include <limits>
> >> to various Qt headers.  I am still figuring out all the headers where
> >> that is necessary.
> > Fedora 34, although I set it up under Fedora 33. I don't remember
> > having to do anything like that. It was quite easy compared to the
> > first time I set it up a two years ago. I just followed the
> > instructions in the Readme file.
> >
> > Your missing clang executable sounds familiar. I think I started with a
> > more recent version of the ndk and saw problems like that. (I vaguely
> > remember trying to find the right executable for the compiler or
> > linker.) I'm pretty sure it was switching to the older ndk 21.0.6113669
> > that resolved all my problems.
> >
> >
> I know what the problem is, your compiler clang or gc++ is too new for
> the host build part.
>
> Try with a slightly older gcc/clang host compiler. The cross compiler is
> tightly constrained so that should not be the problem.
>
> Mark


I was able to get Qt built by adding
include <limits>
to  qtbase/include/QtCore/qfloat16.h and
qtbase/src/corelib/text/qbytearraymatcher.h

mythfrontend seems to be running fine on my sister's nVidia Shield with
latest master.

Thanks for your help Mark.

John
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mythtv.org/pipermail/mythtv-dev/attachments/20210428/c0dd9d7a/attachment.htm>


More information about the mythtv-dev mailing list