Mailing List Archive

Ticket #13648: Android 5 fails to load qt libs
#13648: Android 5 fails to load qt libs
------------------------------------+--------------------------
Reporter: mspieth | Owner: Mark Spieth
Type: Bug Report - Crash | Status: new
Priority: minor | Milestone: needs_triage
Component: Ports - Android | Version: Master Head
Severity: medium | Keywords:
Ticket locked: 0 |
------------------------------------+--------------------------
Android 5 fails to load qt libraries due to invalid has style

Error message is
{{{
E/art ( 8394): dlopen("/data/app/org.mythtv.mythfrontend-2/lib/arm
/libQt5Core_armeabi-v7a.so", RTLD_LAZY) failed: dlopen failed:
empty/missing DT_HASH in "libQt5Core_armeabi-v7a.so" (built with --hash-
style=gnu?)
--------- beginning of crash
E/AndroidRuntime( 8394): FATAL EXCEPTION: qtMainLoopThread
E/AndroidRuntime( 8394): Process: org.mythtv.mythfrontend, PID: 8394
E/AndroidRuntime( 8394): java.lang.UnsatisfiedLinkError: dlopen failed:
empty/missing DT_HASH in "libQt5Core_armeabi-v7a.so" (built with --hash-
style=gnu?)
}}}

--
Ticket URL: <https://code.mythtv.org/trac/ticket/13648>
MythTV <http://www.mythtv.org>
MythTV Media Center
Re: Ticket #13648: Android 5 fails to load qt libs [ In reply to ]
#13648: Android 5 fails to load qt libs
--------------------------------+------------------------------
Reporter: mspieth | Owner: Mark Spieth
Type: Bug Report - Crash | Status: new
Priority: minor | Milestone: needs_triage
Component: Ports - Android | Version: Master Head
Severity: medium | Resolution:
Keywords: | Ticket locked: 0
--------------------------------+------------------------------

Comment (by mspieth):

https://exceptionshub.com/c-android-ndk-unsatisfiedlinkerror-dlopen-
failed-empty-missing-dt_hash.html

requires lowering platform to 21 (currently 23) or adding -Wl,--hash-
style=both to the linker flags

--
Ticket URL: <https://code.mythtv.org/trac/ticket/13648#comment:1>
MythTV <http://www.mythtv.org>
MythTV Media Center
Re: Ticket #13648: Android 5 fails to load qt libs [ In reply to ]
#13648: Android 5 fails to load qt libs
--------------------------------+------------------------------
Reporter: mspieth | Owner: mspieth
Type: Bug Report - Crash | Status: assigned
Priority: minor | Milestone: needs_triage
Component: Ports - Android | Version: Master Head
Severity: medium | Resolution:
Keywords: | Ticket locked: 0
--------------------------------+------------------------------
Changes (by mspieth):

* owner: Mark Spieth => mspieth
* status: new => assigned


--
Ticket URL: <https://code.mythtv.org/trac/ticket/13648#comment:2>
MythTV <http://www.mythtv.org>
MythTV Media Center
Re: Ticket #13648: Android 5 fails to load qt libs [ In reply to ]
#13648: Android 5 fails to load qt libs
--------------------------------+------------------------------
Reporter: mspieth | Owner: mspieth
Type: Bug Report - Crash | Status: assigned
Priority: minor | Milestone: needs_triage
Component: Ports - Android | Version: Master Head
Severity: medium | Resolution:
Keywords: | Ticket locked: 0
--------------------------------+------------------------------

Comment (by Peter Bennett):

After 61dd131 2020/07/11 Mark Spieth : Android: Set both hash styles for
qt build

1. Setting api to 24 causes this error
dlopen failed: cannot locate symbol "__register_atfork"
2. Setting api to 21 causes this compile error in two files
fstream:950:9: error: use of undeclared identifier 'fseeko'
3. Since fseeko and ftello only exist from api 24, I changed those two
files to use ftell and fseek instead when compiling for api < 24. Then I
got this error:
failed: dlopen failed: library "libexiv2.so" not found
4. Looking at the apk, it contains libexiv2.14.so but not libexiv2.so. I
changed mythbuild.sh to include libexiv2.so. Now it contains both. This is
not optimal. But it works.

Attached are patch files for the changes. I do not understand why
libexiv2.14.so is copied, and why this is ok when running on firestick 4k
but not on firestick non-4k.

--
Ticket URL: <https://code.mythtv.org/trac/ticket/13648#comment:3>
MythTV <http://www.mythtv.org>
MythTV Media Center
Re: Ticket #13648: Android 5 fails to load qt libs [ In reply to ]
#13648: Android 5 fails to load qt libs
--------------------------------+------------------------------
Reporter: mspieth | Owner: mspieth
Type: Bug Report - Crash | Status: assigned
Priority: minor | Milestone: needs_triage
Component: Ports - Android | Version: Master Head
Severity: medium | Resolution:
Keywords: | Ticket locked: 0
--------------------------------+------------------------------
Changes (by Peter Bennett):

* Attachment "20200713_1538_mythtv_firesticknon4k.patch" added.

Patch for MythTV source to take care of ftello and fseeko

--
Ticket URL: <https://code.mythtv.org/trac/ticket/13648>
MythTV <http://www.mythtv.org>
MythTV Media Center
Re: Ticket #13648: Android 5 fails to load qt libs [ In reply to ]
#13648: Android 5 fails to load qt libs
--------------------------------+------------------------------
Reporter: mspieth | Owner: mspieth
Type: Bug Report - Crash | Status: assigned
Priority: minor | Milestone: needs_triage
Component: Ports - Android | Version: Master Head
Severity: medium | Resolution:
Keywords: | Ticket locked: 0
--------------------------------+------------------------------
Changes (by Peter Bennett):

* Attachment "20200713_1538_package_firesticknon4k.patch" added.

Patch for packaging to take care of libexiv2 issue

--
Ticket URL: <https://code.mythtv.org/trac/ticket/13648>
MythTV <http://www.mythtv.org>
MythTV Media Center
Re: Ticket #13648: Android 5 fails to load qt libs [ In reply to ]
#13648: Android 5 fails to load qt libs
--------------------------------+------------------------------
Reporter: mspieth | Owner: mspieth
Type: Bug Report - Crash | Status: assigned
Priority: minor | Milestone: needs_triage
Component: Ports - Android | Version: Master Head
Severity: medium | Resolution:
Keywords: | Ticket locked: 0
--------------------------------+------------------------------

Comment (by mspieth):

Both patches look fine.

I think the exiv2 lib issue is due to myth tree external version and its
getting confused during link. We now have 2 versions I think. Is this
statement true? A softlink may be better in that case.

--
Ticket URL: <https://code.mythtv.org/trac/ticket/13648#comment:4>
MythTV <http://www.mythtv.org>
MythTV Media Center
Re: Ticket #13648: Android 5 fails to load qt libs [ In reply to ]
#13648: Android 5 fails to load qt libs
--------------------------------+------------------------------
Reporter: mspieth | Owner: mspieth
Type: Bug Report - Crash | Status: assigned
Priority: minor | Milestone: needs_triage
Component: Ports - Android | Version: Master Head
Severity: medium | Resolution:
Keywords: | Ticket locked: 0
--------------------------------+------------------------------

Comment (by Peter Bennett):

Correct - the apk now has 2 copies. I don't know if you can set up a soft
link in an apk file. However, libexiv2 and libexiv2.14 are each 1.5 MB so
it is very little storage wasted.

--
Ticket URL: <https://code.mythtv.org/trac/ticket/13648#comment:5>
MythTV <http://www.mythtv.org>
MythTV Media Center
Re: Ticket #13648: Android 5 fails to load qt libs [ In reply to ]
#13648: Android 5 fails to load qt libs
--------------------------------+------------------------------
Reporter: mspieth | Owner: mspieth
Type: Bug Report - Crash | Status: assigned
Priority: minor | Milestone: needs_triage
Component: Ports - Android | Version: Master Head
Severity: medium | Resolution:
Keywords: | Ticket locked: 0
--------------------------------+------------------------------

Comment (by David Hampton):

IIRC, libexiv2 is used for the myth-31 build and libexiv2 is used for the
myth-master build. You don't need them both in the same APK.

--
Ticket URL: <https://code.mythtv.org/trac/ticket/13648#comment:6>
MythTV <http://www.mythtv.org>
MythTV Media Center
Re: Ticket #13648: Android 5 fails to load qt libs [ In reply to ]
#13648: Android 5 fails to load qt libs
--------------------------------+------------------------------
Reporter: mspieth | Owner: mspieth
Type: Bug Report - Crash | Status: closed
Priority: minor | Milestone: needs_triage
Component: Ports - Android | Version: Master Head
Severity: medium | Resolution: Fixed
Keywords: | Ticket locked: 0
--------------------------------+------------------------------
Changes (by Peter Bennett):

* status: assigned => closed
* resolution: => Fixed


Comment:

Fixed with b76dbf4214 in mythtv and 1d75297 in packaging.

--
Ticket URL: <https://code.mythtv.org/trac/ticket/13648#comment:7>
MythTV <http://www.mythtv.org>
MythTV Media Center
Re: Ticket #13648: Android 5 fails to load qt libs [ In reply to ]
#13648: Android 5 fails to load qt libs
--------------------------------+-----------------------------
Reporter: mspieth | Owner: mspieth
Type: Bug Report - Crash | Status: closed
Priority: minor | Milestone: 32.0
Component: Ports - Android | Version: Master Head
Severity: medium | Resolution: Fixed
Keywords: | Ticket locked: 0
--------------------------------+-----------------------------
Changes (by Stuart Auchterlonie):

* milestone: needs_triage => 32.0


--
Ticket URL: <https://code.mythtv.org/trac/ticket/13648#comment:8>
MythTV <http://www.mythtv.org>
MythTV Media Center