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

Crash on Android when Qt is built as a static library

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Not Evaluated
    • 5.1.1
    • 5.1.0
    • Core: Other
    • None
    • Android 4.2.2
    • 5d439eb4ca2f3b576c951a1dbe75ce369ed05a39

    Description

      If Qt is built as a static library, Android application cannot load a shared library linked against static Qt.

      Steps to reproduce:
      1. Build Qt as a static library.
      2. Build a shared library linked against static Qt.
      3. Load previously build shared library from an Android application.

      Expected Result:
      The shared library loads successfully.

      Actual Result:
      The application crashes with the following error:
      Cannot load library: soinfo_relocate(linker.cpp:975): cannot locate symbol "__clear_cache" referenced by "libtestandroid.so"

      References:
      1. fix_crash_when_using_static_qt.patch - a patch that fixes the bug on Android. It replaces __clear_cache with cacheflush, that should be used on Android. But I'm not sure that it's a valid change for every ARM-Linux. Maybe it's necessary to handle Android separately from ARM-Linux.

      Attachments

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

        Activity

          People

            peppe Giuseppe D'Angelo
            michael.rozumyanskiy@gmail.com Michael Rozumyanskiy
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes