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

Android-clang: 'dlopen failed: library "libgnustl_shared.so" not found'

    XMLWordPrintable

Details

    • Bug
    • Resolution: Invalid
    • P1: Critical
    • None
    • 5.10.0
    • QPA
    • None
    • Android

    Description

      To reproduce (my machine was Mac OS 10.12.6 but I'm sure the issue is the same for other hosts)

      1. Download and install latest Android NDK
      2. Set up a Qt kit using the latest NDK as well as android-clang mkspecs
      3. Build and run an example, e.g. "Qt Quick Controls 2 - Gallery"
      4. The app will fail at runtime with the error mentioned in the subject

      I assume this is because the Qt shared libraries (libQt5xxx.so) still link against gnustl_shared.so and not the new libc+ , whereas the android-clang mkspecs clearly set libc+++ as the STL to use and not gnustl_shared.

      According to the Android documentation you can only have one STL in use per app (https://developer.android.com/ndk/guides/cpp-support.html).

      Btw. the android-g++ mkspecs still link with gnustl_shared, however both GCC/G++ as well as gnustl_shared are outdated Android assets and are not recommended any more by Google. Clang and libc++ are recommended instead.

      Attachments

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

        Activity

          People

            esabraha Eskil Abrahamsen Blomfeldt
            xxtrawurst Rafael Spring
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes