Details
-
Bug
-
Resolution: Duplicate
-
P2: Important
-
None
-
5.9.2, 5.10.0 Beta 4
-
None
-
openSUSE Leap v42.3
android ndk v15c
android sdk v26
clang
armeabi-v7a
Description
in r14b ndk sysroot (/sysroot/usr/include/dlfcn.h) RTLD_NODELETE was an enum value
in r15c ndk sysroot RTLD_NODELETE is defined, which causes it to be picked up by qtbase/src/corelib/plugin/qlibrary_unix.cpp
the change probably came with the unified-headers switch, when generating a standalone toolchain using -deprecated-headers then in r15c these values seem to end up in an enum again, but Qt normally picks stuff from the ndk sysroot itself, so that doesn't help
qtbase/src/corelib/plugin/qlibrary_unix.cpp contains code to add RTLD_NODELETE only when it is defined
on our Android v5.1 devices that do not support the RTLD_NODELETE flag this fails runtime because dlopen() gets called with this flag
from qtbase/src/corelib/plugin/qlibrary_unix.cpp:
33a4e3b4706 (Yan Shapochnik 2012-04-20 08:41:18 -0400 174) #ifdef RTLD_NODELETE 33a4e3b4706 (Yan Shapochnik 2012-04-20 08:41:18 -0400 175) if (loadHints & QLibrary::PreventUnloadHint) { 33a4e3b4706 (Yan Shapochnik 2012-04-20 08:41:18 -0400 176) dlFlags |= RTLD_NODELETE; 33a4e3b4706 (Yan Shapochnik 2012-04-20 08:41:18 -0400 177) } 33a4e3b4706 (Yan Shapochnik 2012-04-20 08:41:18 -0400 178) #endif