Details
-
Suggestion
-
Resolution: Unresolved
-
P3: Somewhat important
-
None
-
6.2.6
Description
When building an application on Android using the android_app config then -shared is incorrectly included. This causes it to be incorrectly built and as a result the binary created segfaults when started:
The resulting binary is something that is both a ELF binary and a shared library, making it segfault when executed.
More information:
$ file ./hello-world
./hello-world: ELF 32-bit LSB shared object, ARM, EABI5 version 1 (SYSV), dynamically linked, BuildID[sha1]=e818a2180e12b9e903de2ea396f7fbea34de997b, not stripped
$ patchelf --print-interpreter ./hello-world
patchelf: cannot find section '.interp'. The input file is most likely statically linked
$ ./hello-world
Segmentation fault
Removing -shared from the QMAKE_LFLAGS_APP part in qmake.conf for android-clang solves the problem.
Attachments
Issue Links
- relates to
-
QTBUG-108834 QCoreApplication crashes when standalone application is used on Android
-
- Reported
-