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

volumeraycaster example can fail to start on Android

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P1: Critical
    • 6.8.1, 6.9.0 FF
    • 6.9
    • Quick: 3D
    • None
    • Android
    • cf838e2b0 (dev), 1b9e686af (6.8)

    Description

      The volumeraycaster demo can fail to start on Android because of a missing runtime dependency to libomp.so.  The CMakeLists.txt file for the example does a check for "OpenMP" and apparently finds it in the NDK, but when the application is packaged in an APK and deployed to an Android device, at runtime there is no libomp.so to dlopen.

      E AndroidRuntime: FATAL EXCEPTION: qtMainLoopThread
      E AndroidRuntime: Process: org.qtproject.example.volumeraycaster, PID: 32138
      E AndroidRuntime: java.lang.UnsatisfiedLinkError: dlopen failed: library "libomp.so" not found: needed by /data/app/~~mtHfNZFs7lIH87_sEyRELw==/org.qtproject.example.volumeraycaster-J-uKPU8NgPKu5w2QpjgPQg==/base.apk!/lib/arm64-v8a/libvolumeraycaster_arm64-v8a.so in namespace classloader-namespace
      E AndroidRuntime:     at java.lang.Runtime.loadLibrary0(Runtime.java:1077)
      E AndroidRuntime:     at java.lang.Runtime.loadLibrary0(Runtime.java:998)
      E AndroidRuntime:     at java.lang.System.loadLibrary(System.java:1656)
      E AndroidRuntime:     at org.qtproject.qt.android.QtLoader.loadLibraryHelper(QtLoader.java:474)
      E AndroidRuntime:     at org.qtproject.qt.android.QtLoader.lambda$loadMainLibrary$0$org-qtproject-qt-android-QtLoader(QtLoader.java:523)
      E AndroidRuntime:     at org.qtproject.qt.android.QtLoader$$ExternalSyntheticLambda1.run(D8$$SyntheticClass:0)
      E AndroidRuntime:     at org.qtproject.qt.android.QtThread.lambda$run$0(QtThread.java:57)
      E AndroidRuntime:     at org.qtproject.qt.android.QtThread$$ExternalSyntheticLambda0.run(D8$$SyntheticClass:0)
      E AndroidRuntime:     at org.qtproject.qt.android.QtThread$1.run(QtThread.java:25)
      E AndroidRuntime:     at java.lang.Thread.run(Thread.java:920)
      I Process : Sending signal. PID: 32138 SIG: 9 

      Disabling the OpenMP lines allows the example to run:

      # if(OpenMP_CXX_FOUND)
      #     target_link_libraries(volumeraycaster PUBLIC
      #         OpenMP::OpenMP_CXX
      #     )
      # endif() 

      So this build system logic is not 100% air tight, and likely needs something extra here to catch this case on Android.

      Attachments

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

        Activity

          People

            jokarlss Jonas Karlsson
            janichol Andy Nichols
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes