Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-63892

Usage of Android v15c/v16 NDK's fail runtime on RTLD_NODELETE being defined

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • P2: Important
    • None
    • 5.9.2, 5.10.0 Beta 4
    • QPA
    • None
    • openSUSE Leap v42.3

      android ndk v15c

      android sdk v26

      clang

      armeabi-v7a
    • Android

    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

       

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            esabraha Eskil Abrahamsen Blomfeldt
            jirauser24743 user-678dd (Inactive)
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes