Mailing List Archive

Android build
Are the instructions @
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:

make[2]: Entering directory
'/home/john/src/Myth/Android/packaging/android/libs64/openssl-1.0.2u/crypto'
make[2]: warning: jobserver unavailable: using -j1. Add '+' to parent make
rule.
/usr/bin/perl ../util/mkbuildinf.pl
"/home/john/Android/android-ndk/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android-clang
-I. -I.. -I../include -DOPENSSL_THREADS
--cross-compile-prefix-cc=/home/john/Android/android-ndk/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android29-
-D__ANDROID_API__=29 " "os.api_level" >buildinf.h
/home/john/Android/android-ndk/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android-clang
-I. -I.. -I../include -DOPENSSL_THREADS
--cross-compile-prefix-cc=/home/john/Android/android-ndk/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android29-
-D__ANDROID_API__=29 -c -o cryptlib.o cryptlib.c
clang: error: unsupported option
'--cross-compile-prefix-cc=/home/john/Android/android-ndk/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android29-'
make[2]: *** [<builtin>: cryptlib.o] Error 1
make[2]: Leaving directory
'/home/john/src/Myth/Android/packaging/android/libs64/openssl-1.0.2u/crypto'
make[1]: *** [Makefile:288: build_crypto] Error 1
make[1]: Leaving directory
'/home/john/src/Myth/Android/packaging/android/libs64/openssl-1.0.2u'
~/src/Myth/Android/packaging/android/libs64
~/src/Myth/Android/packaging/android
make: *** [Makefile:33: libs] Error 2

I have hunted a bit trying to solve that, but have not found a solution.
Can anyone tell me how to get past this?

Thanks,

John
Re: Android build [ In reply to ]
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

>
> make[2]: Entering directory
> '/home/john/src/Myth/Android/packaging/android/libs64/openssl-1.0.2u/crypto'
> make[2]: warning: jobserver unavailable: using -j1.  Add '+' to parent
> make rule.
> /usr/bin/perl ../util/mkbuildinf.pl <http://mkbuildinf.pl>
> "/home/john/Android/android-ndk/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android-clang
> -I. -I.. -I../include  -DOPENSSL_THREADS
>  --cross-compile-prefix-cc=/home/john/Android/android-ndk/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android29-
> -D__ANDROID_API__=29 " "os.api_level" >buildinf.h
> /home/john/Android/android-ndk/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android-clang
> -I. -I.. -I../include  -DOPENSSL_THREADS
>  --cross-compile-prefix-cc=/home/john/Android/android-ndk/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android29-
> -D__ANDROID_API__=29    -c -o cryptlib.o cryptlib.c
> clang: error: unsupported option
> '--cross-compile-prefix-cc=/home/john/Android/android-ndk/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android29-'
> make[2]: *** [<builtin>: cryptlib.o] Error 1
> make[2]: Leaving directory
> '/home/john/src/Myth/Android/packaging/android/libs64/openssl-1.0.2u/crypto'
> make[1]: *** [Makefile:288: build_crypto] Error 1
> make[1]: Leaving directory
> '/home/john/src/Myth/Android/packaging/android/libs64/openssl-1.0.2u'
> ~/src/Myth/Android/packaging/android/libs64
> ~/src/Myth/Android/packaging/android
> make: *** [Makefile:33: libs] Error 2
>
> I have hunted a bit trying to solve that, but have not found a
> solution. Can anyone tell me how to get past this?
>
> Thanks,
>
> John




--
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus
Re: Android build [ In reply to ]
On Tue, Apr 27, 2021 at 5:40 PM Mark Spieth <mark@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 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:44,
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
Re: Android build [ In reply to ]
On 28/04/2021 10:54 am, John P Poet wrote:
>
>
> On Tue, Apr 27, 2021 at 5:40 PM Mark Spieth <mark@digivation.com.au
> <mailto:mark@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:44,
>                  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.

HTH

Mark




--
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus
Re: Android build [ In reply to ]
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@digivation.com.au
> > <mailto:mark@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:44,
> >                  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
--
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: Android build [ In reply to ]
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@digivation.com.au
> > > <mailto:mark@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


_______________________________________________
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: Android build [ In reply to ]
On Tue, Apr 27, 2021 at 8:56 PM David Hampton via mythtv-dev <
mythtv-dev@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@digivation.com.au
> > > > <mailto:mark@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.

Thanks,

John
Re: Android build [ In reply to ]
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@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@digivation.com.au
> > > > > <mailto:mark@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.

David


_______________________________________________
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: Android build [ In reply to ]
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@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@digivation.com.au
>>>>>> <mailto:mark@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



--
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus

_______________________________________________
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: Android build [ In reply to ]
On 4/28/21 12:23 AM, Mark Spieth wrote:
> 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 recently rebuilt it on a new computer.

I tried the newest ndk and I got to an error where building one of the
libs created a ".a" file but not a ".so" file in spite of being built
for dynamic linking.

I eventually succeeded with ndk 21.0.6113669

If you change ndk you have to rebuild everything. If you build the libs
with one ndk and the app with another, bad things happen.

If you switch from building v31 to building master you have to build the
libs again. I keep separate copies of the packaging directory for each
version to solve this.

Make sure you checkout the matching version (fixes/31 or master) from
packaging as well as from mythtv when building. This has caught me a few
times.

At one point my link android-sdk-linux -> Sdk disappeared (a gremlin
deleted it or I forgot to create it?) and strange error messages resulted.

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: Android build [ In reply to ]
On 28/04/2021 17:52, Peter Bennett wrote:
>
> At one point my link android-sdk-linux -> Sdk disappeared (a gremlin
> deleted it or I forgot to create it?) and strange error messages resulted.
>

Out of interest, why do we require random symlinks like this???

It is one of my pet hates, perhaps irrationally, to have a requirement
for such a link.


Regards
Stuart

_______________________________________________
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: Android build [ In reply to ]
On Tue, Apr 27, 2021, 9:24 PM Mark Spieth <mark@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@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@digivation.com.au
> >>>>>> <mailto:mark@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
Re: Android build [ In reply to ]
On Wed, Apr 28, 2021 at 08:47:42PM +0100, Stuart Auchterlonie wrote:
> On 28/04/2021 17:52, Peter Bennett wrote:
> >
> > At one point my link android-sdk-linux -> Sdk disappeared (a gremlin
> > deleted it or I forgot to create it?) and strange error messages
> > resulted.
> >
>
> Out of interest, why do we require random symlinks like this???
>
> It is one of my pet hates, perhaps irrationally, to have a requirement
> for such a link.

Good question. I'm not sure if (old?) Android was setup that way at
one time and old habits die hard or that's simply how Mark Spieth was
used to doing things. At one time, I had a pet, side project to
create an overall Makefile that would bypass all that and use make
variables read read from config.mak files. The goal was to more
easily support multiple builds with different library versions, NDKs,
SDKs, etc. I didn't get very far and quickly lost interest.
Everything seemed so fragile and once a working configuration was
found, it was best to leave it as is.

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: Android build [ In reply to ]
On 29/04/2021 12:11 pm, David Engel wrote:
> On Wed, Apr 28, 2021 at 08:47:42PM +0100, Stuart Auchterlonie wrote:
>> On 28/04/2021 17:52, Peter Bennett wrote:
>>> At one point my link android-sdk-linux -> Sdk disappeared (a gremlin
>>> deleted it or I forgot to create it?) and strange error messages
>>> resulted.
>>>
>> Out of interest, why do we require random symlinks like this???
>>
>> It is one of my pet hates, perhaps irrationally, to have a requirement
>> for such a link.
> Good question. I'm not sure if (old?) Android was setup that way at
> one time and old habits die hard or that's simply how Mark Spieth was
> used to doing things. At one time, I had a pet, side project to
> create an overall Makefile that would bypass all that and use make
> variables read read from config.mak files. The goal was to more
> easily support multiple builds with different library versions, NDKs,
> SDKs, etc. I didn't get very far and quickly lost interest.
> Everything seemed so fragile and once a working configuration was
> found, it was best to leave it as is.
>
Face it, I just don't know what I'm doing :-) so its all a hack job,
staring off with lawrence's windows builder.

And cleanup was never high on the priority list.

IIRC I started off with separate sdk and ndk and then they created studio
which made life easier but the rest stayed in case I had to go back.

I commend anyone that wants to clean it up. Peter has already had a go
and its better than it was.

At least there is a Makefile now.

Mark



--
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus

_______________________________________________
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: Android build [ In reply to ]
On Thu, Apr 29, 2021 at 05:47:35PM +1000, Mark Spieth wrote:
> On 29/04/2021 12:11 pm, David Engel wrote:
> > On Wed, Apr 28, 2021 at 08:47:42PM +0100, Stuart Auchterlonie wrote:
> > > Out of interest, why do we require random symlinks like this???
> > >
> > > It is one of my pet hates, perhaps irrationally, to have a requirement
> > > for such a link.
> > Good question. I'm not sure if (old?) Android was setup that way at
> > one time and old habits die hard or that's simply how Mark Spieth was
> > used to doing things. At one time, I had a pet, side project to
> > create an overall Makefile that would bypass all that and use make
> > variables read read from config.mak files. The goal was to more
> > easily support multiple builds with different library versions, NDKs,
> > SDKs, etc. I didn't get very far and quickly lost interest.
> > Everything seemed so fragile and once a working configuration was
> > found, it was best to leave it as is.
> >
> Face it, I just don't know what I'm doing :-) so its all a hack job, staring
> off with lawrence's windows builder.

I had quite a bit of trepidation when adding that comment above. For
the record, I greatly admire all the work you did making the Android
port work. It's been my family's, main frontend for 2.5 (I think)
years now.

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