[Android-development] Has anybody managed to get a Qt app built with clang/libc++ running on Android?

Лагнер, Сергей developer at lagner.ru
Thu Mar 15 06:25:16 CET 2018


Hello.

Stacktrace with addresses does not provide a lot of usefull information.
There is a tool in android ndk called ndk-stack
Run
> $ANDROID_NDK/ndk-stack -sym /path/to/unstripped/libraries -dump
/file/with/dump

You will get the function names that is much more readable

2018-03-15 4:46 GMT+07:00 Aleix Pol <aleixpol at kde.org>:

> On Tue, Mar 13, 2018 at 4:39 PM,  <policeterror at dyne.org> wrote:
> > Hello,
> >
> > gnustl is deprecated in latest NDK and C++11 is not working. Since I
> have a
> > library dependency using C++11, I'm forced to upgrade to clang/libc++
> >
> > I've built Qt with clang/libc++, but I'm running into this error where my
> > program crashes on startup with "your application  encountered a fatal
> error
> > and cannot continue", and seeing this error in the application output:
> >
> > W System.err: Caused by: java.lang.UnsatisfiedLinkError: dlopen failed:
> > library "libgnustl_shared.so" not found
> >
> > I've filed a bug which has been upgraded to P2: Important
> >
> > https://bugreports.qt.io/browse/QTBUG-67006
> >
> > Anybody have any solutions or workarounds for this?
>
> Hi,
> I've been doing some research to use clang too, I've been having
> problems as well, not the UnsatisfiedLinkError though.
>
> It seems to start and then it just crashes at some point.
>
> 03-14 22:44:07.897  7476  7476 F DEBUG   : *** *** *** *** *** *** ***
> *** *** *** *** *** *** *** *** ***
> 03-14 22:44:07.897  7476  7476 F DEBUG   : Build fingerprint:
> 'google/angler/angler:8.1.0/OPM3.171019.016/4565142:user/release-keys'
> 03-14 22:44:07.897  7476  7476 F DEBUG   : Revision: '0'
> 03-14 22:44:07.897  7476  7476 F DEBUG   : ABI: 'arm'
> 03-14 22:44:07.897  7476  7476 F DEBUG   : pid: 7454, tid: 7473, name:
> QtMainThread  >>> org.qtproject.example.gallery <<<
> 03-14 22:44:07.897  7476  7476 F DEBUG   : signal 31 (SIGSYS), code 1
> (SYS_SECCOMP), fault addr --------
> 03-14 22:44:07.897  7476  7476 F DEBUG   : Cause: seccomp prevented
> call to disallowed arm system call 397
> 03-14 22:44:07.897  7476  7476 F DEBUG   :     r0 ffffff9c  r1
> dc994c10  r2 00000000  r3 00000fff
> 03-14 22:44:07.897  7476  7476 F DEBUG   :     r4 cc9ff188  r5
> cc9ff2a8  r6 cdb6a697  r7 0000018d
> 03-14 22:44:07.897  7476  7476 F DEBUG   :     r8 cc9ff180  r9
> df2a8fc4  sl cc9ff2ec  fp cc9ff2e8
> 03-14 22:44:07.897  7476  7476 F DEBUG   :     ip cc9ff158  sp
> cc9ff148  lr cdb6ba3d  pc e7df5ccc  cpsr 800e0010
> 03-14 22:44:07.900  7476  7476 F DEBUG   :
> 03-14 22:44:07.900  7476  7476 F DEBUG   : backtrace:
> 03-14 22:44:07.900  7476  7476 F DEBUG   :     #00 pc 00018ccc
> /system/lib/libc.so (syscall+32)
> 03-14 22:44:07.900  7476  7476 F DEBUG   :     #01 pc 00129a39
> /data/app/org.qtproject.example.gallery-1rIYj0-Nv14ywyCUed3rjg==/lib/arm/
> libQt5Core.so
> 03-14 22:44:07.900  7476  7476 F DEBUG   :     #02 pc 00128693
> /data/app/org.qtproject.example.gallery-1rIYj0-Nv14ywyCUed3rjg==/lib/arm/
> libQt5Core.so
> 03-14 22:44:07.900  7476  7476 F DEBUG   :     #03 pc 000fbc9f
> /data/app/org.qtproject.example.gallery-1rIYj0-Nv14ywyCUed3rjg==/lib/arm/
> libQt5Core.so
> (QFileInfo::isFile() const+64)
> 03-14 22:44:07.900  7476  7476 F DEBUG   :     #04 pc 0010a2e5
> /data/app/org.qtproject.example.gallery-1rIYj0-Nv14ywyCUed3rjg==/lib/arm/
> libQt5Core.so
> 03-14 22:44:07.900  7476  7476 F DEBUG   :     #05 pc 0010a261
> /data/app/org.qtproject.example.gallery-1rIYj0-Nv14ywyCUed3rjg==/lib/arm/
> libQt5Core.so
> (QStandardPaths::locate(QStandardPaths::StandardLocation, QString
> const&, QFlags<QStandardPaths::LocateOption>)+80)
> 03-14 22:44:07.900  7476  7476 F DEBUG   :     #06 pc 00120f09
> /data/app/org.qtproject.example.gallery-1rIYj0-Nv14ywyCUed3rjg==/lib/arm/
> libQt5Core.so
> 03-14 22:44:07.900  7476  7476 F DEBUG   :     #07 pc 00120bd7
> /data/app/org.qtproject.example.gallery-1rIYj0-Nv14ywyCUed3rjg==/lib/arm/
> libQt5Core.so
> 03-14 22:44:07.900  7476  7476 F DEBUG   :     #08 pc 00121525
> /data/app/org.qtproject.example.gallery-1rIYj0-Nv14ywyCUed3rjg==/lib/arm/
> libQt5Core.so
> 03-14 22:44:07.900  7476  7476 F DEBUG   :     #09 pc 001587d5
> /data/app/org.qtproject.example.gallery-1rIYj0-Nv14ywyCUed3rjg==/lib/arm/
> libQt5Core.so
> (QCoreApplicationPrivate::init()+104)
> 03-14 22:44:07.900  7476  7476 F DEBUG   :     #10 pc 000c6a83
> /data/app/org.qtproject.example.gallery-1rIYj0-Nv14ywyCUed3rjg==/lib/arm/
> libQt5Gui.so
> (QGuiApplicationPrivate::init()+26)
>
> Will replicate this on the bug report as well.
>
> Aleix
> _______________________________________________
> Android-development mailing list
> Android-development at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/android-development
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/android-development/attachments/20180315/fe9c9c51/attachment.html>


More information about the Android-development mailing list